From patchwork Wed Jul 5 11:59:19 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ani Sinha X-Patchwork-Id: 1803564 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=nongnu.org (client-ip=209.51.188.17; helo=lists.gnu.org; envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=) Authentication-Results: legolas.ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=redhat.com header.i=@redhat.com header.a=rsa-sha256 header.s=mimecast20190719 header.b=AFU2Jpwa; dkim-atps=neutral Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4Qwyt30szZz20Pf for ; Wed, 5 Jul 2023 22:00:58 +1000 (AEST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qH1Ac-0006Ic-S1; Wed, 05 Jul 2023 07:59:42 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qH1Ab-0006Hm-8Z for qemu-devel@nongnu.org; Wed, 05 Jul 2023 07:59:41 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.129.124]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qH1AZ-00010g-RJ for qemu-devel@nongnu.org; Wed, 05 Jul 2023 07:59:41 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1688558379; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=XEZcgPReFyzDcO9cLJl1A0SSdm0joHIvq6RFVgYxRzg=; b=AFU2JpwaHcsNA7qqEfjJPzVtYZEVtIJEFyeYOIn4mH7Ar07RG5G0jRhN5MPg2J+zafbknS wuMIDm0MPsuvw/QhUNTrfAUzNHc0q1Xg/1t9p4XZ3h7eAD6qejxrDA6A/lyw+of1tlt8E3 nHI/j6HPQHnU4JJvNf8aUOiDgIVRW3I= Received: from mail-pl1-f197.google.com (mail-pl1-f197.google.com [209.85.214.197]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-397-FPM3KGiwOGuSqPapKLyZOA-1; Wed, 05 Jul 2023 07:59:38 -0400 X-MC-Unique: FPM3KGiwOGuSqPapKLyZOA-1 Received: by mail-pl1-f197.google.com with SMTP id d9443c01a7336-1b89712d613so33360355ad.2 for ; Wed, 05 Jul 2023 04:59:38 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1688558376; x=1691150376; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=XEZcgPReFyzDcO9cLJl1A0SSdm0joHIvq6RFVgYxRzg=; b=Umv6ZmFs0RLBerdfiStclkWpIhzEU/XCo9mtxSlPg4XhWO3O7P0QsCQ/jOMmMDASXV WR/KQXBgbwtiRvk361C9cLUGYlp6ji9H+pSmDzWrMun68zicb9cH1eFhvWA9m2LMDBx4 hav5nBesjdvLAsAvmuzPIFwXOMGIp/NxbTKjkyvZQfkBaoNgH4jgBAY3KdJIrOtuMOxg m797aJKQe7gfTEJXAEjFbmSGIfXXTIHHgN+BS3TXPEJFC+RMuSiEEYtc5p1o9sJyCur8 2uAq7Xcmss+wtJJfvk4B3qJIrKoalgkMWGwWcpyaP6Le12X8F3eIrPkXEI+1ufzKkfPJ 11sA== X-Gm-Message-State: ABy/qLYwFUcurDzlwHhtNXWrdKUtMoiCxEgfqKzLWSs6zJ3ubEaIcdcH op7/kqgn1kspRpS0rrI6gqKcQaOcPICfqJfBEISJxIMaMcirBfw4S/2lgLOooSmsb44jTVcXHgK nQx/ZS8D0I42NvxXlSAGX0eSga8rzA/CNnMufYCs7qOqhQwRudq83ETuAmFomhfisyW00+pogcx Y= X-Received: by 2002:a17:903:2281:b0:1b6:6b90:7c2f with SMTP id b1-20020a170903228100b001b66b907c2fmr15351437plh.55.1688558376757; Wed, 05 Jul 2023 04:59:36 -0700 (PDT) X-Google-Smtp-Source: APBJJlFqNPeRxwQRorYyOuloaBImu1hFVLOVDeILmBd27kd3xsyFG4r69WClLDBsq2Fm9MXHEBhsgQ== X-Received: by 2002:a17:903:2281:b0:1b6:6b90:7c2f with SMTP id b1-20020a170903228100b001b66b907c2fmr15351421plh.55.1688558376411; Wed, 05 Jul 2023 04:59:36 -0700 (PDT) Received: from localhost.localdomain ([115.96.119.220]) by smtp.googlemail.com with ESMTPSA id v3-20020a1709028d8300b001b89c313185sm4878852plo.205.2023.07.05.04.59.34 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 05 Jul 2023 04:59:36 -0700 (PDT) From: Ani Sinha To: qemu-devel@nongnu.org, "Michael S. Tsirkin" , Igor Mammedov , Ani Sinha Subject: [PATCH v8 1/6] tests/acpi: allow changes in DSDT.noacpihp table blob Date: Wed, 5 Jul 2023 17:29:19 +0530 Message-Id: <20230705115925.5339-2-anisinha@redhat.com> X-Mailer: git-send-email 2.39.1 In-Reply-To: <20230705115925.5339-1-anisinha@redhat.com> References: <20230705115925.5339-1-anisinha@redhat.com> MIME-Version: 1.0 Received-SPF: pass client-ip=170.10.129.124; envelope-from=anisinha@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H4=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org We are going to fix bio-tables-test in the next patch and hence need to make sure the acpi tests continue to pass. Signed-off-by: Ani Sinha Acked-by: Igor Mammedov --- tests/qtest/bios-tables-test-allowed-diff.h | 1 + 1 file changed, 1 insertion(+) diff --git a/tests/qtest/bios-tables-test-allowed-diff.h b/tests/qtest/bios-tables-test-allowed-diff.h index dfb8523c8b..31df9c6187 100644 --- a/tests/qtest/bios-tables-test-allowed-diff.h +++ b/tests/qtest/bios-tables-test-allowed-diff.h @@ -1 +1,2 @@ /* List of comma-separated changed AML files to ignore */ +"tests/data/acpi/q35/DSDT.noacpihp", From patchwork Wed Jul 5 11:59:20 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ani Sinha X-Patchwork-Id: 1803563 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=nongnu.org (client-ip=209.51.188.17; helo=lists.gnu.org; envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=) Authentication-Results: legolas.ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=redhat.com header.i=@redhat.com header.a=rsa-sha256 header.s=mimecast20190719 header.b=AqVobUrt; dkim-atps=neutral Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4QwysZ6tr8z20Pf for ; Wed, 5 Jul 2023 22:00:34 +1000 (AEST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qH1Af-0006J0-JQ; Wed, 05 Jul 2023 07:59:45 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qH1Ad-0006Ii-W7 for qemu-devel@nongnu.org; Wed, 05 Jul 2023 07:59:44 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.129.124]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qH1Ac-000112-Hz for qemu-devel@nongnu.org; Wed, 05 Jul 2023 07:59:43 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1688558381; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=YQi5DNpBee1TXBxFEGyYLPk0MTnw7h1zNgmbfk3WRkU=; b=AqVobUrt2bKAVaRrdoYF4ULri5gocM5Xv5X5rvNNuW32u0LmMrrnaSkABRoZNJNxfBuJZp OdRW/eGcUUU3tSG7W8HirzW++ei2AKUZvtPERniOLSU+jvrGgUP1IwLYPFwiScrccJZdR4 2VJShBHVzFPp0ANr+uBqT/mZFw+X0yo= Received: from mail-pl1-f200.google.com (mail-pl1-f200.google.com [209.85.214.200]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-447-QpmOocZiMTGXWPZ7xfgvBg-1; Wed, 05 Jul 2023 07:59:40 -0400 X-MC-Unique: QpmOocZiMTGXWPZ7xfgvBg-1 Received: by mail-pl1-f200.google.com with SMTP id d9443c01a7336-1b88dee40ecso54399205ad.3 for ; Wed, 05 Jul 2023 04:59:40 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1688558379; x=1691150379; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=YQi5DNpBee1TXBxFEGyYLPk0MTnw7h1zNgmbfk3WRkU=; b=QqIJgBG8bCL5jZ6aAJDhKg+rG+PngzF7snbBX3+bWw7mBjANmGVQRWy8VWxLdsYAD3 UKxf9CMYn0D5584k0ZR8VCHBZGVwXNrK6m6yuaFwQMz3j683eg42F5mDE2falx18Vt5h +sHRFNtfofkxdcZd7l/EHhVM/Qydea54gOYsCNXgogYooW9A84RRYxDQKKbpb3/GF7L2 /hKhoG8swk4us0IWlvTRkEMnlozE4Be7h9Psu+FLzEtqRsDFl+J9fUR2tso7w5/I5/gj CuVVE2HbGRbyTzIdADvEtcxRnOpiKghlk5mYIGHOpvMqKzGa6jkYrKRplE698osvrsJV UncQ== X-Gm-Message-State: ABy/qLZQ/w48hKNtAB0Vojju5Hah3u40lqX4t+BrPnhE32wSjyPXQNXZ In63VZBKIv1sq6adZlkgGPvEGNinxrCQDqmuTaah/gRLj2gQOdE6SgFxHZNAH9Aj7MwEsdn3tvG dDbwA8AC+NKyp58jhqJtuhxeoRy9YiZ944kMjXOPFjzgka2u6ZYHuVxrh6m2a9OGLh9ycy+Lfa5 s= X-Received: by 2002:a17:902:f683:b0:1b6:9954:2037 with SMTP id l3-20020a170902f68300b001b699542037mr18711678plg.4.1688558379387; Wed, 05 Jul 2023 04:59:39 -0700 (PDT) X-Google-Smtp-Source: APBJJlGLm782gRhw5jXqMo0NAncYjOwj4W7FsOyHtBotzWNY2154GTo/JuVsoHE2sFymeoLn43IhIA== X-Received: by 2002:a17:902:f683:b0:1b6:9954:2037 with SMTP id l3-20020a170902f68300b001b699542037mr18711654plg.4.1688558378985; Wed, 05 Jul 2023 04:59:38 -0700 (PDT) Received: from localhost.localdomain ([115.96.119.220]) by smtp.googlemail.com with ESMTPSA id v3-20020a1709028d8300b001b89c313185sm4878852plo.205.2023.07.05.04.59.36 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 05 Jul 2023 04:59:38 -0700 (PDT) From: Ani Sinha To: qemu-devel@nongnu.org, "Michael S. Tsirkin" , Igor Mammedov , Ani Sinha Subject: [PATCH v8 2/6] tests/acpi/bios-tables-test: use the correct slot on the pcie-root-port Date: Wed, 5 Jul 2023 17:29:20 +0530 Message-Id: <20230705115925.5339-3-anisinha@redhat.com> X-Mailer: git-send-email 2.39.1 In-Reply-To: <20230705115925.5339-1-anisinha@redhat.com> References: <20230705115925.5339-1-anisinha@redhat.com> MIME-Version: 1.0 Received-SPF: pass client-ip=170.10.129.124; envelope-from=anisinha@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H4=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org PCIE ports only have one slot, slot 0. Hence, non-zero slots are not available for PCIE devices on PCIE root ports. Fix test_acpi_q35_tcg_no_acpi_hotplug() so that the test does not use them. Signed-off-by: Ani Sinha Reviewed-by: Igor Mammedov --- tests/qtest/bios-tables-test.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/qtest/bios-tables-test.c b/tests/qtest/bios-tables-test.c index ed1c69cf01..47ba20b957 100644 --- a/tests/qtest/bios-tables-test.c +++ b/tests/qtest/bios-tables-test.c @@ -1020,9 +1020,9 @@ static void test_acpi_q35_tcg_no_acpi_hotplug(void) " -device pci-testdev,bus=nohprp,acpi-index=501" " -device pcie-root-port,id=nohprpint,port=0x0,chassis=3,hotplug=off," "multifunction=on,addr=8.0" - " -device pci-testdev,bus=nohprpint,acpi-index=601,addr=8.1" + " -device pci-testdev,bus=nohprpint,acpi-index=601,addr=0.1" " -device pcie-root-port,id=hprp2,port=0x0,chassis=4,bus=nohprpint," - "addr=9.0" + "addr=0.2" " -device pci-testdev,bus=hprp2,acpi-index=602" , &data); free_test_data(&data); From patchwork Wed Jul 5 11:59:21 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ani Sinha X-Patchwork-Id: 1803566 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=nongnu.org (client-ip=209.51.188.17; helo=lists.gnu.org; envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=) Authentication-Results: legolas.ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=redhat.com header.i=@redhat.com header.a=rsa-sha256 header.s=mimecast20190719 header.b=GzZkNRAG; dkim-atps=neutral Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4Qwytl666fz20Pf for ; Wed, 5 Jul 2023 22:01:35 +1000 (AEST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qH1Ai-0006Jj-F2; Wed, 05 Jul 2023 07:59:48 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qH1Ag-0006JI-My for qemu-devel@nongnu.org; Wed, 05 Jul 2023 07:59:46 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.133.124]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qH1Af-00011X-44 for qemu-devel@nongnu.org; Wed, 05 Jul 2023 07:59:46 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1688558384; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=UVrMQo5OTuj/Z/ArUoRLIJdd/O7g0cHC9ea86NhATqc=; b=GzZkNRAGZuQbAIYsPgg9AZNaUC1yo969BS4J3qcoSjd0Ngi8RuYzY7JM0hwmGrw83+HG4O MPp6OYH9zoaTa2qX68MCdfeE0IlQ8QMHmWo7xWGNbUuAm0pIaI+25CV1y4iz3zmtrNNEc5 FEBAtG2DVl1z3FL8mexpNirc6kg36FE= Received: from mail-pg1-f199.google.com (mail-pg1-f199.google.com [209.85.215.199]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-552-FGhnpGScOIm98bwhWYhTOA-1; Wed, 05 Jul 2023 07:59:43 -0400 X-MC-Unique: FGhnpGScOIm98bwhWYhTOA-1 Received: by mail-pg1-f199.google.com with SMTP id 41be03b00d2f7-55bd0daca15so1316901a12.0 for ; Wed, 05 Jul 2023 04:59:43 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1688558382; x=1691150382; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=UVrMQo5OTuj/Z/ArUoRLIJdd/O7g0cHC9ea86NhATqc=; b=gZ72RqGhPALQAi3shU+u1Z+X6g1VuXjycaNCcl/vTi9dfuZVjyWz7U2rIUTwRpw1Pc +oZtdUF/cq3FOKm3K456bvMPmc03RwHoRwSZEa1jsZCgcsLnRTk7GOKsKRUF2vDMLG+Q NqLfj/5RUz4PU3aiuCVIgOyEiO1Lwek7P6kqYD+blp5I4JjiKv5rvii9LuxwUCOepnOS QnFZ/69jcl3yHI73rLpZRgI+14Z59jChuLE8wVe2P53CQPU4aAgjYY6mXtBlBnfCSHhE Iwj7TF1BcHx78YsCgZHXLs+4tWHf+EJpHvBH9a5UibvaC5jakCJ+7azbnnr7CwMSny0S Vtfg== X-Gm-Message-State: ABy/qLaGQFKQoAb40x/NxvbmQFo4LLIk/ARWD00P8CYo9EfxAW028v5y ErfBHliQOFlPS0eFo4wi+BSEzHtdp+bh9gNuDzRAHxipoDwYyNyynL5nGey06YvruEYJIBGVTzv zZV5zSIDnWBGgARypvBDagZxzLoACt8s/QPQTOpejAF1vNTxobZDeViM++qGdPRPyK4pfL2Wrhd 8= X-Received: by 2002:a05:6a21:340a:b0:12d:4b00:fb07 with SMTP id yn10-20020a056a21340a00b0012d4b00fb07mr13636148pzb.39.1688558381878; Wed, 05 Jul 2023 04:59:41 -0700 (PDT) X-Google-Smtp-Source: APBJJlFR4CQCfq3P0HlJE7grax0HCVTzK+IgbtLmsPJ0yKc5KLzK8qugovYr/tldKmT7JrzEL3hrDw== X-Received: by 2002:a05:6a21:340a:b0:12d:4b00:fb07 with SMTP id yn10-20020a056a21340a00b0012d4b00fb07mr13636136pzb.39.1688558381532; Wed, 05 Jul 2023 04:59:41 -0700 (PDT) Received: from localhost.localdomain ([115.96.119.220]) by smtp.googlemail.com with ESMTPSA id v3-20020a1709028d8300b001b89c313185sm4878852plo.205.2023.07.05.04.59.39 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 05 Jul 2023 04:59:41 -0700 (PDT) From: Ani Sinha To: qemu-devel@nongnu.org, "Michael S. Tsirkin" , Igor Mammedov , Ani Sinha Subject: [PATCH v8 3/6] tests/acpi/bios-tables-test: update acpi blob q35/DSDT.noacpihp Date: Wed, 5 Jul 2023 17:29:21 +0530 Message-Id: <20230705115925.5339-4-anisinha@redhat.com> X-Mailer: git-send-email 2.39.1 In-Reply-To: <20230705115925.5339-1-anisinha@redhat.com> References: <20230705115925.5339-1-anisinha@redhat.com> MIME-Version: 1.0 Received-SPF: pass client-ip=170.10.133.124; envelope-from=anisinha@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H4=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Some fixes were committed in bios-tables-test in the previous commit. Update the acpi blob and clear bios-tables-test-allowed-diff.h so that the test continues to pass with the changes in the bios-tables-test. Following is the asl diff between the old and the newly updated blob: @@ -1,30 +1,30 @@ /* * Intel ACPI Component Architecture * AML/ASL+ Disassembler version 20210604 (64-bit version) * Copyright (c) 2000 - 2021 Intel Corporation * * Disassembling to symbolic ASL+ operators * - * Disassembly of tests/data/acpi/q35/DSDT.noacpihp, Wed Jun 21 18:26:52 2023 + * Disassembly of /tmp/aml-O8SU61, Wed Jun 21 18:26:52 2023 * * Original Table Header: * Signature "DSDT" - * Length 0x00002038 (8248) + * Length 0x00002031 (8241) * Revision 0x01 **** 32-bit table (V1), no 64-bit math support - * Checksum 0x4A + * Checksum 0x89 * OEM ID "BOCHS " * OEM Table ID "BXPC " * OEM Revision 0x00000001 (1) * Compiler ID "BXPC" * Compiler Version 0x00000001 (1) */ DefinitionBlock ("", "DSDT", 1, "BOCHS ", "BXPC ", 0x00000001) { Scope (\) { OperationRegion (DBG, SystemIO, 0x0402, One) Field (DBG, ByteAcc, NoLock, Preserve) { DBGB, 8 } @@ -3148,48 +3148,48 @@ { Name (_ADR, Zero) // _ADR: Address Method (_DSM, 4, Serialized) // _DSM: Device-Specific Method { Local0 = Package (0x01) { 0x01F5 } Return (EDSM (Arg0, Arg1, Arg2, Arg3, Local0)) } } } Device (S40) { Name (_ADR, 0x00080000) // _ADR: Address - Device (S41) + Device (S01) { - Name (_ADR, 0x00080001) // _ADR: Address + Name (_ADR, One) // _ADR: Address Method (_DSM, 4, Serialized) // _DSM: Device-Specific Method { Local0 = Package (0x01) { 0x0259 } Return (EDSM (Arg0, Arg1, Arg2, Arg3, Local0)) } } - Device (S48) + Device (S02) { - Name (_ADR, 0x00090000) // _ADR: Address + Name (_ADR, 0x02) // _ADR: Address Device (S00) { Name (_ADR, Zero) // _ADR: Address } } } Device (SF8) { Name (_ADR, 0x001F0000) // _ADR: Address OperationRegion (PIRQ, PCI_Config, 0x60, 0x0C) Scope (\_SB) { Field (PCI0.SF8.PIRQ, ByteAcc, NoLock, Preserve) { PRQA, 8, Signed-off-by: Ani Sinha Acked-by: Igor Mammedov --- tests/data/acpi/q35/DSDT.noacpihp | Bin 8248 -> 8241 bytes tests/qtest/bios-tables-test-allowed-diff.h | 1 - 2 files changed, 1 deletion(-) diff --git a/tests/data/acpi/q35/DSDT.noacpihp b/tests/data/acpi/q35/DSDT.noacpihp index 6ab1f0e52543fcb7f84a7fd1327fe5aa42010565..8cab2f8eb9ae94e0165f3f17857ec7d080fb0e13 100644 GIT binary patch delta 109 zcmdntu+f3bCDi)r&-xoSoL DyqFtK delta 94 zcmdn!u)~4NCD X-Patchwork-Id: 1803565 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=nongnu.org (client-ip=209.51.188.17; helo=lists.gnu.org; envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=) Authentication-Results: legolas.ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=redhat.com header.i=@redhat.com header.a=rsa-sha256 header.s=mimecast20190719 header.b=FtML/0+J; dkim-atps=neutral Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4Qwytg1ZSlz20Pf for ; Wed, 5 Jul 2023 22:01:31 +1000 (AEST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qH1BY-0006wP-OE; Wed, 05 Jul 2023 08:00:40 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qH1BF-0006c6-Gx for qemu-devel@nongnu.org; Wed, 05 Jul 2023 08:00:30 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.129.124]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qH1BD-0001Nx-Re for qemu-devel@nongnu.org; Wed, 05 Jul 2023 08:00:21 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1688558419; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=uCCjtwSbbFETTKSsmt5af6YgxkBnyGQ+Ywb1vZBrF3g=; b=FtML/0+Jqrlw45Ie0B0fPwQHb82833E+rGQn0423mcGjKuBG/pF3cTWVW2hsZOgSIcIPKq 4nj340+Q5BAZT0KMSUCom/TqPPfjAej/H76inotX9zOf/74UyZWWrNJa4KtafvJgo2eUuN br5X9Wfhie6kEaiXZ9hdNXeA0eq6fMs= Received: from mail-pg1-f197.google.com (mail-pg1-f197.google.com [209.85.215.197]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-537-v1i_HbBiP127zbvP0iCYwA-1; Wed, 05 Jul 2023 08:00:07 -0400 X-MC-Unique: v1i_HbBiP127zbvP0iCYwA-1 Received: by mail-pg1-f197.google.com with SMTP id 41be03b00d2f7-55b9ed8275aso3142642a12.1 for ; Wed, 05 Jul 2023 04:59:59 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1688558385; x=1691150385; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=uCCjtwSbbFETTKSsmt5af6YgxkBnyGQ+Ywb1vZBrF3g=; b=KRg/gz73VxX8Tvoyv05JYHsnTd5C5T7Tk3laDmqQ9PIbl//5XfNMPhIcODPqpAeJKr 85mnuTE7LZrpzm5WaA3cGcm/u5Ll/D/2wKMv0HLT35XfZsyUGwwMBPd8GXpvlJwGDfhQ aYdH5s/Zbu3MibNHnREHiFIx9H/4QSKoGMP4DTgGSlg9M6jYiUAZ4Ei4e9Qv1FY6ahVE HiKkdoGVYbjgTaqzFaz1vKemK8BNb8Tv8B/Yj47gmGJMqSdjde9+ss4IGsdH9v23yjPZ JekPOeULLTPNGsb/3uIyAM/ahFcBJZrFKl30ix1dvLZk039G3nNfz93EPHR6QqkD+leK AWrw== X-Gm-Message-State: ABy/qLZd4if+jC/igRcWaDvwgOZwwZLCWm+807KP/oeD9boxb42ZAYo7 +GWoExo+6ZEFKLzT3Oc6bL0i+aAFjG5e0ScXSBsB4IMFTIzQxjncSmGgmuk9WsO8Gs45MnpAydM pSV0ootrfuLOw6rPjEkkZpj3WY+84P1Xzouc9dlokC09YoryovGzy0d6FUK5O8IF0XRIak0OKAr 4= X-Received: by 2002:a05:6a20:a5a8:b0:12e:ab62:c94 with SMTP id bc40-20020a056a20a5a800b0012eab620c94mr5211697pzb.49.1688558385465; Wed, 05 Jul 2023 04:59:45 -0700 (PDT) X-Google-Smtp-Source: APBJJlE/ZStnEwHOscSISZVvl414hGCzJ5pQ2nVe/+3BpMLf8vvZ1l+QCX0VqsQO6m87exoCgsVPVQ== X-Received: by 2002:a05:6a20:a5a8:b0:12e:ab62:c94 with SMTP id bc40-20020a056a20a5a800b0012eab620c94mr5211681pzb.49.1688558385017; Wed, 05 Jul 2023 04:59:45 -0700 (PDT) Received: from localhost.localdomain ([115.96.119.220]) by smtp.googlemail.com with ESMTPSA id v3-20020a1709028d8300b001b89c313185sm4878852plo.205.2023.07.05.04.59.41 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 05 Jul 2023 04:59:44 -0700 (PDT) From: Ani Sinha To: qemu-devel@nongnu.org, Thomas Huth , Laurent Vivier , Paolo Bonzini Cc: Ani Sinha , mst@redhat.com, imammedo@redhat.com, Michael Labiuk Subject: [PATCH v8 4/6] tests/qtest/hd-geo-test: fix incorrect pcie-root-port usage and simplify test Date: Wed, 5 Jul 2023 17:29:22 +0530 Message-Id: <20230705115925.5339-5-anisinha@redhat.com> X-Mailer: git-send-email 2.39.1 In-Reply-To: <20230705115925.5339-1-anisinha@redhat.com> References: <20230705115925.5339-1-anisinha@redhat.com> MIME-Version: 1.0 Received-SPF: pass client-ip=170.10.129.124; envelope-from=anisinha@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H4=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org The test attaches a SCSI controller to a non-zero slot and a pcie-to-pci bridge on slot 0 on the same pcie-root-port. Since a downstream device can be attached to a pcie-root-port only on slot 0, the above test configuration is not allowed. Additionally using pcie.0 as id for pcie-to-pci bridge is incorrect as that id is reserved only for the root bus. In the test scenario, there is no need to attach a pcie-root-port to the root complex. A SCSI controller can be attached to a pcie-to-pci bridge which can then be directly attached to the root bus (pcie.0). Fix the test and simplify it. CC: mst@redhat.com CC: imammedo@redhat.com CC: Michael Labiuk Acked-by: Thomas Huth Reviewed-by: Igor Mammedov Signed-off-by: Ani Sinha --- tests/qtest/hd-geo-test.c | 18 ++++++++---------- 1 file changed, 8 insertions(+), 10 deletions(-) diff --git a/tests/qtest/hd-geo-test.c b/tests/qtest/hd-geo-test.c index 5aa258a2b3..d08bffad91 100644 --- a/tests/qtest/hd-geo-test.c +++ b/tests/qtest/hd-geo-test.c @@ -784,14 +784,12 @@ static void test_override_scsi(void) test_override(args, "pc", expected); } -static void setup_pci_bridge(TestArgs *args, const char *id, const char *rootid) +static void setup_pci_bridge(TestArgs *args, const char *id) { - char *root, *br; - root = g_strdup_printf("-device pcie-root-port,id=%s", rootid); - br = g_strdup_printf("-device pcie-pci-bridge,bus=%s,id=%s", rootid, id); + char *br; + br = g_strdup_printf("-device pcie-pci-bridge,bus=pcie.0,id=%s", id); - args->argc = append_arg(args->argc, args->argv, ARGV_SIZE, root); args->argc = append_arg(args->argc, args->argv, ARGV_SIZE, br); } @@ -811,8 +809,8 @@ static void test_override_scsi_q35(void) add_drive_with_mbr(args, empty_mbr, 1); add_drive_with_mbr(args, empty_mbr, 1); add_drive_with_mbr(args, empty_mbr, 1); - setup_pci_bridge(args, "pcie.0", "br"); - add_scsi_controller(args, "lsi53c895a", "br", 3); + setup_pci_bridge(args, "pcie-pci-br"); + add_scsi_controller(args, "lsi53c895a", "pcie-pci-br", 3); add_scsi_disk(args, 0, 0, 0, 0, 0, 10000, 120, 30); add_scsi_disk(args, 1, 0, 0, 1, 0, 9000, 120, 30); add_scsi_disk(args, 2, 0, 0, 2, 0, 1, 0, 0); @@ -868,9 +866,9 @@ static void test_override_virtio_blk_q35(void) }; add_drive_with_mbr(args, empty_mbr, 1); add_drive_with_mbr(args, empty_mbr, 1); - setup_pci_bridge(args, "pcie.0", "br"); - add_virtio_disk(args, 0, "br", 3, 10000, 120, 30); - add_virtio_disk(args, 1, "br", 4, 9000, 120, 30); + setup_pci_bridge(args, "pcie-pci-br"); + add_virtio_disk(args, 0, "pcie-pci-br", 3, 10000, 120, 30); + add_virtio_disk(args, 1, "pcie-pci-br", 4, 9000, 120, 30); test_override(args, "q35", expected); } From patchwork Wed Jul 5 11:59:23 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ani Sinha X-Patchwork-Id: 1803562 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=nongnu.org (client-ip=209.51.188.17; helo=lists.gnu.org; envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=) Authentication-Results: legolas.ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=redhat.com header.i=@redhat.com header.a=rsa-sha256 header.s=mimecast20190719 header.b=RdvUCyHJ; dkim-atps=neutral Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4QwysP4mdrz20by for ; Wed, 5 Jul 2023 22:00:25 +1000 (AEST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qH1Ap-0006Kv-FZ; Wed, 05 Jul 2023 07:59:55 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qH1An-0006KL-QW for qemu-devel@nongnu.org; Wed, 05 Jul 2023 07:59:53 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.133.124]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qH1Am-00012L-7Y for qemu-devel@nongnu.org; Wed, 05 Jul 2023 07:59:53 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1688558391; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=3mpYxydYLCCyJPDsQ/wBoNchM063w/3npouA7+lTogQ=; b=RdvUCyHJx9I9xLySLbgK4Ek5hSoaqfRdel5sLplRa5uU9pxYBF7SbNQCbmCoNlnXIriT5g HpEqapc+HjBtcy1nQ7OgJ9HZPqehCN7zDwl4o37vGZ51yQCTnOfMvvpD2bwaKcc79yIjTH 5UzdiuxQIaCjxRAgXGg8A2v6Jtx/5S8= Received: from mail-pl1-f197.google.com (mail-pl1-f197.google.com [209.85.214.197]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-640-60iBBCjCMyqpkkhIy_n9QQ-1; Wed, 05 Jul 2023 07:59:50 -0400 X-MC-Unique: 60iBBCjCMyqpkkhIy_n9QQ-1 Received: by mail-pl1-f197.google.com with SMTP id d9443c01a7336-1b81ec07321so71607215ad.3 for ; Wed, 05 Jul 2023 04:59:49 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1688558388; x=1691150388; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=3mpYxydYLCCyJPDsQ/wBoNchM063w/3npouA7+lTogQ=; b=Q2ImK1Z862YTzacakvsOoizdPiCZUnQOHrPi2E9UPvj9Qxkl0Wuj6MlLWgDLNW7EN+ RngejAjw1vcvpQWvwZOcQEC7c52dTU3rG76uD8cx+8Tx7vBpVwocRDOCDfnqUeMrBeP1 OJbqc5oJ7Rphuz3+ZV3RFIbY3aLOt8ixAuFYCK1sn42dUb5FbvvxZva2wDgFk9Yrd6Fi 7qLkjx7ut5/hCvNYRvBR/pWriRHy9luRaE3Y0QcqY+CMJmArRx14E3E9OWAVlWLKQWvT FgzFyyTRJzUx3aWkbDwWqg4tobmv6zQ8VrJ1d1zUq0+eueOjAIQY2xrV+GqRWrHXRXQ9 oUmQ== X-Gm-Message-State: ABy/qLb9M00h7PmyKJ1iu79DoXKxC78m9OU3H/I3Byd5cCoVn9RSTcZO 1UAjsrLSHMHFldAW7XAwSCjCcJerYuhEncvu6gODVSe6jaLid5yQURc3guJznc9LirEr3vjMNwP 9wp9u5LIEC9/ppIj3wiFPdfB4FQeNCHvNYOvo/+q1pqCfBqAdWH959gq7SfdcCJbWP5Ld9r9Wgk s= X-Received: by 2002:a17:903:2441:b0:1b7:f443:c7f8 with SMTP id l1-20020a170903244100b001b7f443c7f8mr16057548pls.15.1688558388657; Wed, 05 Jul 2023 04:59:48 -0700 (PDT) X-Google-Smtp-Source: APBJJlGv7me6t21A6XYhI2KaOoRbn2pdHHaG9XEmruPfxQ52MCK1aoHInPHbbphB506yjd4VtreRug== X-Received: by 2002:a17:903:2441:b0:1b7:f443:c7f8 with SMTP id l1-20020a170903244100b001b7f443c7f8mr16057523pls.15.1688558388309; Wed, 05 Jul 2023 04:59:48 -0700 (PDT) Received: from localhost.localdomain ([115.96.119.220]) by smtp.googlemail.com with ESMTPSA id v3-20020a1709028d8300b001b89c313185sm4878852plo.205.2023.07.05.04.59.45 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 05 Jul 2023 04:59:47 -0700 (PDT) From: Ani Sinha To: qemu-devel@nongnu.org, "Michael S. Tsirkin" , Marcel Apfelbaum Cc: Ani Sinha , jusual@redhat.com, imammedo@redhat.com, akihiko.odaki@daynix.com Subject: [PATCH v8 5/6] hw/pci: warn when PCIe device is plugged into non-zero slot of downstream port Date: Wed, 5 Jul 2023 17:29:23 +0530 Message-Id: <20230705115925.5339-6-anisinha@redhat.com> X-Mailer: git-send-email 2.39.1 In-Reply-To: <20230705115925.5339-1-anisinha@redhat.com> References: <20230705115925.5339-1-anisinha@redhat.com> MIME-Version: 1.0 Received-SPF: pass client-ip=170.10.133.124; envelope-from=anisinha@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H4=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org PCIe downstream ports only have a single device 0, so PCI Express devices can only be plugged into slot 0 on a PCIe port. Add a warning to let users know when the invalid configuration is used. We may enforce this more strongly later once we get more clarity on whether we are introducing a bad regression for users currently using the wrong configuration. The change has been tested to not break or alter behaviors of ARI capable devices by instantiating seven vfs on an emulated igb device (the maximum number of vfs the igb device supports). The vfs are instantiated correctly and are seen to have non-zero device/slot numbers in the conventional PCI BDF representation. CC: jusual@redhat.com CC: imammedo@redhat.com CC: mst@redhat.com CC: akihiko.odaki@daynix.com Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=2128929 Signed-off-by: Ani Sinha Reviewed-by: Julia Suvorova Reviewed-by: Akihiko Odaki --- hw/pci/pci.c | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/hw/pci/pci.c b/hw/pci/pci.c index e2eb4c3b4a..62b393dfb7 100644 --- a/hw/pci/pci.c +++ b/hw/pci/pci.c @@ -65,6 +65,7 @@ bool pci_available = true; static char *pcibus_get_dev_path(DeviceState *dev); static char *pcibus_get_fw_dev_path(DeviceState *dev); static void pcibus_reset(BusState *qbus); +static bool pcie_has_upstream_port(PCIDevice *dev); static Property pci_props[] = { DEFINE_PROP_PCI_DEVFN("addr", PCIDevice, devfn, -1), @@ -2121,6 +2122,25 @@ static void pci_qdev_realize(DeviceState *qdev, Error **errp) } } + /* + * A PCIe Downstream Port that do not have ARI Forwarding enabled must + * associate only Device 0 with the device attached to the bus + * representing the Link from the Port (PCIe base spec rev 4.0 ver 0.3, + * sec 7.3.1). + * With ARI, PCI_SLOT() can return non-zero value as the traditional + * 5-bit Device Number and 3-bit Function Number fields in its associated + * Routing IDs, Requester IDs and Completer IDs are interpreted as a + * single 8-bit Function Number. Hence, ignore ARI capable devices. + */ + if (pci_is_express(pci_dev) && + !pcie_find_capability(pci_dev, PCI_EXT_CAP_ID_ARI) && + pcie_has_upstream_port(pci_dev) && + PCI_SLOT(pci_dev->devfn)) { + warn_report("PCI: slot %d is not valid for %s," + " parent device only allows plugging into slot 0.", + PCI_SLOT(pci_dev->devfn), pci_dev->name); + } + if (pci_dev->failover_pair_id) { if (!pci_bus_is_express(pci_get_bus(pci_dev))) { error_setg(errp, "failover primary device must be on " From patchwork Wed Jul 5 11:59:25 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ani Sinha X-Patchwork-Id: 1803561 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=nongnu.org (client-ip=209.51.188.17; helo=lists.gnu.org; envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=) Authentication-Results: legolas.ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=redhat.com header.i=@redhat.com header.a=rsa-sha256 header.s=mimecast20190719 header.b=XfOB253v; dkim-atps=neutral Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4QwysP4DPkz20bL for ; Wed, 5 Jul 2023 22:00:25 +1000 (AEST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qH1At-0006MY-Pl; Wed, 05 Jul 2023 07:59:59 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qH1As-0006MM-Cu for qemu-devel@nongnu.org; Wed, 05 Jul 2023 07:59:58 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.129.124]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qH1Aq-000138-Us for qemu-devel@nongnu.org; Wed, 05 Jul 2023 07:59:58 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1688558396; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=OXw8vJ2Z6H1k/M0qb77qhRA9FHdNbZ/XkMQEvdiJIkU=; b=XfOB253vSoRQ0tOrr7OMvZ0iX9iPY836HyJeCWbX88wT6IaC70kSAFhBPNWl8+gboxkf/2 0SXI+PnJMOX+PBi69sXldbaKGZTtmrCxvmxPqc2ZpZDZ/xaVeGJM5BrfmcWP2v7HHAfHF4 a5c95qvILd5JL5sVHfytdcxedPLDNgg= Received: from mail-pg1-f199.google.com (mail-pg1-f199.google.com [209.85.215.199]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-657-EXaI0TePNUGT0hBfLIMonA-1; Wed, 05 Jul 2023 07:59:55 -0400 X-MC-Unique: EXaI0TePNUGT0hBfLIMonA-1 Received: by mail-pg1-f199.google.com with SMTP id 41be03b00d2f7-5578082558eso6318146a12.1 for ; Wed, 05 Jul 2023 04:59:54 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1688558393; x=1691150393; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=OXw8vJ2Z6H1k/M0qb77qhRA9FHdNbZ/XkMQEvdiJIkU=; b=C8IPWpSkoKztTXH9nZl/aBWy42OqbKfuRcPAithvEQCbBqCTNDEKoHw3IIHp9dePU5 OfAyAj7bknKzSRY+IA7YNbfz+wmXpZDU+ayUNWF3Qfvqe2SNAmq9VmqWr3Bm0xW4KtbD C2YcOBzzmM3LarNqxVHN3jhgOsjq0TJfUR4MLqyBi5Lon6Gh+AXu70gqcF8B0h9LPHNE Xbw2pdBmoiDlyoIHI3ZDZF0eLkc9Sf78Tr8c7m9eN3QWbaEgMGEBjC+2h7MfV4BLQxeK oRQv13vyQQ+yCjAhMseXzR6fXeCeJneKqE/vKCTRPCSy1FLPDcOl+kKexyWjDsJsWfUc dCrA== X-Gm-Message-State: ABy/qLZn+lztJfvzj0EM4zBxwI9EeIqw57kh++0iTLzE/oAObUPeurFj vGL8YcYHQ6/KiBzEOqIMp/wwItZgDqVEohgM9s7kwkIn2YllvecGyFnUaWYe7rrXvaH7X7/zzc0 f3U3+o2S6NJkYCwIvZaMFua2XEzgcOmSXpNCZC1SaPi84YyhzMljJX8SV2pCuv6vyc+UJt0+wXP k= X-Received: by 2002:a17:902:e808:b0:1b8:b46d:91b7 with SMTP id u8-20020a170902e80800b001b8b46d91b7mr420346plg.45.1688558393597; Wed, 05 Jul 2023 04:59:53 -0700 (PDT) X-Google-Smtp-Source: APBJJlFMYO/DrpoJnJ6AHxKRs8ctEPV/TxH6d0wDxQJ/4px4GAoCOVRYdn6E8D78Hvlm6vZ0j9w1qA== X-Received: by 2002:a17:902:e808:b0:1b8:b46d:91b7 with SMTP id u8-20020a170902e80800b001b8b46d91b7mr420334plg.45.1688558393267; Wed, 05 Jul 2023 04:59:53 -0700 (PDT) Received: from localhost.localdomain ([115.96.119.220]) by smtp.googlemail.com with ESMTPSA id v3-20020a1709028d8300b001b89c313185sm4878852plo.205.2023.07.05.04.59.51 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 05 Jul 2023 04:59:52 -0700 (PDT) From: Ani Sinha To: qemu-devel@nongnu.org, "Michael S. Tsirkin" , Marcel Apfelbaum Cc: Ani Sinha Subject: [PATCH v8 6/6] hw/pci: add comment to explain checking for available function 0 in pci hotplug Date: Wed, 5 Jul 2023 17:29:25 +0530 Message-Id: <20230705115925.5339-8-anisinha@redhat.com> X-Mailer: git-send-email 2.39.1 In-Reply-To: <20230705115925.5339-1-anisinha@redhat.com> References: <20230705115925.5339-1-anisinha@redhat.com> MIME-Version: 1.0 Received-SPF: pass client-ip=170.10.129.124; envelope-from=anisinha@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H4=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org This change is cosmetic. A comment is added explaining why we need to check for the availability of function 0 when we hotplug a device. CC: mst@redhat.com Signed-off-by: Ani Sinha --- hw/pci/pci.c | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/hw/pci/pci.c b/hw/pci/pci.c index 62b393dfb7..7aee3a7f12 100644 --- a/hw/pci/pci.c +++ b/hw/pci/pci.c @@ -1181,9 +1181,14 @@ static PCIDevice *do_pci_register_device(PCIDevice *pci_dev, PCI_SLOT(devfn), PCI_FUNC(devfn), name, bus->devices[devfn]->name, bus->devices[devfn]->qdev.id); return NULL; - } else if (dev->hotplugged && - !pci_is_vf(pci_dev) && - pci_get_function_0(pci_dev)) { + } /* + * Populating function 0 triggers a scan from the guest that + * exposes other non-zero functions. Hence we need to ensure that + * function 0 wasn't added yet. + */ + else if (dev->hotplugged && + !pci_is_vf(pci_dev) && + pci_get_function_0(pci_dev)) { error_setg(errp, "PCI: slot %d function 0 already occupied by %s," " new func %s cannot be exposed to guest.", PCI_SLOT(pci_get_function_0(pci_dev)->devfn),