From patchwork Mon Jun 26 13:53: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: 13292949 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id E8269EB64DC for ; Mon, 26 Jun 2023 13:54:19 +0000 (UTC) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qDmf0-0004uK-Qc; Mon, 26 Jun 2023 09:53: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 1qDmey-0004ty-QR for qemu-devel@nongnu.org; Mon, 26 Jun 2023 09:53:40 -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 1qDmex-00060Y-Dx for qemu-devel@nongnu.org; Mon, 26 Jun 2023 09:53:40 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1687787618; 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=aoavmDNcvUsp0v3InvUigtaqa+5hNRO0IYRFmEmStc76VXnwl0mXT6U3dUnvw4qCsxPI9S k/posucVPQ+/P1eU6RvrnKVMHT6IIwYtxq6q9dVCiv39f1siFG1URZMegf3PCTdluQxElW LnU3CPtMGGKKwkWnnryLNVC/YH3hmpA= 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-191-gR46rx7GOI6BLgiL97-RFQ-1; Mon, 26 Jun 2023 09:53:37 -0400 X-MC-Unique: gR46rx7GOI6BLgiL97-RFQ-1 Received: by mail-pl1-f200.google.com with SMTP id d9443c01a7336-1b7f8598d5aso13791935ad.0 for ; Mon, 26 Jun 2023 06:53:37 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1687787616; x=1690379616; 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=iyynXIHpdnPBtS5Rs9RpIm6YexLYDlPoaUWaMbfk+VsekhbvJPLjmawBlu2UhJZREY tb5019/XPVyow5Q90i2V26Nd2RyJCAd02cFoAecZ8/vPisis+7fwHiXaPDUui0X8tE2o 3bM/AEWAiJQ0qxX2ih+SlowsafytCQB179X0RE15ZA/fqfTP5YxeVu5XshpKwuV4G5dk mEGAhCjSXjzQLXXHq2EfY/SkvBkMkCEFiQs89yg5p/62l0wVCZIS6fL8DiSOfyR774nP 9kdXDeA4jgo296A2ilRLoinDJx/RhVWcsr90Tz6KejMXL0Lgmg64Kq6BzfvmaKsnG8VR Xr7Q== X-Gm-Message-State: AC+VfDyI9dtIpsMFeUADiFYigvWr5bRyrVp0zR5FrmH/Y370sOflaM9G q6B6an9y8s+P9y43uUEwM76y4oX+B/9G29EB76nlXtXIvTRP5EL3KRkvJaeQOP0tjqIyAGnXunv Mue9sNw32isXOHJIubFoTCl8MECFpn9RgitAO04Moapq4creQAMuvzvd2u8rtvpeJHjTG6cm6M0 4= X-Received: by 2002:a17:902:7402:b0:1b2:28ca:d16 with SMTP id g2-20020a170902740200b001b228ca0d16mr6664663pll.44.1687787615774; Mon, 26 Jun 2023 06:53:35 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ7QcZWRRwaEvhVR2FrvtmEVWyYQtImevSht5iiMOjlUN4L4fXr1KWY2fkjy+mP4ATfo1cYi8g== X-Received: by 2002:a17:902:7402:b0:1b2:28ca:d16 with SMTP id g2-20020a170902740200b001b228ca0d16mr6664649pll.44.1687787615407; Mon, 26 Jun 2023 06:53:35 -0700 (PDT) Received: from localhost.localdomain ([115.96.139.77]) by smtp.googlemail.com with ESMTPSA id w7-20020a170902904700b001b809082a69sm1559621plz.235.2023.06.26.06.53.32 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 26 Jun 2023 06:53:34 -0700 (PDT) From: Ani Sinha To: qemu-devel@nongnu.org, "Michael S. Tsirkin" , Igor Mammedov , Ani Sinha Subject: [PATCH v4 1/5] tests/acpi: allow changes in DSDT.noacpihp table blob Date: Mon, 26 Jun 2023 19:23:20 +0530 Message-Id: <20230626135324.10687-2-anisinha@redhat.com> X-Mailer: git-send-email 2.39.1 In-Reply-To: <20230626135324.10687-1-anisinha@redhat.com> References: <20230626135324.10687-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_H5=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+qemu-devel=archiver.kernel.org@nongnu.org Sender: qemu-devel-bounces+qemu-devel=archiver.kernel.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 Mon Jun 26 13:53: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: 13292951 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id CC5E7EB64DD for ; Mon, 26 Jun 2023 13:54:31 +0000 (UTC) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qDmf2-0004vM-DY; Mon, 26 Jun 2023 09:53:44 -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 1qDmf1-0004v7-Eg for qemu-devel@nongnu.org; Mon, 26 Jun 2023 09:53:43 -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 1qDmez-00060n-Vk for qemu-devel@nongnu.org; Mon, 26 Jun 2023 09:53:43 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1687787621; 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=NE7+py0WvtL9aJXm9eOQPW5I2il1GrZBbkvLbVE/UfTbYTzkM1fbZgUYaYl0kvOmZduAin L+Zmm5aHvCAvlDyn/4Vrk4HWK2Kbivoj7IzJ03F77nT10RlGHLUYpQLwBGWpGZiwkW9DXB /52E6EyzsDJjRYBBbT4LMgp1NCTDR5w= 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-26-YWkOEMxdOX-tpVSpGWLlxg-1; Mon, 26 Jun 2023 09:53:39 -0400 X-MC-Unique: YWkOEMxdOX-tpVSpGWLlxg-1 Received: by mail-pl1-f200.google.com with SMTP id d9443c01a7336-1b7d5826f1fso6263225ad.3 for ; Mon, 26 Jun 2023 06:53:39 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1687787618; x=1690379618; 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=CEUXtdwc22eekikzzMBn9Ksh45e1W5tLc4kdzFfCSpCkDNeHCXh0nL2KLcUGaDx+tO sylItwI2VJFbE1Uzdrwytbi0cnAdVXxnn6aJEPK9K9NkS2GghHD9OGKXy6fJ/Of9c3hy BApVONc2JDTTh3P2747Fk7MtQ1ZGZP02XfflyHeLtwxDHzcpg6aPoCO5b30leKKR2/NQ XFCv/wFePxO7StO3ip9ruThFt/MX/tCSJZZ8gp1I59z8hEpg+E1S1BQ9E8YNlAboj50/ hSRDu5EPTRuyKhewDk8hO2zYtoeZQdzxDAz6k7DxhD1vr65ZLysjq/6a8tSq1wvaWcI5 Ndjw== X-Gm-Message-State: AC+VfDwRVF+9+UIe5Ge/hCXtNo0ULcK9HkvNWDSjTx6QdQxJj5hpAlNK t/duGD55qYSYrU6AM4VyIfmD+6PtZqMEaQ0i/S+TG2bAAQH/YJxvWo7r7YIgDMMiqtKkbFIz7/V x3HvcGRWRmIgthqZ2IOM6BDEPRm6cDqb60TwGuZvScsV4aEDAYwfDjCaaxdPj2s9XnRZsQVqK7b I= X-Received: by 2002:a17:902:d2c1:b0:1b1:e6a4:2797 with SMTP id n1-20020a170902d2c100b001b1e6a42797mr3636783plc.45.1687787618110; Mon, 26 Jun 2023 06:53:38 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ4aiaoRQGIwAM6zeVHikS+Ze+zpVv7Gnbe0OTlYy/MtDepGpH8euMzBLwUA1MBf4zU3CF/Vag== X-Received: by 2002:a17:902:d2c1:b0:1b1:e6a4:2797 with SMTP id n1-20020a170902d2c100b001b1e6a42797mr3636767plc.45.1687787617782; Mon, 26 Jun 2023 06:53:37 -0700 (PDT) Received: from localhost.localdomain ([115.96.139.77]) by smtp.googlemail.com with ESMTPSA id w7-20020a170902904700b001b809082a69sm1559621plz.235.2023.06.26.06.53.35 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 26 Jun 2023 06:53:37 -0700 (PDT) From: Ani Sinha To: qemu-devel@nongnu.org, "Michael S. Tsirkin" , Igor Mammedov , Ani Sinha Subject: [PATCH v4 2/5] tests/acpi/bios-tables-test: use the correct slot on the pcie-root-port Date: Mon, 26 Jun 2023 19:23:21 +0530 Message-Id: <20230626135324.10687-3-anisinha@redhat.com> X-Mailer: git-send-email 2.39.1 In-Reply-To: <20230626135324.10687-1-anisinha@redhat.com> References: <20230626135324.10687-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_H5=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+qemu-devel=archiver.kernel.org@nongnu.org Sender: qemu-devel-bounces+qemu-devel=archiver.kernel.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 Mon Jun 26 13:53:22 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ani Sinha X-Patchwork-Id: 13292952 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 1F20BEB64D7 for ; Mon, 26 Jun 2023 13:54:45 +0000 (UTC) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qDmf5-0004vu-6l; Mon, 26 Jun 2023 09:53:47 -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 1qDmf3-0004ve-T5 for qemu-devel@nongnu.org; Mon, 26 Jun 2023 09:53:45 -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 1qDmf2-000614-8d for qemu-devel@nongnu.org; Mon, 26 Jun 2023 09:53:45 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1687787623; 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=PNWFNWum9+imrDVpsVR7td58fOZU6Kx6kAFY+LoQ4ygyANqVeYIGFfXNnFfephutFO6rJl iXciXYnbPsCTFt6PTB6pfwgz5nJWdWQd1Ywb/ZJ7/xh17Y3Pri/oX2jYqAn8B0abXkJ7Cd 8+HYb123qORFiSGna1S94P+hZp6cjHM= 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-364-tU1-MKACNCiXK3mS2Ecbgg-1; Mon, 26 Jun 2023 09:53:42 -0400 X-MC-Unique: tU1-MKACNCiXK3mS2Ecbgg-1 Received: by mail-pl1-f200.google.com with SMTP id d9443c01a7336-1b7ea1595b4so6259545ad.2 for ; Mon, 26 Jun 2023 06:53:42 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1687787620; x=1690379620; 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=LInKo9mcwKGAtczXYgReE9F4gOlVfO8a5MyX1/fFs076Kfl8MEdOyO19nks9U7qw51 V+usAX+VQ61D707qGFyjgxKr0csd3ttUvwyKShU+U8JafFJX4fbcQQ9ar9aGUwfLJG3Z ewL6qm9XLIpARAD2q5HTVXck67HzWtzkpcQ4CDgUz89zKZJFKnyA1v+rAZKwOptFcY34 aVIk03NwFUGmEN8thY7oc7NTdzHNFbxVa0cHY+0LPWKZ5jt1AurbHyjYqJlEh2x/FT3H zqb2piHOVNivMxcVbnL1a9w0wpZ8jvNbQb6UQHR0UlYYqt4fRsI1/1UwBfK07CToB6b6 yWOQ== X-Gm-Message-State: AC+VfDyACmq7AHleMTWSb/gYoylKww6cP9t+mZFRtO0PwBeoyHohpuyH 7X3O3TE9D+qcYkJUEsV/s+FphLDQjsSyyDjnFyIyT7Yp3zS2dFtflGH6WMr65s6yDSVr3C0S3Nj IfFNmOKMonHD+vXNJP44i649vR/UTuwuOfLYCd/Bd42W1W1jrjD0/SrVV9M6IPT2gzbyBRVDI2x w= X-Received: by 2002:a17:902:db04:b0:1b8:c1f:fd2c with SMTP id m4-20020a170902db0400b001b80c1ffd2cmr1360593plx.33.1687787620586; Mon, 26 Jun 2023 06:53:40 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ6Pf2MtFi1shKNgibMtpjUpD0zVPa6Fpuwp3mcFKi90oekjGmz+Ce+T4cp7qCLhbuth93LY+g== X-Received: by 2002:a17:902:db04:b0:1b8:c1f:fd2c with SMTP id m4-20020a170902db0400b001b80c1ffd2cmr1360575plx.33.1687787620181; Mon, 26 Jun 2023 06:53:40 -0700 (PDT) Received: from localhost.localdomain ([115.96.139.77]) by smtp.googlemail.com with ESMTPSA id w7-20020a170902904700b001b809082a69sm1559621plz.235.2023.06.26.06.53.38 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 26 Jun 2023 06:53:39 -0700 (PDT) From: Ani Sinha To: qemu-devel@nongnu.org, "Michael S. Tsirkin" , Igor Mammedov , Ani Sinha Subject: [PATCH v4 3/5] tests/acpi/bios-tables-test: update acpi blob q35/DSDT.noacpihp Date: Mon, 26 Jun 2023 19:23:22 +0530 Message-Id: <20230626135324.10687-4-anisinha@redhat.com> X-Mailer: git-send-email 2.39.1 In-Reply-To: <20230626135324.10687-1-anisinha@redhat.com> References: <20230626135324.10687-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_H5=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+qemu-devel=archiver.kernel.org@nongnu.org Sender: qemu-devel-bounces+qemu-devel=archiver.kernel.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: 13292950 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 21D6FEB64D7 for ; Mon, 26 Jun 2023 13:54:27 +0000 (UTC) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qDmf9-0004yW-RL; Mon, 26 Jun 2023 09:53:51 -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 1qDmf8-0004wR-MV for qemu-devel@nongnu.org; Mon, 26 Jun 2023 09:53:50 -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 1qDmf6-00061T-05 for qemu-devel@nongnu.org; Mon, 26 Jun 2023 09:53:50 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1687787627; 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=/XOHBhIyfRJVE2rgJN6Caf1as5otkHTPFSPIm4+Yeaw=; b=U+mCldd8T9KHxNXFoc7vEQY/G+MiIqlNQ/MY+qYQGrpcut+Cr9mnebGF8Dze0pwYFBwjwG WAhzS+zYU/kTVVI/O/NYG1lRvtUkckmxW+L2ERA1EjOSMP5hcb9QyQCuChgQW+fuAfIDYF SnET1nfy/dStathEBvos24uj92adrjQ= 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-241-CmSQz2BvM8eKztQaJLcpSA-1; Mon, 26 Jun 2023 09:53:45 -0400 X-MC-Unique: CmSQz2BvM8eKztQaJLcpSA-1 Received: by mail-pl1-f200.google.com with SMTP id d9443c01a7336-1b80c1966d4so4963695ad.1 for ; Mon, 26 Jun 2023 06:53:45 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1687787624; x=1690379624; 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=/XOHBhIyfRJVE2rgJN6Caf1as5otkHTPFSPIm4+Yeaw=; b=jGLjFXzq5yS1Mh3wXSI7fhIYcx5FMLMqIrZpPbdXUwRemLqbyji1vVBirbWODvEzGF mciSVNBUwrvyVnT2Xpl738KQqzoccdm50FaPyPFNPLGwAs+kj+poU04eW9oIoP6CFYIo yjJkGXjO95rPSFun2S9/mpsnbrIcBalpCw/cAC4XSwA04kWZjgRyo2nd36x4vcvswMIW iSGR+fe9dlzSYND62a356phw+MKYYso2JmqGj35ivkRSlrP5uHaPWv8/SQENkDftL9q9 PX7KJO1/jqfvUsOmpSbG6nWU8WZKy/gG5hCj3ETH2XeLl+zfNmv/1ALd/g2E8V5UkIIJ sTlg== X-Gm-Message-State: AC+VfDyt9T+mFuoHegRd43PS7MhOb5HtL7iDwQMgZma/BU83avH83S1c 7/3aSM2hP9238nMfvVZvrcZVTerKXypcr8JJNvPXgIh0A7GbaGFVqSxp6cnJR9vZUztUnJHkwM7 5fwNwlAcNPK8cboFuJiAKIiuPz7asgXnCwB4ZeZUDXSiUGqQjprlthep5u7arXLJEGHmcSCC2hd o= X-Received: by 2002:a17:902:e5c2:b0:1b5:5162:53bd with SMTP id u2-20020a170902e5c200b001b5516253bdmr8953238plf.33.1687787623988; Mon, 26 Jun 2023 06:53:43 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ4WV7UVKWP06VYOOt+xARamBnArrb2Etbxnw4pPcrMrfCtw1pXJ+KdVfCuCaDs/wX4ntX6Vmw== X-Received: by 2002:a17:902:e5c2:b0:1b5:5162:53bd with SMTP id u2-20020a170902e5c200b001b5516253bdmr8953213plf.33.1687787623534; Mon, 26 Jun 2023 06:53:43 -0700 (PDT) Received: from localhost.localdomain ([115.96.139.77]) by smtp.googlemail.com with ESMTPSA id w7-20020a170902904700b001b809082a69sm1559621plz.235.2023.06.26.06.53.40 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 26 Jun 2023 06:53:43 -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 v4 4/5] tests/qtest/hd-geo-test: fix incorrect pcie-root-port usage and simplify test Date: Mon, 26 Jun 2023 19:23:23 +0530 Message-Id: <20230626135324.10687-5-anisinha@redhat.com> X-Mailer: git-send-email 2.39.1 In-Reply-To: <20230626135324.10687-1-anisinha@redhat.com> References: <20230626135324.10687-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_H5=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+qemu-devel=archiver.kernel.org@nongnu.org Sender: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org The test attaches both a SCSI controller and a pcie-to-pci bridge on the same pcie-root-port on slot 0. This is incorrect since a single downstream device can be attached to a non-multifunction pcie-root-port on slot 0. Additionally using pcie.0 as id for pcie-root-port 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 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 Mon Jun 26 13:53:24 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ani Sinha X-Patchwork-Id: 13292948 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 2DCC2EB64D7 for ; Mon, 26 Jun 2023 13:54:19 +0000 (UTC) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qDmfB-0004zn-HS; Mon, 26 Jun 2023 09:53:53 -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 1qDmf9-0004y1-Im for qemu-devel@nongnu.org; Mon, 26 Jun 2023 09:53:51 -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 1qDmf7-000635-WD for qemu-devel@nongnu.org; Mon, 26 Jun 2023 09:53:51 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1687787629; 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=HFaGSHVuQ/MJdrogUY2Zw/pcgRXL686O5bdoo9qhITc=; b=AcxTLy0dRE958U/kJBnMvco8LiqEKk3s4AC3uSoChnBQv1LVLaGPndh/+Kvu7aQfpfnawH 1VCXIC9oacXujKqVoslF0WiigXr43V7St09zOmnDGwPZkV2Wp6wdvSzFzeugfCkcCaqCDo dbU4Av1XwMtQjjWO1c8jp0AkdMiizYQ= 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-369-5iHjZ6niPEepNkXUruWkjw-1; Mon, 26 Jun 2023 09:53:48 -0400 X-MC-Unique: 5iHjZ6niPEepNkXUruWkjw-1 Received: by mail-pl1-f200.google.com with SMTP id d9443c01a7336-1b7ef04ddfeso6879705ad.0 for ; Mon, 26 Jun 2023 06:53:48 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1687787626; x=1690379626; 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=HFaGSHVuQ/MJdrogUY2Zw/pcgRXL686O5bdoo9qhITc=; b=Ce8Zr4tzJ58CFfaXYPupVKTw3orS8FbMSkzQWrD6e86tmg7Da/NfCywwUKFydWJBrh AAbMGcVYkZRL1h/tCbnQuZZbHbaYSImzvU9FF64PRCvyBdbF0tB5i7twiqQbrDe7rgJT BqHdWk2XCChRTILbsP1Fk73aAckKrvt3UlrMsiG1bSauyUM1GgUQEt/40AuSh+UnoDEG 2cvEGSeCwkGWdgc/GyehLbzWMxrDW7B6jAUMrL4fW1ZXCW0lQ4+JUKU6wGRUHn/BIRcS hIA3kmJZedO4NRrAr1FyFNynaLuTmi8E4auusyFhPGDkRMKgrEa6FENxMUzXokSLCFu7 r/jw== X-Gm-Message-State: AC+VfDxvtj+OiNbEUDM0eyz77t4MOHqWoE0jrmOOn/GIbw5TxvFAn18W nfCaH+8SPxAJ71ZrU6Qki0TsaKPqbO4LmDPgMAoWoft+7d715P1+sh4DqdZvemBFA2uBmcYP/iq yjXyl2ibP+0C5vZh1S989fONsAH01HnsRoOGF/kgxQoW6H6LCvXLoOzQcfEPcTurdkPpzXiotu7 Q= X-Received: by 2002:a17:902:cecd:b0:1b6:b4e5:24b with SMTP id d13-20020a170902cecd00b001b6b4e5024bmr5231326plg.10.1687787626725; Mon, 26 Jun 2023 06:53:46 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ676ehQF9Gal4RdAMuJiHww6sHAbUBfFUA3oT8djIjQGgoYDnvgwKlhyOKYjsufZdz18JQ5Xw== X-Received: by 2002:a17:902:cecd:b0:1b6:b4e5:24b with SMTP id d13-20020a170902cecd00b001b6b4e5024bmr5231312plg.10.1687787626405; Mon, 26 Jun 2023 06:53:46 -0700 (PDT) Received: from localhost.localdomain ([115.96.139.77]) by smtp.googlemail.com with ESMTPSA id w7-20020a170902904700b001b809082a69sm1559621plz.235.2023.06.26.06.53.44 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 26 Jun 2023 06:53:46 -0700 (PDT) From: Ani Sinha To: qemu-devel@nongnu.org, "Michael S. Tsirkin" , Marcel Apfelbaum Cc: Ani Sinha , jusual@redhat.com, imammedo@redhat.com Subject: [PATCH v4 5/5] hw/pci: ensure PCIE devices are plugged into only slot 0 of PCIE port Date: Mon, 26 Jun 2023 19:23:24 +0530 Message-Id: <20230626135324.10687-6-anisinha@redhat.com> X-Mailer: git-send-email 2.39.1 In-Reply-To: <20230626135324.10687-1-anisinha@redhat.com> References: <20230626135324.10687-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_H5=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+qemu-devel=archiver.kernel.org@nongnu.org Sender: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org PCI Express ports only have one slot, so PCI Express devices can only be plugged into slot 0 on a PCIE port. Enforce it. CC: jusual@redhat.com CC: imammedo@redhat.com Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=2128929 Signed-off-by: Ani Sinha Reviewed-by: Julia Suvorova --- hw/pci/pci.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/hw/pci/pci.c b/hw/pci/pci.c index bf38905b7d..426af133b0 100644 --- a/hw/pci/pci.c +++ b/hw/pci/pci.c @@ -64,6 +64,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), @@ -1189,6 +1190,11 @@ static PCIDevice *do_pci_register_device(PCIDevice *pci_dev, name); return NULL; + } else if (pcie_has_upstream_port(pci_dev) && PCI_SLOT(devfn)) { + error_setg(errp, "PCI: slot %d is not valid for %s," + " parent device only allows plugging into slot 0.", + PCI_SLOT(devfn), name); + return NULL; } pci_dev->devfn = devfn;