From patchwork Tue Sep 15 14:43:05 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ani Sinha X-Patchwork-Id: 11776765 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 5B07214B7 for ; Tue, 15 Sep 2020 14:44:36 +0000 (UTC) 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 mail.kernel.org (Postfix) with ESMTPS id EC694206B5 for ; Tue, 15 Sep 2020 14:44:35 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (2048-bit key) header.d=anisinha-ca.20150623.gappssmtp.com header.i=@anisinha-ca.20150623.gappssmtp.com header.b="AHFYII3y" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org EC694206B5 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=anisinha.ca Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Received: from localhost ([::1]:42314 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kICCA-0006jy-Uh for patchwork-qemu-devel@patchwork.kernel.org; Tue, 15 Sep 2020 10:44:34 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:33030) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kICBE-00056r-QN for qemu-devel@nongnu.org; Tue, 15 Sep 2020 10:43:36 -0400 Received: from mail-pl1-x641.google.com ([2607:f8b0:4864:20::641]:43944) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1kICBD-0003vG-6D for qemu-devel@nongnu.org; Tue, 15 Sep 2020 10:43:36 -0400 Received: by mail-pl1-x641.google.com with SMTP id e4so1458918pln.10 for ; Tue, 15 Sep 2020 07:43:31 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=anisinha-ca.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=HHdiOGLkXts4NNVu4SCMzFcJi56aYTGQpkW5PEoj6js=; b=AHFYII3y8ndNEiZxlUPIjHgD0D6NrGfILnnbjoTzeFbt3p/OBCm/yr/1ULcKs2wv+3 jANfqJV8TngyMevvcmA5H98yI1lY7Jz2ND7F5ujqnudcMAk57qQgKYevLRxXr2ePANd/ Pg2VsShcmu4zWtWzkUplT6m8QwH+MME/7aQPiP7zMWe0GSUobnvzSVz1jRGwFL5oc9vr BDXBbE/DAdwIO7m9RBRZZkSPnxjARxsM2ke5M7j+AfcwqR7RTrMGTg7YrX3gdeEkzOz9 zjtvaOjMr2mDjX2hFh1IKiH9g0xmqKWm56sx+YyMJrPQAa0uZEqpxAxqXTqE2AdJVFwF VNBg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=HHdiOGLkXts4NNVu4SCMzFcJi56aYTGQpkW5PEoj6js=; b=HupnXYqAgx+IoKb9B2KEotaN6rtQiAYJru65r5cMg7cQYUFQvr9/EjbpmHKOo/p1EL WiXNTs0WopRasOAZC2Dm+O/Ec4JPc+YX2cJqiz0KQ/uVGZDW4U2Z/+hK1Ohj4RNN43HC nToQPjGJka+Pjo8Ow2cZJAp3ziUeKYq/eeELZu6KJ+yjL7lyLFYVk/RlbvFbs0NawgXw b2oA/R+gPShTyOwc5k0H6Ng+qCMHRCtliy3GDw5QMXbsWP46IAdDjQoRe93iXtKkuNJJ 0n4ntmu7DpqpUUM8+dThpu36ChvpQEKlbt+hVOyJ6muglbVa3brvYc37pNfBCMVQnWyf RvIQ== X-Gm-Message-State: AOAM530MsJ8X88eKu3AgppMWexO/o6HiBMIJhXf7v7JS4yIwME2nXJF5 auZ+x5NmjqaepEU58SuFhvdahO5mK+IoeOfr X-Google-Smtp-Source: ABdhPJw4nf6C53KY3rH0hpwEEL2mQ6ZFEOgxTp8wFQQh+r6xbXGXKNvZOLiuYga2uz5ZiRiDSs87DA== X-Received: by 2002:a17:902:6ac7:b029:d0:89f3:28d1 with SMTP id i7-20020a1709026ac7b02900d089f328d1mr19071487plt.13.1600181010184; Tue, 15 Sep 2020 07:43:30 -0700 (PDT) Received: from localhost.localdomain ([115.96.128.178]) by smtp.googlemail.com with ESMTPSA id r2sm11520693pga.94.2020.09.15.07.43.25 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 15 Sep 2020 07:43:29 -0700 (PDT) From: Ani Sinha To: qemu-devel@nongnu.org Subject: [PATCH v2 1/9] tests/acpi: document addition of table DSDT.roothp for unit testing root pci hotplug on/off Date: Tue, 15 Sep 2020 20:13:05 +0530 Message-Id: <20200915144314.4997-2-ani@anisinha.ca> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20200915144314.4997-1-ani@anisinha.ca> References: <20200915144314.4997-1-ani@anisinha.ca> Received-SPF: none client-ip=2607:f8b0:4864:20::641; envelope-from=ani@anisinha.ca; helo=mail-pl1-x641.google.com X-detected-operating-system: by eggs.gnu.org: No matching host in p0f cache. That's all we know. X-Spam_score_int: -18 X-Spam_score: -1.9 X-Spam_bar: - X-Spam_report: (-1.9 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_NONE=0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Eduardo Habkost , "Michael S. Tsirkin" , =?utf-8?q?Philippe_Mathieu-Daud?= =?utf-8?q?=C3=A9?= , Aleksandar Markovic , Paolo Bonzini , Ani Sinha , Igor Mammedov , Aurelien Jarno , Richard Henderson Errors-To: qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Sender: "Qemu-devel" A new binary acpi table tests/data/acpi/pc/DSDT.roothp is added in order to unit test the feature flag that can disable/enable root pci bus hotplug on i440fx. This feature was added with the commit: 3d7e78aa7777f0 ("Introduce a new flag for i440fx to disable PCI hotplug on the root bus") This change documents the fact that this new file addition was made as a part of the unit test change. Signed-off-by: Ani Sinha --- 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..ac864fc982 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/pc/DSDT.roothp", From patchwork Tue Sep 15 14:43:06 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ani Sinha X-Patchwork-Id: 11776769 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 025666CA for ; Tue, 15 Sep 2020 14:46:35 +0000 (UTC) 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 mail.kernel.org (Postfix) with ESMTPS id 85CE6206C9 for ; Tue, 15 Sep 2020 14:46:34 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (2048-bit key) header.d=anisinha-ca.20150623.gappssmtp.com header.i=@anisinha-ca.20150623.gappssmtp.com header.b="LKypJsXt" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 85CE6206C9 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=anisinha.ca Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Received: from localhost ([::1]:48572 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kICE5-0000xB-HG for patchwork-qemu-devel@patchwork.kernel.org; Tue, 15 Sep 2020 10:46:33 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:33042) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kICBG-00058m-Qh for qemu-devel@nongnu.org; Tue, 15 Sep 2020 10:43:38 -0400 Received: from mail-pl1-x641.google.com ([2607:f8b0:4864:20::641]:35887) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1kICBF-0003vM-1t for qemu-devel@nongnu.org; Tue, 15 Sep 2020 10:43:38 -0400 Received: by mail-pl1-x641.google.com with SMTP id k13so1458181plk.3 for ; Tue, 15 Sep 2020 07:43:36 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=anisinha-ca.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=C+pxfabqqEbpbP52/uopOa9jod19U4/Iicx9HACbYdw=; b=LKypJsXtxjCPox4bsI2w36UmE1GBY6je7S3SPIpOmjDfvkxaIJcLQ0FZLUbMARxzCo GtA5mvZWWND6O4oZ7fPg6CjUOCWQwSlnnYxvdOAEeK9pJUOoN9iIA5FwcAX6NGcEAzLQ gcNh4yrVWyxCx9LmOoLaxOpfU0cngDx3l1VD+cLZ7eratUHYj4bHm8BnSIwJqzFJeyM/ 9eM9dUSb5A+pOAgs3jP5hjsJ5Qb6w9XhjT0RfvbAA3Z7MAQqXuqaczgDlkl3FRlWNjOo T1guKjeOP7uhea+RnhuIGoRtc81aqnUNapKfCcReg/51Q+ZwswdjPjQcGFDTf8zfxINA dQAw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=C+pxfabqqEbpbP52/uopOa9jod19U4/Iicx9HACbYdw=; b=l8OJuHrK/fJfPt4TAgnnz1dYLMCnQUM+siCK0c2NbtGtuGD7HrM1XFZ8fycTLbwG6R IvS8pv9wxG4XcuQ9y6LfC7E8MfcgnHUQkDxI+ZY1Y1jmhCzZi1zhbUSbr0m7NIWbPqsA nchKwTBeUv4exY3mtlDANLO4i8U+vqTUxG8egsRiYd2ALacAvQ39XqnerEFOdI5FLuEM bx2SlztaIIcurO4cXIsurRZErqsegDCOI5ux5gd6rW0DqZfzBFvn8iMewr9tGYhP6it8 DaEstv0rZ8IEtC2bgZ485ayL/6EW6sZn8dnQgQoMoh1KWBLktzMzDrFlI5kEcqikgIIA CeMg== X-Gm-Message-State: AOAM530GdYOHGsiCYIACpKu1q4xnV5/CkqzdBierZflaH49dGSKiOgbU D+7iIhk5+KyWYDxbcxi/IoY1REEDJXB6bd4dKOc= X-Google-Smtp-Source: ABdhPJyXm5FaHIWv2wETsDasQIdopy8brzTJOgjrBS7A2G6ikud2lYiZ9+59b+J6rs93F/K65htRuQ== X-Received: by 2002:a17:902:bccb:b029:d1:9be4:9d22 with SMTP id o11-20020a170902bccbb02900d19be49d22mr20526425pls.40.1600181015504; Tue, 15 Sep 2020 07:43:35 -0700 (PDT) Received: from localhost.localdomain ([115.96.128.178]) by smtp.googlemail.com with ESMTPSA id r2sm11520693pga.94.2020.09.15.07.43.30 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 15 Sep 2020 07:43:34 -0700 (PDT) From: Ani Sinha To: qemu-devel@nongnu.org Subject: [PATCH v2 2/9] tests/acpi: add a new unit test to test hotplug off/on feature on the root pci bus Date: Tue, 15 Sep 2020 20:13:06 +0530 Message-Id: <20200915144314.4997-3-ani@anisinha.ca> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20200915144314.4997-1-ani@anisinha.ca> References: <20200915144314.4997-1-ani@anisinha.ca> Received-SPF: none client-ip=2607:f8b0:4864:20::641; envelope-from=ani@anisinha.ca; helo=mail-pl1-x641.google.com X-detected-operating-system: by eggs.gnu.org: No matching host in p0f cache. That's all we know. X-Spam_score_int: -18 X-Spam_score: -1.9 X-Spam_bar: - X-Spam_report: (-1.9 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_NONE=0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Laurent Vivier , Thomas Huth , Eduardo Habkost , "Michael S. Tsirkin" , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , Aleksandar Markovic , Paolo Bonzini , Ani Sinha , Igor Mammedov , Aurelien Jarno , Richard Henderson Errors-To: qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Sender: "Qemu-devel" Ability to turn hotplug off on the pci root bus for i440fx was added in commit: 3d7e78aa7777f0 ("Introduce a new flag for i440fx to disable PCI hotplug on the root bus") This change adds a unit test in order to test this feature. This change has been tested against upstream qemu master branch tip. Signed-off-by: Ani Sinha --- tests/qtest/bios-tables-test.c | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/tests/qtest/bios-tables-test.c b/tests/qtest/bios-tables-test.c index 504b810af5..d8c7d57557 100644 --- a/tests/qtest/bios-tables-test.c +++ b/tests/qtest/bios-tables-test.c @@ -740,6 +740,20 @@ static void test_acpi_piix4_tcg_bridge(void) free_test_data(&data); } +static void test_acpi_piix4_root_hotplug(void) +{ + test_data data; + + memset(&data, 0, sizeof(data)); + data.machine = MACHINE_PC; + data.variant = ".roothp"; + data.required_struct_types = base_required_struct_types; + data.required_struct_types_len = ARRAY_SIZE(base_required_struct_types); + test_acpi_one("-global PIIX4_PM.acpi-root-pci-hotplug=off " + "-device pci-bridge,chassis_nr=1", &data); + free_test_data(&data); +} + static void test_acpi_q35_tcg(void) { test_data data; @@ -1144,6 +1158,7 @@ int main(int argc, char *argv[]) qtest_add_func("acpi/q35/tpm-tis", test_acpi_q35_tcg_tpm_tis); qtest_add_func("acpi/piix4", test_acpi_piix4_tcg); qtest_add_func("acpi/piix4/bridge", test_acpi_piix4_tcg_bridge); + qtest_add_func("acpi/piix4/hotplug", test_acpi_piix4_root_hotplug); qtest_add_func("acpi/q35", test_acpi_q35_tcg); qtest_add_func("acpi/q35/bridge", test_acpi_q35_tcg_bridge); qtest_add_func("acpi/q35/mmio64", test_acpi_q35_tcg_mmio64); From patchwork Tue Sep 15 14:43:07 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ani Sinha X-Patchwork-Id: 11776767 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id D13D4746 for ; Tue, 15 Sep 2020 14:44:42 +0000 (UTC) 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 mail.kernel.org (Postfix) with ESMTPS id 4F7AD206A4 for ; Tue, 15 Sep 2020 14:44:42 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (2048-bit key) header.d=anisinha-ca.20150623.gappssmtp.com header.i=@anisinha-ca.20150623.gappssmtp.com header.b="OTD/7q4j" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 4F7AD206A4 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=anisinha.ca Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Received: from localhost ([::1]:43016 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kICCH-000712-CC for patchwork-qemu-devel@patchwork.kernel.org; Tue, 15 Sep 2020 10:44:41 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:33066) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kICBQ-0005Eu-CL for qemu-devel@nongnu.org; Tue, 15 Sep 2020 10:43:48 -0400 Received: from mail-pl1-x642.google.com ([2607:f8b0:4864:20::642]:33534) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1kICBK-0003vn-LZ for qemu-devel@nongnu.org; Tue, 15 Sep 2020 10:43:47 -0400 Received: by mail-pl1-x642.google.com with SMTP id d19so1456328pld.0 for ; Tue, 15 Sep 2020 07:43:41 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=anisinha-ca.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=QIrKg06WOm42suw0WWNTsY7tcSv9RsvVFBeMyFGCXZc=; b=OTD/7q4j9PLGdYD60/S5B+eRMKjzOmhs6ZKGK3UVYV/bHeV5ezgsX6DRE/8fmAgsB2 EXHdDiyNYsTVxK+18SX+gtj/X6V0OI9lpr8kzWtqT5SVJYvjmy9uD1lifA3hj2Iiqc0H u4CuLeSyCCRdVs1J7fdodTqfSxDYfw84DDE6z0BACvwlI0xLZDWhb551U6wpkRIp4t+N etoyGYIfvS4gDqfH+c43IUEaYYP2v6H7hXSB9URNDSvsuXGJZ7djExBvi2KdHl1CsHTm Ux3U/V6ZevyYnfjKXEf37+oUrvKmzpTuXTExYYeHRyFkXhk7fbG/5cJMR5kF4HLMlElx Zj/A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=QIrKg06WOm42suw0WWNTsY7tcSv9RsvVFBeMyFGCXZc=; b=EsjamRg2gGesblqlktO9og2i7xzZPAkbc3roAl2wpz7w+uWwI0Qmpx04JZaqwPkFcB Ozd4rhK397zGZ9at1buTYbNnZIXECoDcpSmNp2rfo7acuQORjM5YyyraNevC/CC/ImRT f4Xnw9oAdVeOkhuOgSnW3H/7KVwGf7LuKn7N2QMUU/J6s44FGFCwmJOJBYMGDbp4igTe HPxMNsaMdabZjRafZcv11TtpvyT8KHf79xG1qfCaMoJMJClzkBN8bB2RxQga1iaqHBOO TWX+P8Zf+n/eu1okF6EnLFSWql7FDf1EnWiCWp+DMcntzv2FCiN4snGLkzup8igrYrQv A8aw== X-Gm-Message-State: AOAM533XIu91brmmAFOo/EI7nPlbnISgnyo4/VyInwD+Q0OYNP3fkOMl zpBwmmP0okBV1Ki3W3Touj5xdbLvrq2iUm5G X-Google-Smtp-Source: ABdhPJzBA0S6mCchJ1OQSc4TGPoXH3ffSE0PjQZ5Kx8ZCVP4b5qfyT2su+2DaoFeXbHhLvIWQd/cmg== X-Received: by 2002:a17:902:8647:b029:d1:e5e7:be61 with SMTP id y7-20020a1709028647b02900d1e5e7be61mr2037020plt.59.1600181020266; Tue, 15 Sep 2020 07:43:40 -0700 (PDT) Received: from localhost.localdomain ([115.96.128.178]) by smtp.googlemail.com with ESMTPSA id r2sm11520693pga.94.2020.09.15.07.43.35 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 15 Sep 2020 07:43:39 -0700 (PDT) From: Ani Sinha To: qemu-devel@nongnu.org Subject: [PATCH v2 3/9] tests/acpi: add a new ACPI table in order to test root pci hotplug on/off Date: Tue, 15 Sep 2020 20:13:07 +0530 Message-Id: <20200915144314.4997-4-ani@anisinha.ca> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20200915144314.4997-1-ani@anisinha.ca> References: <20200915144314.4997-1-ani@anisinha.ca> Received-SPF: none client-ip=2607:f8b0:4864:20::642; envelope-from=ani@anisinha.ca; helo=mail-pl1-x642.google.com X-detected-operating-system: by eggs.gnu.org: No matching host in p0f cache. That's all we know. X-Spam_score_int: -18 X-Spam_score: -1.9 X-Spam_bar: - X-Spam_report: (-1.9 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_NONE=0.001, T_FILL_THIS_FORM_SHORT=0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Eduardo Habkost , "Michael S. Tsirkin" , =?utf-8?q?Philippe_Mathieu-Daud?= =?utf-8?q?=C3=A9?= , Aleksandar Markovic , Paolo Bonzini , Ani Sinha , Igor Mammedov , Aurelien Jarno , Richard Henderson Errors-To: qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Sender: "Qemu-devel" A new binary ACPI table tests/data/acpi/pc/DSDT.roothp is added in order to unit test hotplug on/off capability on the root pci bus for i440fx. The diff between the table DSDT.bridge and DSDT.roothp is listed below: @@ -1,30 +1,30 @@ /* * Intel ACPI Component Architecture * AML/ASL+ Disassembler version 20180105 (64-bit version) * Copyright (c) 2000 - 2018 Intel Corporation * * Disassembling to symbolic ASL+ operators * - * Disassembly of tests/data/acpi/pc/DSDT.bridge, Fri Sep 11 22:51:04 2020 + * Disassembly of /tmp/aml-UGIHQ0, Fri Sep 11 22:51:04 2020 * * Original Table Header: * Signature "DSDT" - * Length 0x00001A89 (6793) + * Length 0x0000140A (5130) * Revision 0x01 **** 32-bit table (V1), no 64-bit math support - * Checksum 0x09 + * Checksum 0xE6 * OEM ID "BOCHS " * OEM Table ID "BXPCDSDT" * OEM Revision 0x00000001 (1) * Compiler ID "BXPC" * Compiler Version 0x00000001 (1) */ DefinitionBlock ("", "DSDT", 1, "BOCHS ", "BXPCDSDT", 0x00000001) { Scope (\) { OperationRegion (DBG, SystemIO, 0x0402, One) Field (DBG, ByteAcc, NoLock, Preserve) { DBGB, 8 } @@ -831,61 +831,60 @@ Name (_CRS, ResourceTemplate () // _CRS: Current Resource Settings { IO (Decode16, 0x0510, // Range Minimum 0x0510, // Range Maximum 0x01, // Alignment 0x0C, // Length ) }) } } Scope (\_SB) { Scope (PCI0) { - Name (BSEL, Zero) Device (S00) { Name (_ADR, Zero) // _ADR: Address } Device (S10) { Name (_ADR, 0x00020000) // _ADR: Address Method (_S1D, 0, NotSerialized) // _S1D: S1 Device State { Return (Zero) } Method (_S2D, 0, NotSerialized) // _S2D: S2 Device State { Return (Zero) } Method (_S3D, 0, NotSerialized) // _S3D: S3 Device State { Return (Zero) } } Device (S18) { Name (_ADR, 0x00030000) // _ADR: Address - Name (BSEL, One) + Name (BSEL, Zero) Device (S00) { Name (_SUN, Zero) // _SUN: Slot User Number Name (_ADR, Zero) // _ADR: Address Method (_EJ0, 1, NotSerialized) // _EJx: Eject Device { PCEJ (BSEL, _SUN) } } Device (S08) { Name (_SUN, One) // _SUN: Slot User Number Name (_ADR, 0x00010000) // _ADR: Address Method (_EJ0, 1, NotSerialized) // _EJx: Eject Device { @@ -1345,456 +1344,30 @@ Notify (SE8, Arg1) } If ((Arg0 & 0x40000000)) { Notify (SF0, Arg1) } If ((Arg0 & 0x80000000)) { Notify (SF8, Arg1) } } Method (PCNT, 0, NotSerialized) { - BNUM = One + BNUM = Zero DVNT (PCIU, One) DVNT (PCID, 0x03) } } - Device (S20) - { - Name (_SUN, 0x04) // _SUN: Slot User Number - Name (_ADR, 0x00040000) // _ADR: Address - Method (_EJ0, 1, NotSerialized) // _EJx: Eject Device - { - PCEJ (BSEL, _SUN) - } - } - - Device (S28) - { - Name (_SUN, 0x05) // _SUN: Slot User Number - Name (_ADR, 0x00050000) // _ADR: Address - Method (_EJ0, 1, NotSerialized) // _EJx: Eject Device - { - PCEJ (BSEL, _SUN) - } - } - - Device (S30) - { - Name (_SUN, 0x06) // _SUN: Slot User Number - Name (_ADR, 0x00060000) // _ADR: Address - Method (_EJ0, 1, NotSerialized) // _EJx: Eject Device - { - PCEJ (BSEL, _SUN) - } - } - - Device (S38) - { - Name (_SUN, 0x07) // _SUN: Slot User Number - Name (_ADR, 0x00070000) // _ADR: Address - Method (_EJ0, 1, NotSerialized) // _EJx: Eject Device - { - PCEJ (BSEL, _SUN) - } - } - - Device (S40) - { - Name (_SUN, 0x08) // _SUN: Slot User Number - Name (_ADR, 0x00080000) // _ADR: Address - Method (_EJ0, 1, NotSerialized) // _EJx: Eject Device - { - PCEJ (BSEL, _SUN) - } - } - - Device (S48) - { - Name (_SUN, 0x09) // _SUN: Slot User Number - Name (_ADR, 0x00090000) // _ADR: Address - Method (_EJ0, 1, NotSerialized) // _EJx: Eject Device - { - PCEJ (BSEL, _SUN) - } - } - - Device (S50) - { - Name (_SUN, 0x0A) // _SUN: Slot User Number - Name (_ADR, 0x000A0000) // _ADR: Address - Method (_EJ0, 1, NotSerialized) // _EJx: Eject Device - { - PCEJ (BSEL, _SUN) - } - } - - Device (S58) - { - Name (_SUN, 0x0B) // _SUN: Slot User Number - Name (_ADR, 0x000B0000) // _ADR: Address - Method (_EJ0, 1, NotSerialized) // _EJx: Eject Device - { - PCEJ (BSEL, _SUN) - } - } - - Device (S60) - { - Name (_SUN, 0x0C) // _SUN: Slot User Number - Name (_ADR, 0x000C0000) // _ADR: Address - Method (_EJ0, 1, NotSerialized) // _EJx: Eject Device - { - PCEJ (BSEL, _SUN) - } - } - - Device (S68) - { - Name (_SUN, 0x0D) // _SUN: Slot User Number - Name (_ADR, 0x000D0000) // _ADR: Address - Method (_EJ0, 1, NotSerialized) // _EJx: Eject Device - { - PCEJ (BSEL, _SUN) - } - } - - Device (S70) - { - Name (_SUN, 0x0E) // _SUN: Slot User Number - Name (_ADR, 0x000E0000) // _ADR: Address - Method (_EJ0, 1, NotSerialized) // _EJx: Eject Device - { - PCEJ (BSEL, _SUN) - } - } - - Device (S78) - { - Name (_SUN, 0x0F) // _SUN: Slot User Number - Name (_ADR, 0x000F0000) // _ADR: Address - Method (_EJ0, 1, NotSerialized) // _EJx: Eject Device - { - PCEJ (BSEL, _SUN) - } - } - - Device (S80) - { - Name (_SUN, 0x10) // _SUN: Slot User Number - Name (_ADR, 0x00100000) // _ADR: Address - Method (_EJ0, 1, NotSerialized) // _EJx: Eject Device - { - PCEJ (BSEL, _SUN) - } - } - - Device (S88) - { - Name (_SUN, 0x11) // _SUN: Slot User Number - Name (_ADR, 0x00110000) // _ADR: Address - Method (_EJ0, 1, NotSerialized) // _EJx: Eject Device - { - PCEJ (BSEL, _SUN) - } - } - - Device (S90) - { - Name (_SUN, 0x12) // _SUN: Slot User Number - Name (_ADR, 0x00120000) // _ADR: Address - Method (_EJ0, 1, NotSerialized) // _EJx: Eject Device - { - PCEJ (BSEL, _SUN) - } - } - - Device (S98) - { - Name (_SUN, 0x13) // _SUN: Slot User Number - Name (_ADR, 0x00130000) // _ADR: Address - Method (_EJ0, 1, NotSerialized) // _EJx: Eject Device - { - PCEJ (BSEL, _SUN) - } - } - - Device (SA0) - { - Name (_SUN, 0x14) // _SUN: Slot User Number - Name (_ADR, 0x00140000) // _ADR: Address - Method (_EJ0, 1, NotSerialized) // _EJx: Eject Device - { - PCEJ (BSEL, _SUN) - } - } - - Device (SA8) - { - Name (_SUN, 0x15) // _SUN: Slot User Number - Name (_ADR, 0x00150000) // _ADR: Address - Method (_EJ0, 1, NotSerialized) // _EJx: Eject Device - { - PCEJ (BSEL, _SUN) - } - } - - Device (SB0) - { - Name (_SUN, 0x16) // _SUN: Slot User Number - Name (_ADR, 0x00160000) // _ADR: Address - Method (_EJ0, 1, NotSerialized) // _EJx: Eject Device - { - PCEJ (BSEL, _SUN) - } - } - - Device (SB8) - { - Name (_SUN, 0x17) // _SUN: Slot User Number - Name (_ADR, 0x00170000) // _ADR: Address - Method (_EJ0, 1, NotSerialized) // _EJx: Eject Device - { - PCEJ (BSEL, _SUN) - } - } - - Device (SC0) - { - Name (_SUN, 0x18) // _SUN: Slot User Number - Name (_ADR, 0x00180000) // _ADR: Address - Method (_EJ0, 1, NotSerialized) // _EJx: Eject Device - { - PCEJ (BSEL, _SUN) - } - } - - Device (SC8) - { - Name (_SUN, 0x19) // _SUN: Slot User Number - Name (_ADR, 0x00190000) // _ADR: Address - Method (_EJ0, 1, NotSerialized) // _EJx: Eject Device - { - PCEJ (BSEL, _SUN) - } - } - - Device (SD0) - { - Name (_SUN, 0x1A) // _SUN: Slot User Number - Name (_ADR, 0x001A0000) // _ADR: Address - Method (_EJ0, 1, NotSerialized) // _EJx: Eject Device - { - PCEJ (BSEL, _SUN) - } - } - - Device (SD8) - { - Name (_SUN, 0x1B) // _SUN: Slot User Number - Name (_ADR, 0x001B0000) // _ADR: Address - Method (_EJ0, 1, NotSerialized) // _EJx: Eject Device - { - PCEJ (BSEL, _SUN) - } - } - - Device (SE0) - { - Name (_SUN, 0x1C) // _SUN: Slot User Number - Name (_ADR, 0x001C0000) // _ADR: Address - Method (_EJ0, 1, NotSerialized) // _EJx: Eject Device - { - PCEJ (BSEL, _SUN) - } - } - - Device (SE8) - { - Name (_SUN, 0x1D) // _SUN: Slot User Number - Name (_ADR, 0x001D0000) // _ADR: Address - Method (_EJ0, 1, NotSerialized) // _EJx: Eject Device - { - PCEJ (BSEL, _SUN) - } - } - - Device (SF0) - { - Name (_SUN, 0x1E) // _SUN: Slot User Number - Name (_ADR, 0x001E0000) // _ADR: Address - Method (_EJ0, 1, NotSerialized) // _EJx: Eject Device - { - PCEJ (BSEL, _SUN) - } - } - - Device (SF8) - { - Name (_SUN, 0x1F) // _SUN: Slot User Number - Name (_ADR, 0x001F0000) // _ADR: Address - Method (_EJ0, 1, NotSerialized) // _EJx: Eject Device - { - PCEJ (BSEL, _SUN) - } - } - - Method (DVNT, 2, NotSerialized) - { - If ((Arg0 & 0x10)) - { - Notify (S20, Arg1) - } - - If ((Arg0 & 0x20)) - { - Notify (S28, Arg1) - } - - If ((Arg0 & 0x40)) - { - Notify (S30, Arg1) - } - - If ((Arg0 & 0x80)) - { - Notify (S38, Arg1) - } - - If ((Arg0 & 0x0100)) - { - Notify (S40, Arg1) - } - - If ((Arg0 & 0x0200)) - { - Notify (S48, Arg1) - } - - If ((Arg0 & 0x0400)) - { - Notify (S50, Arg1) - } - - If ((Arg0 & 0x0800)) - { - Notify (S58, Arg1) - } - - If ((Arg0 & 0x1000)) - { - Notify (S60, Arg1) - } - - If ((Arg0 & 0x2000)) - { - Notify (S68, Arg1) - } - - If ((Arg0 & 0x4000)) - { - Notify (S70, Arg1) - } - - If ((Arg0 & 0x8000)) - { - Notify (S78, Arg1) - } - - If ((Arg0 & 0x00010000)) - { - Notify (S80, Arg1) - } - - If ((Arg0 & 0x00020000)) - { - Notify (S88, Arg1) - } - - If ((Arg0 & 0x00040000)) - { - Notify (S90, Arg1) - } - - If ((Arg0 & 0x00080000)) - { - Notify (S98, Arg1) - } - - If ((Arg0 & 0x00100000)) - { - Notify (SA0, Arg1) - } - - If ((Arg0 & 0x00200000)) - { - Notify (SA8, Arg1) - } - - If ((Arg0 & 0x00400000)) - { - Notify (SB0, Arg1) - } - - If ((Arg0 & 0x00800000)) - { - Notify (SB8, Arg1) - } - - If ((Arg0 & 0x01000000)) - { - Notify (SC0, Arg1) - } - - If ((Arg0 & 0x02000000)) - { - Notify (SC8, Arg1) - } - - If ((Arg0 & 0x04000000)) - { - Notify (SD0, Arg1) - } - - If ((Arg0 & 0x08000000)) - { - Notify (SD8, Arg1) - } - - If ((Arg0 & 0x10000000)) - { - Notify (SE0, Arg1) - } - - If ((Arg0 & 0x20000000)) - { - Notify (SE8, Arg1) - } - - If ((Arg0 & 0x40000000)) - { - Notify (SF0, Arg1) - } - - If ((Arg0 & 0x80000000)) - { - Notify (SF8, Arg1) - } - } - Method (PCNT, 0, NotSerialized) { - BNUM = Zero - DVNT (PCIU, One) - DVNT (PCID, 0x03) ^S18.PCNT () } } } } Signed-off-by: Ani Sinha --- tests/data/acpi/pc/DSDT.roothp | Bin 0 -> 5130 bytes tests/qtest/bios-tables-test-allowed-diff.h | 1 - 2 files changed, 1 deletion(-) create mode 100644 tests/data/acpi/pc/DSDT.roothp diff --git a/tests/data/acpi/pc/DSDT.roothp b/tests/data/acpi/pc/DSDT.roothp new file mode 100644 index 0000000000000000000000000000000000000000..886a5e6952f6f034bdd80d44d43de5975a1a4b0f GIT binary patch literal 5130 zcmb7IQEwZ^5uPQF@^O!pj?&q3tT-lQyJ?cbCMj8Q&=-++6iG{@&OFL(aYFAXDJT^L z$iaz=C`wS80Tjn?f$E|UeP9eeTR)-w3Hb@>OMgI$#(D}nbH}AYish6#E;rFI)ppF3mjp?sik+#8Z8-!eB$l^fgbI6oYO#EbgY77cNR>&l98Qq#Yp78<5Ahk z8+DMKt%?C^RSqykxoj320>ltRX1iTB8&yaEeD{+AlKogEdG0~6W~9x!;iR<{$7IH=5j`laF>=C7(FEwqfSQJg*s**|Z8g#y5F}@e>~5H}N~m7kHn4$baNBT$Y_R zqnMiK8dbpPCxU|A$!(a8tVmA^){earuF8`o_G$Ffs4OqG{TOokW_9>Z4AHot6W%$E zo<>1lRQ-2u)*Je8LX<(KKD7rPFnJLeu2NY(Tc)Q9Ce*j#b^e1%z6X7*+|>atLu(<;~3cFqP zco#u&thkNZx&eFL8^^n>n>ucCX{fef@7v^1$|ERsyvrj)O<|yk4mCRLd0!mta22rT z;mIC=ci2RKPxcsidr#aZJZkn_`|*w2QHqwzmI|7g_4^qaA6a_j=&>YgbCvrztKIk^ zZ?|y2#Cu%PRx0=PdK>}uOlq1dUr#~YFO~y%N;)3HXQit=YhlhU8uv(TcQ!6ynplj% z-bmoyqn$0|Tv@40eD3RMh(}{sWgNc>eh)yK@i%pkf}rrUlw(vZ_=3i~?Q3Re4*(+c zx-ZW=R^4JxTR{}q2BbxW_wVQDb;d0sho8HVn`I4RC>wtu->ysD@_8zMJttG~=y@)LBiH0at8snPY9zuEow#1-g2jxz{Rw$_ zJTk5&=m+CUoPvqb*x8>I#l|7 zI#lQr0pB8SIC8)L&z}OzzkYoB&e=PGj$r+M|1Sa_XrWDi=~kvoI0eD2ENRxvOdh8o z=su($X*`6>xc#e^1io(o>U3#Q?v=&fyZZ!I~q zQxe0NalGuz$`W4m@Ct|09kNjH>Tk~`+wR<2`<=cP1aQAt-NItY5gKo=qYroy1_3D#KwoehNwR{Ym7h;=Runis6ND+8z&3Kgsu1@vMV zv>;e73FxIzs9>EJ(D^W^E?6%M=;ctTV0}$MUkig8g7u1kUI~Q?)&&7w2!j>{>+1sg zdMH$|UKP-*VbC?f`i6kM5egNo*97$1B&b%qYCNblB378M2Td4VNOg0QTjfPE{lv`HXK^01{~Pd>7+`3xlTv^=ztD{LVH8~M63 zw2?Dx1Opp+TN&EO9d74=jr_e!wwc40e+ZzA+fvAQ^r3ua#{=-l!VMO_EnUz qIEMB%$!OQE(aj2fBcUHEXrb|V-eQA+!J``fG=la&-l7$y;r{_Geabxm literal 0 HcmV?d00001 diff --git a/tests/qtest/bios-tables-test-allowed-diff.h b/tests/qtest/bios-tables-test-allowed-diff.h index ac864fc982..dfb8523c8b 100644 --- a/tests/qtest/bios-tables-test-allowed-diff.h +++ b/tests/qtest/bios-tables-test-allowed-diff.h @@ -1,2 +1 @@ /* List of comma-separated changed AML files to ignore */ -"tests/data/acpi/pc/DSDT.roothp", From patchwork Tue Sep 15 14:43:08 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ani Sinha X-Patchwork-Id: 11776775 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 42EFE746 for ; Tue, 15 Sep 2020 14:47:46 +0000 (UTC) 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 mail.kernel.org (Postfix) with ESMTPS id E8AFF206DB for ; Tue, 15 Sep 2020 14:47:45 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (2048-bit key) header.d=anisinha-ca.20150623.gappssmtp.com header.i=@anisinha-ca.20150623.gappssmtp.com header.b="svY+LoN+" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org E8AFF206DB Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=anisinha.ca Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Received: from localhost ([::1]:51586 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kICFE-0002Bo-Q2 for patchwork-qemu-devel@patchwork.kernel.org; Tue, 15 Sep 2020 10:47:44 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:33080) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kICBS-0005JI-60 for qemu-devel@nongnu.org; Tue, 15 Sep 2020 10:43:50 -0400 Received: from mail-pf1-x443.google.com ([2607:f8b0:4864:20::443]:44783) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1kICBP-0003vu-SI for qemu-devel@nongnu.org; Tue, 15 Sep 2020 10:43:49 -0400 Received: by mail-pf1-x443.google.com with SMTP id o20so2039865pfp.11 for ; Tue, 15 Sep 2020 07:43:46 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=anisinha-ca.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=Gel2ySMpTt4f7XUoVi2e2wkLqL2QzwXiN3Z4/PyZJos=; b=svY+LoN+NgmP79laG7g2YnwdsRTLumZ5hgdbJouYB8VXiYbX2tZ7c8ZaQaXsrBMaqD MN56hEBveAlcnKw3eymGrUJnDRUsPDjPildXuvHpkLeaSteTPtL5Rnjj0E1QoZzWWI/q dpaqeBBi9xSVgQ9ahXW9/TctXUASZangIKz2E9WBovvRUuhn7k2q3QtwmPjjkxLpg9u0 Lkc7u12dr5m1Ctm7eP6Tf1AB5jApASNnuadbqDNDIPDDFaxYu5X8GrtOyByVDcpaG1gQ WaEou4Nruu/rE9X8phWSCxFifTG/wObJz9ys2+QH+UIv0W1EjekBV/rDT6N25xYI+AU8 gCTQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=Gel2ySMpTt4f7XUoVi2e2wkLqL2QzwXiN3Z4/PyZJos=; b=U192uOyHM2whilCP/8yOlh3K4dFR7m1bFDwbj+DnS3HTkVxSSBcnUdOL0Q3O+gjgfA 1mzeI0d22uxkbyNxjLyfQNYC5EuN2E9UtB39UXnH63RIPJuZZiEknKzIIX/C6HS4/D6r 55kbziaLkGrNdvoqAUQGuHltWj8bQXbXv2wfDW7ZLLy87q35gUIKGRoE1vWPpMB6V1ss 4i5eVayoiSlitSiq+QZ79ut8DdY7iph5ln4yg0nNPR7LVyFZuAfSUhwE5MaLNJoJDGrh 37LpZ1Cp5k9bm8iVQ3tHIt3m0Mpv+TVF3+ok0+A69Y/vAFm1sxm13o5nxbMiMtIG8ikp fh6A== X-Gm-Message-State: AOAM530G0ZkipEwhv3wUGohNkUufMOnTH+y6Db2fFBY/Tr38KAqoTor8 QM2QInkklgNwU4hBI84ufu67G7HHrFDp6gd+ X-Google-Smtp-Source: ABdhPJw608B5WHtzjjOkLLbf+C8171Kzqj06PJk2uPkI9ZRl6VLSNu6AH1cxyLBeY3OcUMw+gMx9/w== X-Received: by 2002:a05:6a00:1481:b029:142:2501:35d7 with SMTP id v1-20020a056a001481b0290142250135d7mr2227272pfu.55.1600181024841; Tue, 15 Sep 2020 07:43:44 -0700 (PDT) Received: from localhost.localdomain ([115.96.128.178]) by smtp.googlemail.com with ESMTPSA id r2sm11520693pga.94.2020.09.15.07.43.40 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 15 Sep 2020 07:43:44 -0700 (PDT) From: Ani Sinha To: qemu-devel@nongnu.org Subject: [PATCH v2 4/9] Fix a gap where acpi_pcihp_find_hotplug_bus() returns a non-hotpluggable bus Date: Tue, 15 Sep 2020 20:13:08 +0530 Message-Id: <20200915144314.4997-5-ani@anisinha.ca> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20200915144314.4997-1-ani@anisinha.ca> References: <20200915144314.4997-1-ani@anisinha.ca> Received-SPF: none client-ip=2607:f8b0:4864:20::443; envelope-from=ani@anisinha.ca; helo=mail-pf1-x443.google.com X-detected-operating-system: by eggs.gnu.org: No matching host in p0f cache. That's all we know. X-Spam_score_int: -18 X-Spam_score: -1.9 X-Spam_bar: - X-Spam_report: (-1.9 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_NONE=0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Eduardo Habkost , "Michael S. Tsirkin" , =?utf-8?q?Philippe_Mathieu-Daud?= =?utf-8?q?=C3=A9?= , Aleksandar Markovic , Paolo Bonzini , Ani Sinha , Igor Mammedov , Aurelien Jarno , Richard Henderson Errors-To: qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Sender: "Qemu-devel" When ACPI hotplug for the root bus is disabled, the bsel property for that bus is not set. Please see the following commit: 3d7e78aa7777f ("Introduce a new flag for i440fx to disable PCI hotplug on the root bus"). As a result, when acpi_pcihp_find_hotplug_bus() is called with bsel set to 0, it may return the root bus. This can cause devices attached to the root bus to get hot-unplugged if the user issues the following set of commmands: outl 0xae10 0 outl 0xae08 your_slot Thanks to Julia for pointing this out here: https://www.mail-archive.com/qemu-devel@nongnu.org/msg734548.html In this patch, we fix the issue in this function by checking if the bus which is returned by the function is actually hotpluggable. If not, we simply return NULL. This avoids the scenario where we were returning a non-hotpluggable bus. This patch is based off of tag v5.10 Signed-off-by: Ani Sinha --- hw/acpi/pcihp.c | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/hw/acpi/pcihp.c b/hw/acpi/pcihp.c index 39b1f74442..32ae8b2c0a 100644 --- a/hw/acpi/pcihp.c +++ b/hw/acpi/pcihp.c @@ -147,6 +147,21 @@ static PCIBus *acpi_pcihp_find_hotplug_bus(AcpiPciHpState *s, int bsel) if (!bsel && !find.bus) { find.bus = s->root; } + + /* + * Check if find.bus is actually hotpluggable. If bsel is set to + * NULL for example on the root bus in order to make it + * non-hotpluggable, find.bus will match the root bus when bsel + * is 0. See acpi_pcihp_test_hotplug_bus() above. Since the + * bus is not hotpluggable however, we should not select the bus. + * Instead, we should set find.bus to NULL in that case. In the check + * below, we generalize this case for all buses, not just the root bus. + * The callers of this function check for a null return value and + * handle them appropriately. + */ + if (find.bus && !qbus_is_hotpluggable(BUS(find.bus))) { + find.bus = NULL; + } return find.bus; } From patchwork Tue Sep 15 14:43:09 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ani Sinha X-Patchwork-Id: 11776771 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 01135746 for ; Tue, 15 Sep 2020 14:47:35 +0000 (UTC) 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 mail.kernel.org (Postfix) with ESMTPS id A202A206B5 for ; Tue, 15 Sep 2020 14:47:34 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (2048-bit key) header.d=anisinha-ca.20150623.gappssmtp.com header.i=@anisinha-ca.20150623.gappssmtp.com header.b="kXM0I/bN" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org A202A206B5 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=anisinha.ca Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Received: from localhost ([::1]:50496 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kICF3-0001l9-Jm for patchwork-qemu-devel@patchwork.kernel.org; Tue, 15 Sep 2020 10:47:33 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:33102) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kICBV-0005Ru-C7 for qemu-devel@nongnu.org; Tue, 15 Sep 2020 10:43:53 -0400 Received: from mail-pl1-x62a.google.com ([2607:f8b0:4864:20::62a]:41907) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1kICBT-0003wI-9s for qemu-devel@nongnu.org; Tue, 15 Sep 2020 10:43:53 -0400 Received: by mail-pl1-x62a.google.com with SMTP id m15so1455340pls.8 for ; Tue, 15 Sep 2020 07:43:50 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=anisinha-ca.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=Q9e5WoPP1IxGkMk/UfsIYmbQR1ZYEM3M7sDwaoDUZm8=; b=kXM0I/bNbbVYAjwGqu0lxtjyIREDGjmF0QTcNX8FGKlqNlbPbbw5laVe29gwbIDMNM +cwHXZWsoPcXcr02Y4wlGfbCNV9RjdQIyWyl4u4F5sdPFEHrHnQshb4nNKIUkgzBIEez P6PzCyAkTjlhdWd4/nR2YGtwGsxyDqaxGmh8CwI5RAHDKi+wG0SUl/F1N7hfv+fWTKyQ wqcij1trV5BNps0Pt/p8AM7C6TjtNDNMn6DTkuhW+rwYcD5yr/iX58QfIJVRxRv2sXRX 9fvHBAnlQef9oJKknItUnzjt2iML5gNsso9ZCgJmKNcNf+Sc5L0Wh5H/MDRop9I3xi25 /ysA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=Q9e5WoPP1IxGkMk/UfsIYmbQR1ZYEM3M7sDwaoDUZm8=; b=IN+38NkCt4+5YI5DM3vhKJ7bA0nBZIwaRJ09biQse/qP8UoNiYfsR7wxKJ5+fSH5fO YBaTAJXMeMHkQ0RjqJENv8JeH4QzE/kIHCQ4aNiKNwM8QmbALmdQC1UnhgZ/IVNAHCyX EvIVItj5OVGrkLDR1t8UUP/24fSOm025MSVRqrFzoWb1sRqA6u5F3lWa0JseHW0Ob+LY 5A+wD7BTWeQmnNt7zagYCUfBXuSePQXEQm1W/WJMRJqaQmiuNsyfAA5u29b+58tXG6oE MUQaCoDV7rz6b5E02OennnTS6k3VButlQwlpHg9hEVJhhBa5yzBsqbOwg+IBsQx51h9f BTHw== X-Gm-Message-State: AOAM5320JeBxyqo8pGUVeeIcwFQ9FsA3ZCcpBWZN7NvB7/4ZslZpl7Nn Efgq33T/e2gTbwL41/l/M8yfhFFdB3sIHWNo X-Google-Smtp-Source: ABdhPJwTCdBuCG43qnXsV3ifrn+w1cqvrsuCpqGuOLs+5ewHi9nPgOWTIW4LtJLRxZfWsZ8G6hkKFw== X-Received: by 2002:a17:90a:f686:: with SMTP id cl6mr4259672pjb.43.1600181029447; Tue, 15 Sep 2020 07:43:49 -0700 (PDT) Received: from localhost.localdomain ([115.96.128.178]) by smtp.googlemail.com with ESMTPSA id r2sm11520693pga.94.2020.09.15.07.43.45 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 15 Sep 2020 07:43:48 -0700 (PDT) From: Ani Sinha To: qemu-devel@nongnu.org Subject: [PATCH v2 5/9] i440fx/acpi: do not add hotplug related amls for cold plugged bridges Date: Tue, 15 Sep 2020 20:13:09 +0530 Message-Id: <20200915144314.4997-6-ani@anisinha.ca> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20200915144314.4997-1-ani@anisinha.ca> References: <20200915144314.4997-1-ani@anisinha.ca> Received-SPF: none client-ip=2607:f8b0:4864:20::62a; envelope-from=ani@anisinha.ca; helo=mail-pl1-x62a.google.com X-detected-operating-system: by eggs.gnu.org: No matching host in p0f cache. That's all we know. X-Spam_score_int: -18 X-Spam_score: -1.9 X-Spam_bar: - X-Spam_report: (-1.9 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_NONE=0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Eduardo Habkost , "Michael S. Tsirkin" , =?utf-8?q?Philippe_Mathieu-Daud?= =?utf-8?q?=C3=A9?= , Aleksandar Markovic , Paolo Bonzini , Ani Sinha , Igor Mammedov , Aurelien Jarno , Richard Henderson Errors-To: qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Sender: "Qemu-devel" Cold plugged bridges are not hot unpluggable, even when their hotplug property (acpi-pci-hotplug-with-bridge-support) is turned off. Please see the function acpi_pcihp_pc_no_hotplug() (thanks Julia). However, with the current implementaton, windows would try to hot-unplug a pci bridge when it's hotplug switch is off. This is regardless of whether there are devices attached to the bridge. This is because we add amls like _EJ0 etc for the pci slot where the bridge is cold plugged. We have a demo video here: https://youtu.be/pME2sjyQweo In this fix, we identify a cold plugged bridge and for cold plugged bridges, we do not add the appropriate amls and acpi methods that are used by the OS to identify a hot-pluggable/unpluggable pci device. After this change, Windows does not show an option to eject the PCI bridge. A demo video is here: https://youtu.be/kbgej5B9Hgs As a result of the patch, the following are the changes to the DSDT ACPI table: @@ -858,38 +858,33 @@ Return (Zero) } Method (_S2D, 0, NotSerialized) // _S2D: S2 Device State { Return (Zero) } Method (_S3D, 0, NotSerialized) // _S3D: S3 Device State { Return (Zero) } } Device (S18) { - Name (_SUN, 0x03) // _SUN: Slot User Number Name (_ADR, 0x00030000) // _ADR: Address - Method (_EJ0, 1, NotSerialized) // _EJx: Eject Device - { - PCEJ (BSEL, _SUN) - } } Device (S20) { Name (_SUN, 0x04) // _SUN: Slot User Number Name (_ADR, 0x00040000) // _ADR: Address Method (_EJ0, 1, NotSerialized) // _EJx: Eject Device { PCEJ (BSEL, _SUN) } } Device (S28) { Name (_SUN, 0x05) // _SUN: Slot User Number Name (_ADR, 0x00050000) // _ADR: Address @@ -1148,37 +1143,32 @@ PCEJ (BSEL, _SUN) } } Device (SF8) { Name (_SUN, 0x1F) // _SUN: Slot User Number Name (_ADR, 0x001F0000) // _ADR: Address Method (_EJ0, 1, NotSerialized) // _EJx: Eject Device { PCEJ (BSEL, _SUN) } } Method (DVNT, 2, NotSerialized) { - If ((Arg0 & 0x08)) - { - Notify (S18, Arg1) - } - If ((Arg0 & 0x10)) { Notify (S20, Arg1) } If ((Arg0 & 0x20)) { Notify (S28, Arg1) } If ((Arg0 & 0x40)) { Notify (S30, Arg1) } If ((Arg0 & 0x80)) While at it, I have also updated a stale comment. This change is tested with a Windows 2012R2 guest image and Windows 2019 server guest image running on Ubuntu 18.04 host. This change is based off of upstream qemu master branch tag v5.1.0. Signed-off-by: Ani Sinha --- hw/i386/acpi-build.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/hw/i386/acpi-build.c b/hw/i386/acpi-build.c index 7a5a8b3521..e079b686f5 100644 --- a/hw/i386/acpi-build.c +++ b/hw/i386/acpi-build.c @@ -359,6 +359,7 @@ static void build_append_pci_bus_devices(Aml *parent_scope, PCIBus *bus, int slot = PCI_SLOT(i); bool hotplug_enabled_dev; bool bridge_in_acpi; + bool cold_plugged_bridge; if (!pdev) { if (bsel) { /* add hotplug slots for non present devices */ @@ -380,15 +381,14 @@ static void build_append_pci_bus_devices(Aml *parent_scope, PCIBus *bus, pc = PCI_DEVICE_GET_CLASS(pdev); dc = DEVICE_GET_CLASS(pdev); - /* When hotplug for bridges is enabled, bridges are - * described in ACPI separately (see build_pci_bus_end). - * In this case they aren't themselves hot-pluggable. + /* + * Cold plugged bridges aren't themselves hot-pluggable. * Hotplugged bridges *are* hot-pluggable. */ - bridge_in_acpi = pc->is_bridge && pcihp_bridge_en && - !DEVICE(pdev)->hotplugged; + cold_plugged_bridge = pc->is_bridge && !DEVICE(pdev)->hotplugged; + bridge_in_acpi = cold_plugged_bridge && pcihp_bridge_en; - hotplug_enabled_dev = bsel && dc->hotpluggable && !bridge_in_acpi; + hotplug_enabled_dev = bsel && dc->hotpluggable && !cold_plugged_bridge; if (pc->class_id == PCI_CLASS_BRIDGE_ISA) { continue; From patchwork Tue Sep 15 14:43:10 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ani Sinha X-Patchwork-Id: 11776773 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id B596A6CA for ; Tue, 15 Sep 2020 14:47:36 +0000 (UTC) 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 mail.kernel.org (Postfix) with ESMTPS id 5802D206B5 for ; Tue, 15 Sep 2020 14:47:36 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (2048-bit key) header.d=anisinha-ca.20150623.gappssmtp.com header.i=@anisinha-ca.20150623.gappssmtp.com header.b="sJLXYDNU" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 5802D206B5 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=anisinha.ca Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Received: from localhost ([::1]:50660 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kICF5-0001p7-9z for patchwork-qemu-devel@patchwork.kernel.org; Tue, 15 Sep 2020 10:47:35 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:33114) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kICBZ-0005dR-K6 for qemu-devel@nongnu.org; Tue, 15 Sep 2020 10:43:57 -0400 Received: from mail-pj1-x1042.google.com ([2607:f8b0:4864:20::1042]:54684) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1kICBX-0003wY-Si for qemu-devel@nongnu.org; Tue, 15 Sep 2020 10:43:57 -0400 Received: by mail-pj1-x1042.google.com with SMTP id mm21so1877875pjb.4 for ; Tue, 15 Sep 2020 07:43:55 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=anisinha-ca.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=fmZ0zShxvpsHgpLnoq8aruXTkYTNo4xgCabQ1KXMZUo=; b=sJLXYDNUVVBG6iFbN/fmRuiCQNJVCoQxe6oWDVqxmXyvC4whl+3xMzZ0Qlgk6XYlIw FnSqtqKoYYOoiyJ1WOY/CrKxxM/Zu5Wa/inWAwQDTEhIoP8iIsiAnxDmg825KJ+Tw99a HXDZ9UPFpO8zi7JX23hGKgjJe+TonqPmdrp2uOH8aKF3PwB0OgjX3Hfq6K8DRbK4pDfQ gH7vMtd6uQ3w/Jw7CWdNL4z387J9AdLziB5Zl4EQa+LgmDX+zqwYmPlMDYfK77U1+D0s fxeoG+n8tJkv0eJlzf83hwsFP+cO6PNm+1qIjfiex1zJi59dh9ep0jHkKSP+R4OU0IpG ZEaA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=fmZ0zShxvpsHgpLnoq8aruXTkYTNo4xgCabQ1KXMZUo=; b=gZBuID8YelH7SEgcgA7OrTSL3AdImide6OF7ZSilcLC5ZmG7P7Irukavi2IrSSj0e+ q83htY+70iJ7pHHD+pT77qJZDdjFsO56QBll7ptQAhJUaqqDscgvcQZWNmTOELB3Hc5o XEHQqFqLtcm/S796DZs64ygvoDtSqV/4/9CyQLDv6HG/4BCr4dMStLXqRTNsHTSF+t3w PWXzLOS3GHg8+AyJqM030154SXHn7pAHqHoFJu6TGKAaMXa0z2V8UZgNJdRNPAiteW5M HoIG/XsL0MVqGJbrDXlw7mD2VmcJNbOkjQta+1LfsGAAAt8E2g21kmFSJaV5X9RHPAu8 WgHg== X-Gm-Message-State: AOAM5335WthveliG9TC/Xe9j+L2UA/Reno1hmPIVFOEG4jwPI0GonRdq y+BIKQg6oUgaInQopisCAMnMxTqGtwVl2DQd X-Google-Smtp-Source: ABdhPJwghds48BP67HU/Cm3pKFVw+cjupcXmI5XU7R7AWT0ohwniNBStBkB4mZom8lGkr5GrX4JtnA== X-Received: by 2002:a17:90a:d991:: with SMTP id d17mr4226319pjv.95.1600181034204; Tue, 15 Sep 2020 07:43:54 -0700 (PDT) Received: from localhost.localdomain ([115.96.128.178]) by smtp.googlemail.com with ESMTPSA id r2sm11520693pga.94.2020.09.15.07.43.49 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 15 Sep 2020 07:43:53 -0700 (PDT) From: Ani Sinha To: qemu-devel@nongnu.org Subject: [PATCH v2 6/9] tests/acpi: list added acpi table binary file for pci bridge hotplug test Date: Tue, 15 Sep 2020 20:13:10 +0530 Message-Id: <20200915144314.4997-7-ani@anisinha.ca> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20200915144314.4997-1-ani@anisinha.ca> References: <20200915144314.4997-1-ani@anisinha.ca> Received-SPF: none client-ip=2607:f8b0:4864:20::1042; envelope-from=ani@anisinha.ca; helo=mail-pj1-x1042.google.com X-detected-operating-system: by eggs.gnu.org: No matching host in p0f cache. That's all we know. X-Spam_score_int: -18 X-Spam_score: -1.9 X-Spam_bar: - X-Spam_report: (-1.9 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_NONE=0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Eduardo Habkost , "Michael S. Tsirkin" , =?utf-8?q?Philippe_Mathieu-Daud?= =?utf-8?q?=C3=A9?= , Aleksandar Markovic , Paolo Bonzini , Ani Sinha , Igor Mammedov , Aurelien Jarno , Richard Henderson Errors-To: qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Sender: "Qemu-devel" The file 'tests/data/acpi/pc/DSDT.hpbridge' is a newly added acpi table file for testing the pci bridge option 'acpi-pci-hotplug-with-bridge-support' under i440fx. This change documents this fact. Signed-off-by: Ani Sinha --- 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..96a9237355 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/pc/DSDT.hpbridge", From patchwork Tue Sep 15 14:43:11 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ani Sinha X-Patchwork-Id: 11776779 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 0CAD9746 for ; Tue, 15 Sep 2020 14:49:27 +0000 (UTC) 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 mail.kernel.org (Postfix) with ESMTPS id 8F508206B5 for ; Tue, 15 Sep 2020 14:49:26 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (2048-bit key) header.d=anisinha-ca.20150623.gappssmtp.com header.i=@anisinha-ca.20150623.gappssmtp.com header.b="q22YTofw" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 8F508206B5 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=anisinha.ca Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Received: from localhost ([::1]:56670 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kICGr-0004Hp-Gy for patchwork-qemu-devel@patchwork.kernel.org; Tue, 15 Sep 2020 10:49:25 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:33154) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kICBf-0005rl-5O for qemu-devel@nongnu.org; Tue, 15 Sep 2020 10:44:03 -0400 Received: from mail-pg1-x544.google.com ([2607:f8b0:4864:20::544]:44453) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1kICBd-0003x7-9g for qemu-devel@nongnu.org; Tue, 15 Sep 2020 10:44:02 -0400 Received: by mail-pg1-x544.google.com with SMTP id 7so2075460pgm.11 for ; Tue, 15 Sep 2020 07:44:00 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=anisinha-ca.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=2ewfdud3Ii165X4VcRbJ5b/hyrisJxrCmECD6rzxA/4=; b=q22YTofwxqzTESX2hGeFOq23xTBebaBsxkQwTni3IwirBzqcGDEdijIngH+GOu6gcp R4p7A8DYtSoIIIcBqRtBLZvscNJBj8IYxl4WXtrPJ2gdaw5N4/HuAqgJgDJcL7Tvwn5t +gLhZeiL0k6zbrUldHxFp4sKZBbKiK+6KQWfWH9P9PM2sL6JEHl6gFFXnzgS4aQLzldC 7ob2QZ9nn5pa3LCObLqRH7HdDRrGDYnDPvp+ZvWi2Iaxfak5CqpA4AqJNHXN0cWAGiGx kHlrlQ7QM8YFGv+58/4nL/hMFrws+Y4E7Bf6ZoSW7TANtCBdeIjNTLuuvHFph/pYvMe/ cPvQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=2ewfdud3Ii165X4VcRbJ5b/hyrisJxrCmECD6rzxA/4=; b=L7d7PhgeT5u7mXSzSpIELd10EtT9ZQu503YAt3iCszULergJrGtrkJyi850mmFM7FX 30iVIaF16Hh9vPCM96Adwzs9NGWVhZJmh8s7z1VnWL8c7uRNMfqp5+dPLhMGan2/vDkE 4iugBzXt5h/l+9hJBLLIJWi+SN3Bk5jxjzAs+8Jdemln7nui3wJGX6lST4WphjwB11L2 xalWlToE/F0aqd9Kbvhj1FKFP4pBi6uA7DgoXEFA5pDc1sqs2jcEDSThxypyrrFSQMu9 L2hWrHcOtz8qm4Y23+6g6DTm1YAmaXzX3OJGXUmGuyoDjspWJKOJDDH+MIaheoy/2YaS z7/Q== X-Gm-Message-State: AOAM532opWyqYF2mjuSKnRq5jCtM3DEa5DtCRjXZoEy9GKwJGEJ0rQjC SSxmYyg1YqOIJNbpgECjKP+2mbvbuAg6ArOg6y4= X-Google-Smtp-Source: ABdhPJzpuntK3DhpQNJmTt59Og6TibQEjnvpvTWyomW9ag8+xFbzmHIqDlojQLPpfFFA1Vo6zr27sA== X-Received: by 2002:a63:5fc3:: with SMTP id t186mr14678983pgb.100.1600181039449; Tue, 15 Sep 2020 07:43:59 -0700 (PDT) Received: from localhost.localdomain ([115.96.128.178]) by smtp.googlemail.com with ESMTPSA id r2sm11520693pga.94.2020.09.15.07.43.54 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 15 Sep 2020 07:43:58 -0700 (PDT) From: Ani Sinha To: qemu-devel@nongnu.org Subject: [PATCH v2 7/9] tests/acpi: unit test for 'acpi-pci-hotplug-with-bridge-support' bridge flag Date: Tue, 15 Sep 2020 20:13:11 +0530 Message-Id: <20200915144314.4997-8-ani@anisinha.ca> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20200915144314.4997-1-ani@anisinha.ca> References: <20200915144314.4997-1-ani@anisinha.ca> Received-SPF: none client-ip=2607:f8b0:4864:20::544; envelope-from=ani@anisinha.ca; helo=mail-pg1-x544.google.com X-detected-operating-system: by eggs.gnu.org: No matching host in p0f cache. That's all we know. X-Spam_score_int: -18 X-Spam_score: -1.9 X-Spam_bar: - X-Spam_report: (-1.9 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_NONE=0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Laurent Vivier , Thomas Huth , Eduardo Habkost , "Michael S. Tsirkin" , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , Aleksandar Markovic , Paolo Bonzini , Ani Sinha , Igor Mammedov , Aurelien Jarno , Richard Henderson Errors-To: qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Sender: "Qemu-devel" This change adds a new unit test for the global flag 'acpi-pci-hotplug-with-bridge-support' which is available for cold plugged pci bridges in i440fx. The flag can be used to turn off acpi based hotplug support for all pci bridges. Signed-off-by: Ani Sinha --- tests/qtest/bios-tables-test.c | 15 +++++++++++++++ 1 file changed, 15 insertions(+) changelog: v1: initial patch. v2: commit log updated. diff --git a/tests/qtest/bios-tables-test.c b/tests/qtest/bios-tables-test.c index d8c7d57557..7632cfe1be 100644 --- a/tests/qtest/bios-tables-test.c +++ b/tests/qtest/bios-tables-test.c @@ -754,6 +754,20 @@ static void test_acpi_piix4_root_hotplug(void) free_test_data(&data); } +static void test_acpi_piix4_bridge_hotplug(void) +{ + test_data data; + + memset(&data, 0, sizeof(data)); + data.machine = MACHINE_PC; + data.variant = ".hpbridge"; + data.required_struct_types = base_required_struct_types; + data.required_struct_types_len = ARRAY_SIZE(base_required_struct_types); + test_acpi_one("-global PIIX4_PM.acpi-pci-hotplug-with-bridge-support=off " + "-device pci-bridge,chassis_nr=1", &data); + free_test_data(&data); +} + static void test_acpi_q35_tcg(void) { test_data data; @@ -1159,6 +1173,7 @@ int main(int argc, char *argv[]) qtest_add_func("acpi/piix4", test_acpi_piix4_tcg); qtest_add_func("acpi/piix4/bridge", test_acpi_piix4_tcg_bridge); qtest_add_func("acpi/piix4/hotplug", test_acpi_piix4_root_hotplug); + qtest_add_func("acpi/piix4/brhotplug", test_acpi_piix4_bridge_hotplug); qtest_add_func("acpi/q35", test_acpi_q35_tcg); qtest_add_func("acpi/q35/bridge", test_acpi_q35_tcg_bridge); qtest_add_func("acpi/q35/mmio64", test_acpi_q35_tcg_mmio64); From patchwork Tue Sep 15 14:43:12 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ani Sinha X-Patchwork-Id: 11776781 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 7B8506CA for ; Tue, 15 Sep 2020 14:49:43 +0000 (UTC) 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 mail.kernel.org (Postfix) with ESMTPS id 1F5AD206C9 for ; Tue, 15 Sep 2020 14:49:43 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (2048-bit key) header.d=anisinha-ca.20150623.gappssmtp.com header.i=@anisinha-ca.20150623.gappssmtp.com header.b="Q0WzjNnl" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 1F5AD206C9 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=anisinha.ca Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Received: from localhost ([::1]:58040 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kICH7-0004pS-TH for patchwork-qemu-devel@patchwork.kernel.org; Tue, 15 Sep 2020 10:49:41 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:33188) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kICBk-00063f-Q7 for qemu-devel@nongnu.org; Tue, 15 Sep 2020 10:44:08 -0400 Received: from mail-pj1-x1042.google.com ([2607:f8b0:4864:20::1042]:52249) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1kICBi-0003xk-2Q for qemu-devel@nongnu.org; Tue, 15 Sep 2020 10:44:08 -0400 Received: by mail-pj1-x1042.google.com with SMTP id o16so1884357pjr.2 for ; Tue, 15 Sep 2020 07:44:05 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=anisinha-ca.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=ARrqKiw0ZI71X/nMn8SUrP42xKqFqGltw1z766gv2gQ=; b=Q0WzjNnlE9i2LLiDDSjlbUwV/XIGeyxlx+zwhZPZt+QoVVwbdJkZ1S9lasvuUjy1B4 XEw4OfR5lepxgetxfOLWFEFnh6HZQr4Iu8nQKi6hZYCYCFfHzKIaAHxm1pu1LII7lY7I UoN6JTIvzLEajrGisUyNHPknG6/XcOXVQsmjuFbx1p6oGLWnXlP2Y7XDsVvDTnYGH4hi EtNYHrKiv1tg8U1SsJFNWE/Fl7LwdNmbZRYbs2EuKUb4OlPE9a4iy+FU04ghRj6mBtkN jxaQZdKQOHtvHV0TZjy5NipY7s21TPUC2wjXJ8PE3b4d+/73hEo0VkOc8llyv0YuB2GI CzcQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=ARrqKiw0ZI71X/nMn8SUrP42xKqFqGltw1z766gv2gQ=; b=j5yU53WEybpiK9pK6D3Jimq6nEpZ4ZhzidSbBSDfnILkNnAAhlOBZ0HOeCNjJFe9rz LxLmPI2hdtn8Bq4u0xdDTIhMag+XuzpKL5PMCCnRe2HGYNMVCQ5+BL11uoK+Gs3O+uVG KSYWjeYzv4a9+MfOlfzktVjEPQ5yjS5WgDYI0rx9kAvwrR54ZDefb0zpMxmcYuIiIkK+ 1DIeZvbctXnexK0kxXELoDm28paog9pUTMIpSijkwVibFyj76qYfVX5QW5Lr17XOMzHT ivRtRvSmKWD2wc3UiGt1IULFsu6qShTQysF3jMGXN2iSv0F+qDRV2oXgmK/WXAmtqtDZ AJIg== X-Gm-Message-State: AOAM530tumroQ0A2PVJtRA6cBD0ac4K0Ayz/r94spNU1IbgrbjS0w8W+ PUbN7jyqBO/IoEZIXb8T4gTgIe0Lc+Zkra5J X-Google-Smtp-Source: ABdhPJwgEot1PHlftxMWkl0G3weMwH7vBdkTfpfHMxIaunxRTtcH+OdODAT9AsmpRBmuPsVoa8Hp0w== X-Received: by 2002:a17:902:9a88:b029:d1:e5e7:bdee with SMTP id w8-20020a1709029a88b02900d1e5e7bdeemr2079969plp.78.1600181044125; Tue, 15 Sep 2020 07:44:04 -0700 (PDT) Received: from localhost.localdomain ([115.96.128.178]) by smtp.googlemail.com with ESMTPSA id r2sm11520693pga.94.2020.09.15.07.43.59 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 15 Sep 2020 07:44:03 -0700 (PDT) From: Ani Sinha To: qemu-devel@nongnu.org Subject: [PATCH v2 8/9] tests/acpi: add newly added acpi DSDT table blob for pci bridge hotplug flag Date: Tue, 15 Sep 2020 20:13:12 +0530 Message-Id: <20200915144314.4997-9-ani@anisinha.ca> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20200915144314.4997-1-ani@anisinha.ca> References: <20200915144314.4997-1-ani@anisinha.ca> Received-SPF: none client-ip=2607:f8b0:4864:20::1042; envelope-from=ani@anisinha.ca; helo=mail-pj1-x1042.google.com X-detected-operating-system: by eggs.gnu.org: No matching host in p0f cache. That's all we know. X-Spam_score_int: -18 X-Spam_score: -1.9 X-Spam_bar: - X-Spam_report: (-1.9 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_NONE=0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Eduardo Habkost , "Michael S. Tsirkin" , =?utf-8?q?Philippe_Mathieu-Daud?= =?utf-8?q?=C3=A9?= , Aleksandar Markovic , Paolo Bonzini , Ani Sinha , Igor Mammedov , Aurelien Jarno , Richard Henderson Errors-To: qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Sender: "Qemu-devel" This patch adds a binary blob corresponding to the DSDT acpi table. It is used to unit test the flag 'acpi-pci-hotplug-with-bridge-support' used with pci bridges. This change also clears the file tests/qtest/bios-tables-test-allowed-diff.h so that future changes which affect the table can be caught. The following is the diff between files tests/data/acpi/pc/DSDT.bridge and tests/data/acpi/pc/DSDT.hpbridge after disassembly : @@ -1,30 +1,30 @@ /* * Intel ACPI Component Architecture * AML/ASL+ Disassembler version 20180105 (64-bit version) * Copyright (c) 2000 - 2018 Intel Corporation * * Disassembling to symbolic ASL+ operators * - * Disassembly of tests/data/acpi/pc/DSDT.bridge, Fri Sep 11 23:21:34 2020 + * Disassembly of /tmp/aml-7UURQ0, Fri Sep 11 23:21:34 2020 * * Original Table Header: * Signature "DSDT" - * Length 0x00001A89 (6793) + * Length 0x0000131F (4895) * Revision 0x01 **** 32-bit table (V1), no 64-bit math support - * Checksum 0x09 + * Checksum 0xF9 * OEM ID "BOCHS " * OEM Table ID "BXPCDSDT" * OEM Revision 0x00000001 (1) * Compiler ID "BXPC" * Compiler Version 0x00000001 (1) */ DefinitionBlock ("", "DSDT", 1, "BOCHS ", "BXPCDSDT", 0x00000001) { Scope (\) { OperationRegion (DBG, SystemIO, 0x0402, One) Field (DBG, ByteAcc, NoLock, Preserve) { DBGB, 8 } @@ -859,522 +859,32 @@ } Method (_S2D, 0, NotSerialized) // _S2D: S2 Device State { Return (Zero) } Method (_S3D, 0, NotSerialized) // _S3D: S3 Device State { Return (Zero) } } Device (S18) { Name (_ADR, 0x00030000) // _ADR: Address - Name (BSEL, One) - Device (S00) - { - Name (_SUN, Zero) // _SUN: Slot User Number - Name (_ADR, Zero) // _ADR: Address - Method (_EJ0, 1, NotSerialized) // _EJx: Eject Device - { - PCEJ (BSEL, _SUN) - } - } - - Device (S08) - { - Name (_SUN, One) // _SUN: Slot User Number - Name (_ADR, 0x00010000) // _ADR: Address - Method (_EJ0, 1, NotSerialized) // _EJx: Eject Device - { - PCEJ (BSEL, _SUN) - } - } - - Device (S10) - { - Name (_SUN, 0x02) // _SUN: Slot User Number - Name (_ADR, 0x00020000) // _ADR: Address - Method (_EJ0, 1, NotSerialized) // _EJx: Eject Device - { - PCEJ (BSEL, _SUN) - } - } - - Device (S18) - { - Name (_SUN, 0x03) // _SUN: Slot User Number - Name (_ADR, 0x00030000) // _ADR: Address - Method (_EJ0, 1, NotSerialized) // _EJx: Eject Device - { - PCEJ (BSEL, _SUN) - } - } - - Device (S20) - { - Name (_SUN, 0x04) // _SUN: Slot User Number - Name (_ADR, 0x00040000) // _ADR: Address - Method (_EJ0, 1, NotSerialized) // _EJx: Eject Device - { - PCEJ (BSEL, _SUN) - } - } - - Device (S28) - { - Name (_SUN, 0x05) // _SUN: Slot User Number - Name (_ADR, 0x00050000) // _ADR: Address - Method (_EJ0, 1, NotSerialized) // _EJx: Eject Device - { - PCEJ (BSEL, _SUN) - } - } - - Device (S30) - { - Name (_SUN, 0x06) // _SUN: Slot User Number - Name (_ADR, 0x00060000) // _ADR: Address - Method (_EJ0, 1, NotSerialized) // _EJx: Eject Device - { - PCEJ (BSEL, _SUN) - } - } - - Device (S38) - { - Name (_SUN, 0x07) // _SUN: Slot User Number - Name (_ADR, 0x00070000) // _ADR: Address - Method (_EJ0, 1, NotSerialized) // _EJx: Eject Device - { - PCEJ (BSEL, _SUN) - } - } - - Device (S40) - { - Name (_SUN, 0x08) // _SUN: Slot User Number - Name (_ADR, 0x00080000) // _ADR: Address - Method (_EJ0, 1, NotSerialized) // _EJx: Eject Device - { - PCEJ (BSEL, _SUN) - } - } - - Device (S48) - { - Name (_SUN, 0x09) // _SUN: Slot User Number - Name (_ADR, 0x00090000) // _ADR: Address - Method (_EJ0, 1, NotSerialized) // _EJx: Eject Device - { - PCEJ (BSEL, _SUN) - } - } - - Device (S50) - { - Name (_SUN, 0x0A) // _SUN: Slot User Number - Name (_ADR, 0x000A0000) // _ADR: Address - Method (_EJ0, 1, NotSerialized) // _EJx: Eject Device - { - PCEJ (BSEL, _SUN) - } - } - - Device (S58) - { - Name (_SUN, 0x0B) // _SUN: Slot User Number - Name (_ADR, 0x000B0000) // _ADR: Address - Method (_EJ0, 1, NotSerialized) // _EJx: Eject Device - { - PCEJ (BSEL, _SUN) - } - } - - Device (S60) - { - Name (_SUN, 0x0C) // _SUN: Slot User Number - Name (_ADR, 0x000C0000) // _ADR: Address - Method (_EJ0, 1, NotSerialized) // _EJx: Eject Device - { - PCEJ (BSEL, _SUN) - } - } - - Device (S68) - { - Name (_SUN, 0x0D) // _SUN: Slot User Number - Name (_ADR, 0x000D0000) // _ADR: Address - Method (_EJ0, 1, NotSerialized) // _EJx: Eject Device - { - PCEJ (BSEL, _SUN) - } - } - - Device (S70) - { - Name (_SUN, 0x0E) // _SUN: Slot User Number - Name (_ADR, 0x000E0000) // _ADR: Address - Method (_EJ0, 1, NotSerialized) // _EJx: Eject Device - { - PCEJ (BSEL, _SUN) - } - } - - Device (S78) - { - Name (_SUN, 0x0F) // _SUN: Slot User Number - Name (_ADR, 0x000F0000) // _ADR: Address - Method (_EJ0, 1, NotSerialized) // _EJx: Eject Device - { - PCEJ (BSEL, _SUN) - } - } - - Device (S80) - { - Name (_SUN, 0x10) // _SUN: Slot User Number - Name (_ADR, 0x00100000) // _ADR: Address - Method (_EJ0, 1, NotSerialized) // _EJx: Eject Device - { - PCEJ (BSEL, _SUN) - } - } - - Device (S88) - { - Name (_SUN, 0x11) // _SUN: Slot User Number - Name (_ADR, 0x00110000) // _ADR: Address - Method (_EJ0, 1, NotSerialized) // _EJx: Eject Device - { - PCEJ (BSEL, _SUN) - } - } - - Device (S90) - { - Name (_SUN, 0x12) // _SUN: Slot User Number - Name (_ADR, 0x00120000) // _ADR: Address - Method (_EJ0, 1, NotSerialized) // _EJx: Eject Device - { - PCEJ (BSEL, _SUN) - } - } - - Device (S98) - { - Name (_SUN, 0x13) // _SUN: Slot User Number - Name (_ADR, 0x00130000) // _ADR: Address - Method (_EJ0, 1, NotSerialized) // _EJx: Eject Device - { - PCEJ (BSEL, _SUN) - } - } - - Device (SA0) - { - Name (_SUN, 0x14) // _SUN: Slot User Number - Name (_ADR, 0x00140000) // _ADR: Address - Method (_EJ0, 1, NotSerialized) // _EJx: Eject Device - { - PCEJ (BSEL, _SUN) - } - } - - Device (SA8) - { - Name (_SUN, 0x15) // _SUN: Slot User Number - Name (_ADR, 0x00150000) // _ADR: Address - Method (_EJ0, 1, NotSerialized) // _EJx: Eject Device - { - PCEJ (BSEL, _SUN) - } - } - - Device (SB0) - { - Name (_SUN, 0x16) // _SUN: Slot User Number - Name (_ADR, 0x00160000) // _ADR: Address - Method (_EJ0, 1, NotSerialized) // _EJx: Eject Device - { - PCEJ (BSEL, _SUN) - } - } - - Device (SB8) - { - Name (_SUN, 0x17) // _SUN: Slot User Number - Name (_ADR, 0x00170000) // _ADR: Address - Method (_EJ0, 1, NotSerialized) // _EJx: Eject Device - { - PCEJ (BSEL, _SUN) - } - } - - Device (SC0) - { - Name (_SUN, 0x18) // _SUN: Slot User Number - Name (_ADR, 0x00180000) // _ADR: Address - Method (_EJ0, 1, NotSerialized) // _EJx: Eject Device - { - PCEJ (BSEL, _SUN) - } - } - - Device (SC8) - { - Name (_SUN, 0x19) // _SUN: Slot User Number - Name (_ADR, 0x00190000) // _ADR: Address - Method (_EJ0, 1, NotSerialized) // _EJx: Eject Device - { - PCEJ (BSEL, _SUN) - } - } - - Device (SD0) - { - Name (_SUN, 0x1A) // _SUN: Slot User Number - Name (_ADR, 0x001A0000) // _ADR: Address - Method (_EJ0, 1, NotSerialized) // _EJx: Eject Device - { - PCEJ (BSEL, _SUN) - } - } - - Device (SD8) - { - Name (_SUN, 0x1B) // _SUN: Slot User Number - Name (_ADR, 0x001B0000) // _ADR: Address - Method (_EJ0, 1, NotSerialized) // _EJx: Eject Device - { - PCEJ (BSEL, _SUN) - } - } - - Device (SE0) - { - Name (_SUN, 0x1C) // _SUN: Slot User Number - Name (_ADR, 0x001C0000) // _ADR: Address - Method (_EJ0, 1, NotSerialized) // _EJx: Eject Device - { - PCEJ (BSEL, _SUN) - } - } - - Device (SE8) - { - Name (_SUN, 0x1D) // _SUN: Slot User Number - Name (_ADR, 0x001D0000) // _ADR: Address - Method (_EJ0, 1, NotSerialized) // _EJx: Eject Device - { - PCEJ (BSEL, _SUN) - } - } - - Device (SF0) - { - Name (_SUN, 0x1E) // _SUN: Slot User Number - Name (_ADR, 0x001E0000) // _ADR: Address - Method (_EJ0, 1, NotSerialized) // _EJx: Eject Device - { - PCEJ (BSEL, _SUN) - } - } - - Device (SF8) - { - Name (_SUN, 0x1F) // _SUN: Slot User Number - Name (_ADR, 0x001F0000) // _ADR: Address - Method (_EJ0, 1, NotSerialized) // _EJx: Eject Device - { - PCEJ (BSEL, _SUN) - } - } - - Method (DVNT, 2, NotSerialized) - { - If ((Arg0 & One)) - { - Notify (S00, Arg1) - } - - If ((Arg0 & 0x02)) - { - Notify (S08, Arg1) - } - - If ((Arg0 & 0x04)) - { - Notify (S10, Arg1) - } - - If ((Arg0 & 0x08)) - { - Notify (S18, Arg1) - } - - If ((Arg0 & 0x10)) - { - Notify (S20, Arg1) - } - - If ((Arg0 & 0x20)) - { - Notify (S28, Arg1) - } - - If ((Arg0 & 0x40)) - { - Notify (S30, Arg1) - } - - If ((Arg0 & 0x80)) - { - Notify (S38, Arg1) - } - - If ((Arg0 & 0x0100)) - { - Notify (S40, Arg1) - } - - If ((Arg0 & 0x0200)) - { - Notify (S48, Arg1) - } - - If ((Arg0 & 0x0400)) - { - Notify (S50, Arg1) - } - - If ((Arg0 & 0x0800)) - { - Notify (S58, Arg1) - } - - If ((Arg0 & 0x1000)) - { - Notify (S60, Arg1) - } - - If ((Arg0 & 0x2000)) - { - Notify (S68, Arg1) - } - - If ((Arg0 & 0x4000)) - { - Notify (S70, Arg1) - } - - If ((Arg0 & 0x8000)) - { - Notify (S78, Arg1) - } - - If ((Arg0 & 0x00010000)) - { - Notify (S80, Arg1) - } - - If ((Arg0 & 0x00020000)) - { - Notify (S88, Arg1) - } - - If ((Arg0 & 0x00040000)) - { - Notify (S90, Arg1) - } - - If ((Arg0 & 0x00080000)) - { - Notify (S98, Arg1) - } - - If ((Arg0 & 0x00100000)) - { - Notify (SA0, Arg1) - } - - If ((Arg0 & 0x00200000)) - { - Notify (SA8, Arg1) - } - - If ((Arg0 & 0x00400000)) - { - Notify (SB0, Arg1) - } - - If ((Arg0 & 0x00800000)) - { - Notify (SB8, Arg1) - } - - If ((Arg0 & 0x01000000)) - { - Notify (SC0, Arg1) - } - - If ((Arg0 & 0x02000000)) - { - Notify (SC8, Arg1) - } - - If ((Arg0 & 0x04000000)) - { - Notify (SD0, Arg1) - } - - If ((Arg0 & 0x08000000)) - { - Notify (SD8, Arg1) - } - - If ((Arg0 & 0x10000000)) - { - Notify (SE0, Arg1) - } - - If ((Arg0 & 0x20000000)) - { - Notify (SE8, Arg1) - } - - If ((Arg0 & 0x40000000)) - { - Notify (SF0, Arg1) - } - - If ((Arg0 & 0x80000000)) - { - Notify (SF8, Arg1) - } - } - - Method (PCNT, 0, NotSerialized) - { - BNUM = One - DVNT (PCIU, One) - DVNT (PCID, 0x03) - } } Device (S20) { Name (_SUN, 0x04) // _SUN: Slot User Number Name (_ADR, 0x00040000) // _ADR: Address Method (_EJ0, 1, NotSerialized) // _EJx: Eject Device { PCEJ (BSEL, _SUN) } } Device (S28) { Name (_SUN, 0x05) // _SUN: Slot User Number Name (_ADR, 0x00050000) // _ADR: Address @@ -1779,22 +1289,21 @@ If ((Arg0 & 0x40000000)) { Notify (SF0, Arg1) } If ((Arg0 & 0x80000000)) { Notify (SF8, Arg1) } } Method (PCNT, 0, NotSerialized) { BNUM = Zero DVNT (PCIU, One) DVNT (PCID, 0x03) - ^S18.PCNT () } } } } Signed-off-by: Ani Sinha --- tests/data/acpi/pc/DSDT.hpbridge | Bin 0 -> 4895 bytes tests/qtest/bios-tables-test-allowed-diff.h | 1 - 2 files changed, 1 deletion(-) create mode 100644 tests/data/acpi/pc/DSDT.hpbridge diff --git a/tests/data/acpi/pc/DSDT.hpbridge b/tests/data/acpi/pc/DSDT.hpbridge new file mode 100644 index 0000000000000000000000000000000000000000..b0751398541bdf88ce405be9742aeba0b375dbc3 GIT binary patch literal 4895 zcmb7IQE%Hu5}p+)hgwNCWixSVw~gQ=SF}AelAO9J?!^)*ONuR-5#`(+Xn>UM;^d-5 ziL?Rg8pSCp;HG&ibUEC^J*a`6t!ol_>-v{sAB*?@AR!!$ zH|n4`I~4=esuEy|O4%$n1c)Js%yzqMHmZ;S_~Dm0$o3=M+b;Td5SEJ&9q)NDeZ< z5vad=hoYfy?aorg$~%6n=$>IH=Ix9g;Vzfe+Ttxq010JxZf_P01P3Wf7(GTM++5|C zOUwlq7%Q;@IKc0f2zs+SH>%q^qfv7UFO5=obOlsG<&_OXAI;w-oH+`9nO`ljpQN88 zkW1`^^g;r*vJP*_K5=$q%gl>;-Y_cjX%%>sZ}SY}r#!-M;@>=9<^%o_|C!HmMR7Ka zVrr3VQ~~3k2nu#5w`Df6B0V`+JN8nzDo>W!=hEkrqO7$27;^e{bu=c5Xk5@KW6q>A z36vGpA9J(b&_@#zA7<)Pd*A_6R)FCum6h{lYMZ*%U~zcP6|4>tbX>ljG(L>9-L{H% zv5J-F9BU^|f?miJ@1mhltJYau4Gbjch1yOvZL`9bz6sh*Q!n0)*w;xK47?T@y(4xA zG~9lJ)O}EESbYUY-Q-j;n!z2j-T-et(sn&)J}bnYHhJ6oqRAt$=N&(2?g5uzzo&Nh z5fsCU+p29EaL~Ka-Dka2x5?#^+Jb}ck|QaPpj3CCM@E{$P$P{rIvjXk9_?`zu;$_M z0f2YhM1PMD7l5C2dt-)m69r?Phm$zI)z(&3bX%o zPd|D1VE=(%=V z8$yPGtm{<+Tg^OyB;6`*r4ec58)+@!RB9E)15#r0Z}0kD3S$Z4OXhX6lF4K<6hUwl zMzxgQ*!Xj#$Ga^!(KDIMp;n&39+r>U*LQEp;*6mjDR$~alWKJ4f!kZ^P8ukBkI%XG z8y75Fn|)WSMk%A;=7>#FA;VODtvst+dQAySgSpT0@vh4-bPpy;afW*(`9ebeO5k)& z!g2DMcOf!Fd(8cAQ|^^7Qu*sSor+5rxe$(A(-W=6^lht=2upP8dR+(>GxiRrtG&nN(NeoA8N~3 zz9qBh6f-$oApg2UrA(`;Zp&oyH}i0g6x6eXM5-5PK1+<`Bp!SK|M_|mAh6S+G8oXI zLZ1lu7IDK-27~W^2`vBm`N`YoV*(w)27|$01w7C~o4)B*rpq`5!L2N5*33*Ery%G) zq#tWL!8Iu!?Se zhB4#&ZD(GQ@uG)UIF#Nc3k9$K;e4{~&N~}_)Hi|v?iH&$SS&e0b2NlL@ZMD7NWSZ4)v zHWVsY@dg;gIu{1LBUn`dRYReIH6@^_FzEY&bzVT{L!p8df0G5VE`&kzf)xurfNG&o z!FpLhFNZ-3g7u1kUI~Q?)O{aPc^OB}cG$JYrputQ%+ zlW=D!tfPQUD6q6iAWQPN701)}#KKN8lp-XJY%)sN4~8~{q>+uB;jSLq$lKb;M(%KL z4sGP`J+jRmx3Hn&@o-|{9uqPi5GbG9@t8QVaJL9M-Vjhex2q&$-3xo#m(T6%Bx3~& zd)t@K?S95si^7hl#EGSk*(qzRs*#=YHpc9fIo8L>o+f$BzK$}k^vK>O8SUCNx_{t* S66ohVtr{L;J8bx3aOwYF+mJl~ literal 0 HcmV?d00001 diff --git a/tests/qtest/bios-tables-test-allowed-diff.h b/tests/qtest/bios-tables-test-allowed-diff.h index 96a9237355..dfb8523c8b 100644 --- a/tests/qtest/bios-tables-test-allowed-diff.h +++ b/tests/qtest/bios-tables-test-allowed-diff.h @@ -1,2 +1 @@ /* List of comma-separated changed AML files to ignore */ -"tests/data/acpi/pc/DSDT.hpbridge", From patchwork Tue Sep 15 14:43:13 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ani Sinha X-Patchwork-Id: 11776783 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 6C61E6CA for ; Tue, 15 Sep 2020 14:51:03 +0000 (UTC) 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 mail.kernel.org (Postfix) with ESMTPS id C16BD206DB for ; Tue, 15 Sep 2020 14:51:00 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (2048-bit key) header.d=anisinha-ca.20150623.gappssmtp.com header.i=@anisinha-ca.20150623.gappssmtp.com header.b="Fq5CpwAi" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org C16BD206DB Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=anisinha.ca Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Received: from localhost ([::1]:33072 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kICIN-0006HE-JX for patchwork-qemu-devel@patchwork.kernel.org; Tue, 15 Sep 2020 10:50:59 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:33222) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kICBq-00066K-00 for qemu-devel@nongnu.org; Tue, 15 Sep 2020 10:44:15 -0400 Received: from mail-pf1-x441.google.com ([2607:f8b0:4864:20::441]:42024) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1kICBm-0003y1-HM for qemu-devel@nongnu.org; Tue, 15 Sep 2020 10:44:13 -0400 Received: by mail-pf1-x441.google.com with SMTP id d6so2049492pfn.9 for ; Tue, 15 Sep 2020 07:44:10 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=anisinha-ca.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=29JT28xmeW3jgfT6UGIG7f+UtiHgvWzqQ0aaiLG3mns=; b=Fq5CpwAiF92dlTSCVmKna8vNdURasdDvY630j+WPgYh0Hg4Ah6RH+Hhq5n504SCX07 VpHHxV20R5vN8rgVodYr/ZQtRslcgoZIc70USn72LHHuBS3TfGUE/c7VUayaDvLGsG2q V7UkrHkWXMWUVYblxqzJjjq4itLtYmGQ1Xt+OgBDYhzg9Ua3MR4g2n7ymuM4ltTdSWTb BA+h+y9C6zY/4M3PzAWWjyukVccoAi+fguI3KJFUK/R0g0BOxlZog5FBGzB1TOTa892z tFekuVj+kbbpinWKQF9/P+J4wDIVrFmcntP6VxdS6szJqMTvkT0lFXoKz+svqkazdBkh VfsQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=29JT28xmeW3jgfT6UGIG7f+UtiHgvWzqQ0aaiLG3mns=; b=ujb1A1FBLYlx4oy2VxNHCkAaRLQKH+ApiIe1N6yBQT+sTAeLOQVpNqXcdHdaYveeJ9 +TDmHByHeh/PJ7Nfc/NnjOWqlEXgE31pKToTe1Hf+Y53VhF4uZq7teXki3a+li2U7anq MwVDFz0l32DMs2m5rhgr6FMUm1NUO/KAvvX2mSdN+7RT+DYmWS4mgXAJlBSeRVKrddnK hrGT1kH8uzNuwS+TtIqm89PTZECFWPrqA4INQRVGW5O9ZitNTW/uVSJInokFCV/87Im3 XzVoRDqWX8K92K/KT3FwB8/47GwzVm+PFm6PakzlR0iYc90BlfzUA49Cp86z0QdzGryb Gvwg== X-Gm-Message-State: AOAM531U4es3kNHkSTgQCXbMXOQkiVQWx6PLkICkOvbmh2Sp7Gqkl7yJ 3dMUETi8Z4yOkxGLTeVKmhAfSmcR9uvhxhDH X-Google-Smtp-Source: ABdhPJzVTMEbynQ4wEB5QoB4Y8eO1hKu5R0uHePTxQdRvzSGrsgCsJLD67PfQJuAytWnMmENcC1wGQ== X-Received: by 2002:a63:1620:: with SMTP id w32mr10988632pgl.73.1600181048729; Tue, 15 Sep 2020 07:44:08 -0700 (PDT) Received: from localhost.localdomain ([115.96.128.178]) by smtp.googlemail.com with ESMTPSA id r2sm11520693pga.94.2020.09.15.07.44.04 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 15 Sep 2020 07:44:07 -0700 (PDT) From: Ani Sinha To: qemu-devel@nongnu.org Subject: [PATCH v2 9/9] piix4: don't reserve hw resources when hotplug is off globally Date: Tue, 15 Sep 2020 20:13:13 +0530 Message-Id: <20200915144314.4997-10-ani@anisinha.ca> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20200915144314.4997-1-ani@anisinha.ca> References: <20200915144314.4997-1-ani@anisinha.ca> Received-SPF: none client-ip=2607:f8b0:4864:20::441; envelope-from=ani@anisinha.ca; helo=mail-pf1-x441.google.com X-detected-operating-system: by eggs.gnu.org: No matching host in p0f cache. That's all we know. X-Spam_score_int: -18 X-Spam_score: -1.9 X-Spam_bar: - X-Spam_report: (-1.9 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_NONE=0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Eduardo Habkost , "Michael S. Tsirkin" , =?utf-8?q?Philippe_Mathieu-Daud?= =?utf-8?q?=C3=A9?= , Aleksandar Markovic , Paolo Bonzini , Ani Sinha , Igor Mammedov , Aurelien Jarno , Richard Henderson Errors-To: qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Sender: "Qemu-devel" When acpi hotplug is turned off for both root pci bus as well as for pci bridges, we should not generate the related amls for DSDT table or initialize related hw ports or reserve hw resources. This change makes sure all those operations are turned off in the case acpi pci hotplug is off globally. In this change, we also make sure AMLs for the PCNT method are only added when bsel is enabled for the corresponding pci bus or bridge hotplug is turned on. As a result, when the hotplug for both the root pci device and bridge are disabled, this AML in the DSDT acpi table is turned off. As q35 machines do not use bsel for it's pci buses at this point in time, this change affects DSDT acpi table for q35 machines as well. Therefore, we also commit the updated golden master DSDT table acpi binary blobs as well. Following is a typical diff between the q35 acpi DSDT table blobs: @@ -1,30 +1,30 @@ /* * Intel ACPI Component Architecture * AML/ASL+ Disassembler version 20180105 (64-bit version) * Copyright (c) 2000 - 2018 Intel Corporation * * Disassembling to symbolic ASL+ operators * - * Disassembly of tests/data/acpi/q35/DSDT, Tue Sep 15 18:52:47 2020 + * Disassembly of /tmp/aml-3O0DR0, Tue Sep 15 18:52:47 2020 * * Original Table Header: * Signature "DSDT" - * Length 0x00001DFE (7678) + * Length 0x00001DF6 (7670) * Revision 0x01 **** 32-bit table (V1), no 64-bit math support - * Checksum 0xAC + * Checksum 0x17 * OEM ID "BOCHS " * OEM Table ID "BXPCDSDT" * OEM Revision 0x00000001 (1) * Compiler ID "BXPC" * Compiler Version 0x00000001 (1) */ DefinitionBlock ("", "DSDT", 1, "BOCHS ", "BXPCDSDT", 0x00000001) { Scope (\) { OperationRegion (DBG, SystemIO, 0x0402, One) Field (DBG, ByteAcc, NoLock, Preserve) { DBGB, 8 } @@ -3113,24 +3113,20 @@ Name (_ADR, 0x00010000) // _ADR: Address Method (_S1D, 0, NotSerialized) // _S1D: S1 Device State { Return (Zero) } Method (_S2D, 0, NotSerialized) // _S2D: S2 Device State { Return (Zero) } Method (_S3D, 0, NotSerialized) // _S3D: S3 Device State { Return (Zero) } } - - Method (PCNT, 0, NotSerialized) - { - } } } } Signed-off-by: Ani Sinha --- hw/acpi/piix4.c | 6 ++++-- hw/i386/acpi-build.c | 23 +++++++++++++++++------ tests/data/acpi/q35/DSDT | Bin 7678 -> 7670 bytes tests/data/acpi/q35/DSDT.acpihmat | Bin 9002 -> 8994 bytes tests/data/acpi/q35/DSDT.bridge | Bin 7695 -> 7688 bytes tests/data/acpi/q35/DSDT.cphp | Bin 8141 -> 8133 bytes tests/data/acpi/q35/DSDT.dimmpxm | Bin 9331 -> 9323 bytes tests/data/acpi/q35/DSDT.ipmibt | Bin 7753 -> 7745 bytes tests/data/acpi/q35/DSDT.memhp | Bin 9037 -> 9029 bytes tests/data/acpi/q35/DSDT.mmio64 | Bin 8808 -> 8801 bytes tests/data/acpi/q35/DSDT.numamem | Bin 7684 -> 7676 bytes tests/data/acpi/q35/DSDT.tis | Bin 8283 -> 8276 bytes 12 files changed, 21 insertions(+), 8 deletions(-) changelog: v1: initial patch. v2: fixed a bug and added acpi DSDT table blobs for q35 to make unit tests pass. diff --git a/tests/data/acpi/q35/DSDT b/tests/data/acpi/q35/DSDT index bba8884073a27427b88ac0d733c9c87330a59366..4fad91b72e279b744b0528fd687c862d3a3d5cfa 100644 GIT binary patch delta 33 pcmexo{mq)oCDEHUxHPVoYElb9FB)33dtLkYiwAT)&ZPnJlLVYfOBwQ@nt~9^r>33dtLmt$aH^xnv|OqSE1H6}jTDPF*R@=jTQb`iD!XTJ~z0NaZSF#rGn diff --git a/tests/data/acpi/q35/DSDT.cphp b/tests/data/acpi/q35/DSDT.cphp index 57d859cef9fa16a8f125c4b338611c8472699f38..8d2395e3cb4383b30e3840caed0d09ccad0c7323 100644 GIT binary patch delta 33 ocmX?Wf7G7KCDY0kO^r)&Kwi delta 42 xcmX?Vf7YJMCDvmYDcpr+5K3mdPFRw(KHo0nUCQ3;+bB3f%wz diff --git a/tests/data/acpi/q35/DSDT.dimmpxm b/tests/data/acpi/q35/DSDT.dimmpxm index 9d5bd5744e2ba2e0f6126c3aba0bb36af865e499..df7422051c6feadeaa3b6733ad7efa67c339b49d 100644 GIT binary patch delta 33 ocmezD@!EsSCD)i9vcGQi_CDc=Kufz delta 42 xcmX@=cGiu{CD^ diff --git a/tests/data/acpi/q35/DSDT.mmio64 b/tests/data/acpi/q35/DSDT.mmio64 index efd3f1188f2b55da1514212d4be081a61c2a96e9..d8dd702b69cc24a6b58b8eaa79ea02439a2a7dd9 100644 GIT binary patch delta 33 ocmaFi^3a9LCD)i>_Ld&VC^b00^lI82|tP diff --git a/tests/data/acpi/q35/DSDT.numamem b/tests/data/acpi/q35/DSDT.numamem index 1978b55f1255402bf9bade0b91150b5cb49789a4..f36d22063a6eed4fb107ffd0e10477a2d6d7a983 100644 GIT binary patch delta 33 pcmZp%`D4xH66_N4N0xzs@!&?THL{#;EHUxHPVoYElMl$+0sy+k3XK2& delta 42 xcmexk-D1P#66_MfBFDhM7`l;bjVzZROH6#QQ@ns1%jEsCw(KHo0nUCQ3;^@W3X}i< diff --git a/tests/data/acpi/q35/DSDT.tis b/tests/data/acpi/q35/DSDT.tis index 638de3872673d17b1958497d0e62c83653de1602..203030a61a92c204bb93c43fe79e546471ae2985 100644 GIT binary patch delta 38 ucmccZaK(YkCDUZRU~-WC8&31`DbH delta 45 zcmccOaNB{)CDio_gpe); - acpi_pcihp_init(OBJECT(s), &s->acpi_pci_hotplug, bus, parent, - s->use_acpi_hotplug_bridge); + if (s->use_acpi_hotplug_bridge || s->use_acpi_root_pci_hotplug) { + acpi_pcihp_init(OBJECT(s), &s->acpi_pci_hotplug, bus, parent, + s->use_acpi_hotplug_bridge); + } s->cpu_hotplug_legacy = true; object_property_add_bool(OBJECT(s), "cpu-hotplug-legacy", diff --git a/hw/i386/acpi-build.c b/hw/i386/acpi-build.c index e079b686f5..91622e185b 100644 --- a/hw/i386/acpi-build.c +++ b/hw/i386/acpi-build.c @@ -95,6 +95,7 @@ typedef struct AcpiPmInfo { bool s3_disabled; bool s4_disabled; bool pcihp_bridge_en; + bool pcihp_root_en; uint8_t s4_val; AcpiFadtData fadt; uint16_t cpu_hp_io_base; @@ -245,6 +246,9 @@ static void acpi_get_pm_info(MachineState *machine, AcpiPmInfo *pm) pm->pcihp_bridge_en = object_property_get_bool(obj, "acpi-pci-hotplug-with-bridge-support", NULL); + pm->pcihp_root_en = + object_property_get_bool(obj, "acpi-root-pci-hotplug", + NULL); } static void acpi_get_misc_info(AcpiMiscInfo *info) @@ -450,10 +454,12 @@ static void build_append_pci_bus_devices(Aml *parent_scope, PCIBus *bus, } /* Append PCNT method to notify about events on local and child buses. - * Add unconditionally for root since DSDT expects it. + * Add this method for root bus only when hotplug is enabled since DSDT + * expects it. */ - method = aml_method("PCNT", 0, AML_NOTSERIALIZED); - + if (bsel || pcihp_bridge_en) { + method = aml_method("PCNT", 0, AML_NOTSERIALIZED); + } /* If bus supports hotplug select it and notify about local events */ if (bsel) { uint64_t bsel_val = qnum_get_uint(qobject_to(QNum, bsel)); @@ -479,7 +485,10 @@ static void build_append_pci_bus_devices(Aml *parent_scope, PCIBus *bus, aml_append(method, aml_name("^S%.02X.PCNT", devfn)); } } - aml_append(parent_scope, method); + + if (bsel || pcihp_bridge_en) { + aml_append(parent_scope, method); + } qobject_unref(bsel); } @@ -1504,7 +1513,9 @@ build_dsdt(GArray *table_data, BIOSLinker *linker, build_hpet_aml(dsdt); build_piix4_isa_bridge(dsdt); build_isa_devices_aml(dsdt); - build_piix4_pci_hotplug(dsdt); + if (pm->pcihp_bridge_en || pm->pcihp_root_en) { + build_piix4_pci_hotplug(dsdt); + } build_piix4_pci0_int(dsdt); } else { sb_scope = aml_scope("_SB"); @@ -1698,7 +1709,7 @@ build_dsdt(GArray *table_data, BIOSLinker *linker, crs_range_set_free(&crs_range_set); /* reserve PCIHP resources */ - if (pm->pcihp_io_len) { + if (pm->pcihp_io_len && (pm->pcihp_bridge_en || pm->pcihp_root_en)) { dev = aml_device("PHPR"); aml_append(dev, aml_name_decl("_HID", aml_string("PNP0A06"))); aml_append(dev,