From patchwork Mon Jun 26 16:12:40 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ani Sinha X-Patchwork-Id: 13293116 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 BEEE9EB64D7 for ; Mon, 26 Jun 2023 16:13:38 +0000 (UTC) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qDoq9-0007SR-NL; Mon, 26 Jun 2023 12:13:22 -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 1qDoq6-0007RU-Ee for qemu-devel@nongnu.org; Mon, 26 Jun 2023 12:13:18 -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 1qDoq3-0002li-HP for qemu-devel@nongnu.org; Mon, 26 Jun 2023 12:13:16 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1687795994; 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=HhKtOoLRVBPmZ0mmPcCYBtXZXwTGStiAAmRz465EBN2OOTT9hSb6oDnMYIOXHTsoGsHu5I jc4q5AIovjU0SsPlmbAeNu1GMfLx4NA4ljCjoskmvRJIbrZuL41cZ4mMtrxapdFMwQkW1G HxV5m+uIW4Om+TJg9Q/k0Zn0AaxaMvY= Received: from mail-oa1-f70.google.com (mail-oa1-f70.google.com [209.85.160.70]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-34-PzPvsZ6xML6tb7LdqTj2Vw-1; Mon, 26 Jun 2023 12:13:10 -0400 X-MC-Unique: PzPvsZ6xML6tb7LdqTj2Vw-1 Received: by mail-oa1-f70.google.com with SMTP id 586e51a60fabf-1b00f3adde2so2950159fac.0 for ; Mon, 26 Jun 2023 09:13:10 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1687795989; x=1690387989; 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=A2FTl7TvRp2kfA61G6x3blTDkINyANRWQy8Bu+RCSjgr2dhBVuIhiLZLLRgOhZO6Uf ANqNrjRl0R0fQKdhhBlHGNcsdxCWupNb3Mht2BKYCzsTkZZHedIv+Lw5vCo9nxnB1ASm CY91M/XFX+wqLUTMhvElZTJtixkrG+7HwJNGashPJfZdwKqxfgJECAY3LMh14JiNblFA yATqn2rpU2eisc2Nx1Y+4le+NyYqQ+V9tvZC55SnL0UYPaD/6hQQHvONHnc/ZV5sVta6 aOdDX6BMEpbalukVOLwOr10j/FO4M2cjuKQ+kiTcjaBW4VIYKOFtwNYWxjJQdfJFLrLk o0ZQ== X-Gm-Message-State: AC+VfDyxGtE/0hRYa1/O8I+IU9gGDK5qQKVt24Ely6yxh1/0NLsktNHY bTztXyHmzjgCzxFQi2VpoB6xHFagcN+zLbhNWeUE3IV8TSLzuzkppJ4Uzf+Gbnoinsy+OHm/t/e kOp5B7gDR0IUF0jQ8JjlttraFhJpl84vpJTvCKpxB6E0zzoYk9VuzrEV/TiXGepDS1zMpQBNSe6 c= X-Received: by 2002:a05:6870:e7c3:b0:1a6:a547:ffe1 with SMTP id q3-20020a056870e7c300b001a6a547ffe1mr18312005oak.21.1687795989217; Mon, 26 Jun 2023 09:13:09 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ4bjq+WqqtHwwr+uVWNaWLjYJbLbT7A3WWbtlai85C9tRcTrdYCf6M85UVM2Ejqqi2V7sHeig== X-Received: by 2002:a05:6870:e7c3:b0:1a6:a547:ffe1 with SMTP id q3-20020a056870e7c300b001a6a547ffe1mr18311989oak.21.1687795988936; Mon, 26 Jun 2023 09:13:08 -0700 (PDT) Received: from localhost.localdomain ([115.96.139.77]) by smtp.googlemail.com with ESMTPSA id q5-20020a631f45000000b0051b7d83ff22sm4318745pgm.80.2023.06.26.09.13.06 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 26 Jun 2023 09:13:08 -0700 (PDT) From: Ani Sinha To: qemu-devel@nongnu.org, "Michael S. Tsirkin" , Igor Mammedov , Ani Sinha Subject: [RESEND PATCH v5 1/5] tests/acpi: allow changes in DSDT.noacpihp table blob Date: Mon, 26 Jun 2023 21:42:40 +0530 Message-Id: <20230626161244.4145-2-anisinha@redhat.com> X-Mailer: git-send-email 2.39.1 In-Reply-To: <20230626161244.4145-1-anisinha@redhat.com> References: <20230626161244.4145-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 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 16:12:41 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ani Sinha X-Patchwork-Id: 13293118 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 8638EEB64DC for ; Mon, 26 Jun 2023 16:13:56 +0000 (UTC) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qDoqL-0007UF-IB; Mon, 26 Jun 2023 12:13:33 -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 1qDoqF-0007T8-B9 for qemu-devel@nongnu.org; Mon, 26 Jun 2023 12:13:27 -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 1qDoqD-0002mW-NO for qemu-devel@nongnu.org; Mon, 26 Jun 2023 12:13:26 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1687796005; 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=Md7nMMjNi/GR9dVtBnzTNk2z7nuOOOBZfyw7z+fxSyLXrJLL2xJK8VPXie94GI/33Sh3Fq KsB5++Y/x414kMgKnotBTSGUOftWHWAgWmHBncZdYv85wRnb8L2zL4x6zXACb5wtgNiHMI oNu3yHY7Lxnh7iINEKcti6Muh2aZk6M= Received: from mail-oi1-f199.google.com (mail-oi1-f199.google.com [209.85.167.199]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-655-2S65WXZ8MzCkWdcC5ZUibA-1; Mon, 26 Jun 2023 12:13:23 -0400 X-MC-Unique: 2S65WXZ8MzCkWdcC5ZUibA-1 Received: by mail-oi1-f199.google.com with SMTP id 5614622812f47-3a1e58db5caso718870b6e.0 for ; Mon, 26 Jun 2023 09:13:23 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1687796002; x=1690388002; 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=fF9sXQNuZU5TN8iM/8XFJ+UFOaWoOWfejY3mNJcVAnj4/Q08WcgZ0kepFC150d07iR p8G3yCXpiZU28um9rVx8p5tHixl8w3NguG3aIP1H3N84pYweltLJz3sUdiP46dQlrYKu K7y6JaEAZ3TaC2nImLYtxOBu98m0lYMOGQG25awt9k82uvnDrudd+Mp206qpZNgEgoi5 31cThOlS48nFk9XvHhhmq5CnjvbK0tmkBZdx+Avs3c74CMn/qE5ZnOwnLioaifBT8uKA XrBV7gDfRTGzrCTgvzAcmGGvlBRySlMQUaqVhCu/LM/8lNda6tBd8FdO2pzz/qYY5ro2 bPFA== X-Gm-Message-State: AC+VfDxFYMeCdOcIw7DiC6ba6EuJK10CsM93i7A6i/AcDnHABFRrfDgq ExbtnElLi67KYJSAx5GL6abl7p67AfVa3XMMzfXML7i0s+otcuW5G7+zxmUuHrIrzXVWBtC0+jm JV5gwKvAYtu7796jJDcnRWdpiJADgJt4DDMmlCuWWs+TKRizar5rVl/L8iVbNWeFlBJl3KPqjSF 8= X-Received: by 2002:a05:6808:2128:b0:3a1:b4f1:26a with SMTP id r40-20020a056808212800b003a1b4f1026amr11449519oiw.52.1687796002505; Mon, 26 Jun 2023 09:13:22 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ40UbsuWKlhcvdUbIV+Np1dFfuQyKOYMruh0F2zHUcGMsTKk6aBmprQf/ck3E+x8ZWdhIbf4Q== X-Received: by 2002:a05:6808:2128:b0:3a1:b4f1:26a with SMTP id r40-20020a056808212800b003a1b4f1026amr11449492oiw.52.1687796002244; Mon, 26 Jun 2023 09:13:22 -0700 (PDT) Received: from localhost.localdomain ([115.96.139.77]) by smtp.googlemail.com with ESMTPSA id q5-20020a631f45000000b0051b7d83ff22sm4318745pgm.80.2023.06.26.09.13.20 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 26 Jun 2023 09:13:21 -0700 (PDT) From: Ani Sinha To: qemu-devel@nongnu.org, "Michael S. Tsirkin" , Igor Mammedov , Ani Sinha Subject: [RESEND PATCH v5 2/5] tests/acpi/bios-tables-test: use the correct slot on the pcie-root-port Date: Mon, 26 Jun 2023 21:42:41 +0530 Message-Id: <20230626161244.4145-3-anisinha@redhat.com> X-Mailer: git-send-email 2.39.1 In-Reply-To: <20230626161244.4145-1-anisinha@redhat.com> References: <20230626161244.4145-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 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 16:12:42 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ani Sinha X-Patchwork-Id: 13293119 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 CA092C0015E for ; Mon, 26 Jun 2023 16:14:13 +0000 (UTC) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qDoqY-0007gr-La; Mon, 26 Jun 2023 12:13:46 -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 1qDoqW-0007fr-Dd for qemu-devel@nongnu.org; Mon, 26 Jun 2023 12:13: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 1qDoqU-0002s2-7l for qemu-devel@nongnu.org; Mon, 26 Jun 2023 12:13:44 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1687796021; 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=C6BryGjjDLTFIiA4gCuQADF++/i2GBeo0HegF/Ra2JEHMd4AFPLGz6X4lx6rJOG1ko86ll /Z+2fxZQE5E3fy/epz4iwv7LLMUyW30vsCSqz3Lp6KrkhCDrHc0TDhZ2IGx2MFl1Hb2kRK ZB0q0YhS/FvpysbMDv06JXBGKp9qa3Y= Received: from mail-pf1-f198.google.com (mail-pf1-f198.google.com [209.85.210.198]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-133-BXqixwoLOkGegaY0--qczQ-1; Mon, 26 Jun 2023 12:13:35 -0400 X-MC-Unique: BXqixwoLOkGegaY0--qczQ-1 Received: by mail-pf1-f198.google.com with SMTP id d2e1a72fcca58-66871648c25so2833358b3a.1 for ; Mon, 26 Jun 2023 09:13:30 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1687796009; x=1690388009; 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=VSwwxQgWUSPJ2BW/hDkhFzCcG92GTtGpIz0FZjAlvU+Ivp2CEGxrHvFnDaIk5I3g9F dAgqXfDyTFEbLVAGHPBYaap9XghiE+16VbcWXw5efStV6Fk2gBpW5IYH/0YYFgwQAiHD Qi/akV0J8BhhPCd1C/pBE2+j4Ed3dgf791/ae39lmIx9TQL9oPldI+ORJlWlCuO6GqJD FBHglsGsLJy8F1kecWNGA7h8t2eGfSq2haCwQbGG93URf3XAOdO39Pq8+3fuqZTN9nbh ZDaSl7jpA1eS/U+zE6UHtt9FF0dIkk/F2Bm/YitaCR4jaZ415kqVIeMRRBwITKfnQBcg 10uQ== X-Gm-Message-State: AC+VfDzgjkJeJl2wyHWMkYZLkxdJODPUhelZgXu0qUz4kxXE4UjAhDUL 3QuD9O/W25C3k2I2U7hkTy7pp472jM1bhhvseG7PV5UdHpU+/M346/MkNFWTso+EnMZ0JHsw7Pv 5JDP0hONHiJH/0Ek8fKuIjR4CAlYZp2HbS7H98PzywSTMkfdWAhRodHO6o9XFbkNXjvC3C2xbNI A= X-Received: by 2002:a05:6a00:2353:b0:64c:4f2f:a235 with SMTP id j19-20020a056a00235300b0064c4f2fa235mr35384548pfj.30.1687796008814; Mon, 26 Jun 2023 09:13:28 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ6CXcoILwaWiXe9bbQwOIppEP/SmvSDLW8IPQFTgh0Krhlv2G6OQHIVnfC07tWL7rgFe4sDdw== X-Received: by 2002:a05:6a00:2353:b0:64c:4f2f:a235 with SMTP id j19-20020a056a00235300b0064c4f2fa235mr35384529pfj.30.1687796008403; Mon, 26 Jun 2023 09:13:28 -0700 (PDT) Received: from localhost.localdomain ([115.96.139.77]) by smtp.googlemail.com with ESMTPSA id q5-20020a631f45000000b0051b7d83ff22sm4318745pgm.80.2023.06.26.09.13.26 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 26 Jun 2023 09:13:28 -0700 (PDT) From: Ani Sinha To: qemu-devel@nongnu.org, "Michael S. Tsirkin" , Igor Mammedov , Ani Sinha Subject: [RESEND PATCH v5 3/5] tests/acpi/bios-tables-test: update acpi blob q35/DSDT.noacpihp Date: Mon, 26 Jun 2023 21:42:42 +0530 Message-Id: <20230626161244.4145-4-anisinha@redhat.com> X-Mailer: git-send-email 2.39.1 In-Reply-To: <20230626161244.4145-1-anisinha@redhat.com> References: <20230626161244.4145-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 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: 13293121 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 9E1B7EB64DC for ; Mon, 26 Jun 2023 16:16:01 +0000 (UTC) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qDoqX-0007gJ-Lw; Mon, 26 Jun 2023 12:13: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 1qDoqV-0007fd-Ic for qemu-devel@nongnu.org; Mon, 26 Jun 2023 12:13:43 -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 1qDoqT-0002rh-S2 for qemu-devel@nongnu.org; Mon, 26 Jun 2023 12:13:43 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1687796020; 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=/JjxrSNAdYJ3YjEvsqjvOBEVgpy/3FUTtZqyQjsB1ec=; b=FafwDFFa2spmVZFogBVoRhnCHSH+Si6YXOFiMBANLSB5KQYSZQhJfRQQhvFVvnOfs70W58 o8IvK/bWtJvbm/V25C/Z9iZHfXwk8bSjzYKkxqwr4uMYF464pv5xsDogga7aTgqk/nyQqn YJIpUmjm2EbyK6clkfZBVqsHPK4hPKA= Received: from mail-ot1-f71.google.com (mail-ot1-f71.google.com [209.85.210.71]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-93-VVKfKLkqPp2EmOOs-03c0g-1; Mon, 26 Jun 2023 12:13:39 -0400 X-MC-Unique: VVKfKLkqPp2EmOOs-03c0g-1 Received: by mail-ot1-f71.google.com with SMTP id 46e09a7af769-6b731ff7d24so2200650a34.1 for ; Mon, 26 Jun 2023 09:13:38 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1687796017; x=1690388017; 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=/JjxrSNAdYJ3YjEvsqjvOBEVgpy/3FUTtZqyQjsB1ec=; b=lFl5HIVXT87qf213npd/myBtxgx1Gc99GXkQ8fYu7awxhxayvQvoODit6XeoolEzyj eJ32jGQHbD10wFRO7MvxYLTG1jniwWqfF5vXYJgF71aWGwIx+yWgXQNwlzu6M0gLYBcB 6baI3wnNt6vVcO4DEVNpilnh9u4aUG86JNjhsVNRZ2Clw/m0uKOxIU9jJ8KKDlY/oM3D bfq/o+e9g66mH/bm4gujxlcwdDpC1PkxhUrTZ+JUNuBcdBtwaSNO87BAIPvkHqoLyNCZ UJAdYqaAYjKIznFKizcF1lAAik7JUMrPgNfz/gPzjiXGzxcPRMvn98Md38a6RuFIO2wb kM+w== X-Gm-Message-State: AC+VfDwu0lKsNi/KYbgKkosdJRkYX90m9NsRvTGm3E578rW45K6wFjMK 4dRnTraoFzEVNdWn8/VeuYtkIKW0XpeV95j3ZV0gTH1TJvuzyqP2cYJrJifMss+ChqaAzC6lYtF ARb2wUKnB1PrF5VKpF8Vq/wPG6VRpY++UKg0yEWCNGPjd8lCQw//RWzAPrRCJpEmcHLSRdZZ/cl k= X-Received: by 2002:a05:6830:1348:b0:6b7:2c0e:9a74 with SMTP id r8-20020a056830134800b006b72c0e9a74mr10386266otq.13.1687796017740; Mon, 26 Jun 2023 09:13:37 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ6wVXrY50gtv7P6j9D3hRdXyqjVzokUzF7H3jRSoLKecqVher2Z82aHzu6spIZl/IwJnUZGgA== X-Received: by 2002:a05:6830:1348:b0:6b7:2c0e:9a74 with SMTP id r8-20020a056830134800b006b72c0e9a74mr10386243otq.13.1687796017458; Mon, 26 Jun 2023 09:13:37 -0700 (PDT) Received: from localhost.localdomain ([115.96.139.77]) by smtp.googlemail.com with ESMTPSA id q5-20020a631f45000000b0051b7d83ff22sm4318745pgm.80.2023.06.26.09.13.34 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 26 Jun 2023 09:13:37 -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: [RESEND PATCH v5 4/5] tests/qtest/hd-geo-test: fix incorrect pcie-root-port usage and simplify test Date: Mon, 26 Jun 2023 21:42:43 +0530 Message-Id: <20230626161244.4145-5-anisinha@redhat.com> X-Mailer: git-send-email 2.39.1 In-Reply-To: <20230626161244.4145-1-anisinha@redhat.com> References: <20230626161244.4145-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 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-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 16:12:44 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ani Sinha X-Patchwork-Id: 13293120 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 DF59FEB64DC for ; Mon, 26 Jun 2023 16:15:49 +0000 (UTC) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qDoqh-0007s3-P7; Mon, 26 Jun 2023 12:13: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 1qDoqf-0007l7-9j for qemu-devel@nongnu.org; Mon, 26 Jun 2023 12:13:53 -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 1qDoqd-0002uV-Ml for qemu-devel@nongnu.org; Mon, 26 Jun 2023 12:13:53 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1687796030; 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=OrZKg5A3IIuEjZYPottAbxQml/3gBTvol6Q1NTNTSCJ1B/3+SUnwOTFgVi8LOtic0pClvl 6UftNMk85BzlJexops6r28JqZloXQjOUc0f4plU1+bCVqcNQJpOm8zCZRJmeWyRb8ZyqWX SlyRDgeVtipVtMMK7HjuLBINnoNbel0= Received: from mail-oa1-f70.google.com (mail-oa1-f70.google.com [209.85.160.70]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-195-JLhwaNfYOzOYwLx_v8bK_w-1; Mon, 26 Jun 2023 12:13:47 -0400 X-MC-Unique: JLhwaNfYOzOYwLx_v8bK_w-1 Received: by mail-oa1-f70.google.com with SMTP id 586e51a60fabf-1b0179af273so2397463fac.1 for ; Mon, 26 Jun 2023 09:13:45 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1687796025; x=1690388025; 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=Qoz7oveki2bCO5MS/qNFUzPAt9zxhtRAY9xPhLWroj/jSXfLRuGmhwILns+vmtTb7l jK9exOE1+AvaoG6ZeJ6AMeic38wQAip9Q5UAH6dwJKanYwFTQiDSVOowrnGe+Q3W3qNn zDS0i43Wl6XOfAWbN2ybjLXQkssRFfqVwjVIF80WFTa96Sw7Bu9Q3RVGe4b+hCouCoxh +mrYZglMz94/eB7nCUnA5vwty7ttG1COaiZM3zsbzyfmiHs9gOYavl4066e1TKpS/MPQ ITz1KBP0/1eRZX9FH/1zhOlhrZCS6qD2TxAFoXo4sDxKIf8aqTAnGVWgoSObxdYe2kt7 03Ww== X-Gm-Message-State: AC+VfDwOAFiHJz5aCKDNE9cEIDobN5zGvlxzqgOGBgBkPNtbxrXLGGV0 Aok1EgKTw91tOpiPRYTwvSaY93vbXm6T90sTxNdKXdok6pXhqY9EFruA8PiE0z2Tsg8z9bR3Wbp Y4rH44r67odEyC2ol0yO3tJ/Mn+E/SmLw7kh0IUhj6byMQ8qqUpuFMcdMnYKRNeAooUIzY9twEU Y= X-Received: by 2002:a05:6870:e295:b0:1a2:c149:99cc with SMTP id v21-20020a056870e29500b001a2c14999ccmr24000450oad.24.1687796024828; Mon, 26 Jun 2023 09:13:44 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ6p8AQMpD5NOJ/OkUNwmHq8pWlPBvDzJUIB1fVDVCZ1a5X5s5JLUsrv43atVjPMcr95jU0PKw== X-Received: by 2002:a05:6870:e295:b0:1a2:c149:99cc with SMTP id v21-20020a056870e29500b001a2c14999ccmr24000431oad.24.1687796024544; Mon, 26 Jun 2023 09:13:44 -0700 (PDT) Received: from localhost.localdomain ([115.96.139.77]) by smtp.googlemail.com with ESMTPSA id q5-20020a631f45000000b0051b7d83ff22sm4318745pgm.80.2023.06.26.09.13.42 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 26 Jun 2023 09:13:44 -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: [RESEND PATCH v5 5/5] hw/pci: ensure PCIE devices are plugged into only slot 0 of PCIE port Date: Mon, 26 Jun 2023 21:42:44 +0530 Message-Id: <20230626161244.4145-6-anisinha@redhat.com> X-Mailer: git-send-email 2.39.1 In-Reply-To: <20230626161244.4145-1-anisinha@redhat.com> References: <20230626161244.4145-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;