From patchwork Mon Sep 6 09:39:09 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ani Sinha X-Patchwork-Id: 12476733 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-16.6 required=3.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 18E4AC433EF for ; Mon, 6 Sep 2021 09:41:41 +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 9943A60F3A for ; Mon, 6 Sep 2021 09:41:40 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 9943A60F3A Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=anisinha.ca Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=nongnu.org Received: from localhost ([::1]:34520 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mNB8F-0000fT-RI for qemu-devel@archiver.kernel.org; Mon, 06 Sep 2021 05:41:39 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:36646) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mNB69-00071e-RQ for qemu-devel@nongnu.org; Mon, 06 Sep 2021 05:39:30 -0400 Received: from mail-pl1-x62a.google.com ([2607:f8b0:4864:20::62a]:41537) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mNB67-0001lh-So for qemu-devel@nongnu.org; Mon, 06 Sep 2021 05:39:29 -0400 Received: by mail-pl1-x62a.google.com with SMTP id e7so3582673plh.8 for ; Mon, 06 Sep 2021 02:39:27 -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 :mime-version:content-transfer-encoding; bh=0HjtGfbafd4DmU/9oP8FSbxIk/8884oXtFdvp9ieElU=; b=Govpt4duuyYpRVrGZEDkweDqeRo9V0cwi3q7kdXesD5JSwf7fLMRrmwxblbuQcS2pc GZQ7HP23Kvin5nphY6Sm5en7g4TEdqB/acSYNLVbGYCBaoChefBf3upOWDiIB5xFjvk0 bCz7eF+l1sHnPofyDRx72m7wY9GxAJ9gv1FLypNV1n1NXvo3WYNZOdZ2Jf+Fsc6/BsoJ nlmPwTFlUAsnlQm0TM2uylDvs6cBpXBDl4bqHlSX0dqMThP9+YZidfCx19/dYu73qT4J flEL8ubl8btTG+S33Z+0FfL21Tzryzx+ooNnETEu00kGN8oLjl3uBXhDaMAVjGaKxNDk sx7A== 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:mime-version:content-transfer-encoding; bh=0HjtGfbafd4DmU/9oP8FSbxIk/8884oXtFdvp9ieElU=; b=hy2W/JUNy4OkLWS66YjXokRIGULgpnm5HiR6i3LDSkMIk0QyXInCkHWfZg93bFxnTn p63yTgwqMbmpTE+5F9TWlHD0OTl4XfEsBOX8VbcDx9/JgXf8rSsrbYvwGRxwuoSR8/xj KNcUbQ+/BdrrnK881/5Sw3QWuoCD/gVhqJ7oFIljMNqRqZy7Yq++Tmp3L1QhqVx9w7ce 4GRjhRyNpECZNPBQiH0rDe4yPAz4DEs75hV49/3P9l9z493kE0AvsHJNfwMBlvFtDS5O YJYqEgi3BVVOKKyxGk1sag8GJsTN0s1Qbk8owRbUivaKOUYGxHvUukafdxrXogYO5nFB xO9g== X-Gm-Message-State: AOAM532Qso2VfkW0bRTqbSzQT/qXIyzVKATCpq+CV5LuFopDmFkWLBLc 492BG+rfCq/KouyIJVKFyZrj0X5v9wbrpQ== X-Google-Smtp-Source: ABdhPJySKhZnuOsyoNXvc02ze5FpqoYb+EvKlFH8HknzzWO9v2CQhy3/7akNgmlHLry27pewTPc+HQ== X-Received: by 2002:a17:90a:cb83:: with SMTP id a3mr13073092pju.91.1630921165700; Mon, 06 Sep 2021 02:39:25 -0700 (PDT) Received: from anisinha-lenovo.ba.nuagenetworks.net ([115.96.142.175]) by smtp.googlemail.com with ESMTPSA id z131sm7111183pfc.159.2021.09.06.02.39.23 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 06 Sep 2021 02:39:25 -0700 (PDT) From: Ani Sinha To: qemu-devel@nongnu.org Subject: [PATCH 1/3] tests/acpi: allow changes to DSDT.multi-bridge ACPI table blob for q35 Date: Mon, 6 Sep 2021 15:09:09 +0530 Message-Id: <20210906093911.2069140-2-ani@anisinha.ca> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20210906093911.2069140-1-ani@anisinha.ca> References: <20210906093911.2069140-1-ani@anisinha.ca> MIME-Version: 1.0 Received-SPF: none client-ip=2607:f8b0:4864:20::62a; envelope-from=ani@anisinha.ca; helo=mail-pl1-x62a.google.com 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: Ani Sinha , Igor Mammedov , "Michael S. Tsirkin" Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: "Qemu-devel" We are adding a new unit test to cover the acpi hotplug support for multi-function bridges in q35 machines. This support was introduced with the following commit: d7346e614f4ec ("acpi: x86: pcihp: add support hotplug on multifunction bridges") The test uses a new table DSDT.multi-bridge. We need to allow changes in DSDT acpi table for addition of this new unit test. Signed-off-by: Ani Sinha --- tests/data/acpi/q35/DSDT.multi-bridge | 0 tests/qtest/bios-tables-test-allowed-diff.h | 1 + 2 files changed, 1 insertion(+) create mode 100644 tests/data/acpi/q35/DSDT.multi-bridge diff --git a/tests/data/acpi/q35/DSDT.multi-bridge b/tests/data/acpi/q35/DSDT.multi-bridge new file mode 100644 index 0000000000..e69de29bb2 diff --git a/tests/qtest/bios-tables-test-allowed-diff.h b/tests/qtest/bios-tables-test-allowed-diff.h index dfb8523c8b..dabc024f53 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.multi-bridge", From patchwork Mon Sep 6 09:39:10 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ani Sinha X-Patchwork-Id: 12476745 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-16.6 required=3.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id DC494C433EF for ; Mon, 6 Sep 2021 09:43:53 +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 7D6B46069E for ; Mon, 6 Sep 2021 09:43:53 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 7D6B46069E Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=anisinha.ca Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=nongnu.org Received: from localhost ([::1]:40414 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mNBAO-0004Zr-JJ for qemu-devel@archiver.kernel.org; Mon, 06 Sep 2021 05:43:52 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:36706) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mNB6D-00073D-Ox for qemu-devel@nongnu.org; Mon, 06 Sep 2021 05:39:34 -0400 Received: from mail-pg1-x52f.google.com ([2607:f8b0:4864:20::52f]:41774) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mNB6A-0001oU-Cn for qemu-devel@nongnu.org; Mon, 06 Sep 2021 05:39:31 -0400 Received: by mail-pg1-x52f.google.com with SMTP id k24so6228778pgh.8 for ; Mon, 06 Sep 2021 02:39:29 -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 :mime-version:content-transfer-encoding; bh=CU6dJvUnUJTJmLyIeRl7e8FdcB6Ed36gbhogXX99+5M=; b=GQp4Z7KfKg1HmEsqYVGOdaxVaGCRPIrp4vUny07tCehj3pdEBXTYl9EpRGe2UjiUt3 7TIBHgHP5D8kmz3e+0ULY7gnUZJuJtaAGcfwx5L2mLM+/0uKFrHHG04eJYvg1GspKOPK qCBM2183i9E4914BbdCMGfF4/K6AOO9wHO1eeWwfNuSq9qhta+t92n2EhAlKDbKQeScY 3lws9s2uPILGPz0KYPInB7pQkgeKefsmqP20ZcEdtnT0oXaJQcq55JL+iWsa8p36/W7v wlwYBSx6v0cZL09DaJDtvlJnQ7GHjqVqfAAAWL94I/baRhOSDvPlmJCsci17BZvewtyR n8hg== 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:mime-version:content-transfer-encoding; bh=CU6dJvUnUJTJmLyIeRl7e8FdcB6Ed36gbhogXX99+5M=; b=ZAtcj7FZ9QmMAW0bgOnKcuBJD4CXJ6pYY6R7yQpHC0z1Dbu5ZVYQXwukQjpFxOMyLv T4Qq8w2feZff5vL6W/3efz3khPqNaHCYMZTImkFf/jjZwvuLcNw9Pc/Sd3uU6+hqTlf+ 5fCTbXvz0Ta9hoNWV2qsLRYU/ocOVj1Wu7zFn+1hOEn8gSeL29DFzMRzLy8pkrtBKaa8 rIy+xVDt340mNNdTG+zGfN9OJjo4KIzJS6d1fIB0SclCSl9fEqqrCuWLobuRL0cRYY6N O+iRcNAW+QIEMbe25TbmheNYfI1tVeiyihHjtp65EbGl7Q159JY+05q+t7RtM5LW5gsz NgWQ== X-Gm-Message-State: AOAM5326SUhKNxniJLR/OW0UkaqoEc2mu6Kid3P0rA7752l+wugSdpao dhUbjC+H55faGubWb9Ipyol6+783bNOBPA== X-Google-Smtp-Source: ABdhPJxhAuftvLdk7jqOppBNbEbci+CSzld3pzM7JIUtwbZgyPAgfsXtvQHwBLuDZmTzyg+8VhBydQ== X-Received: by 2002:a05:6a00:244f:b0:404:fa55:c1a with SMTP id d15-20020a056a00244f00b00404fa550c1amr15466500pfj.42.1630921168200; Mon, 06 Sep 2021 02:39:28 -0700 (PDT) Received: from anisinha-lenovo.ba.nuagenetworks.net ([115.96.142.175]) by smtp.googlemail.com with ESMTPSA id z131sm7111183pfc.159.2021.09.06.02.39.26 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 06 Sep 2021 02:39:27 -0700 (PDT) From: Ani Sinha To: qemu-devel@nongnu.org Subject: [PATCH 2/3] tests/acpi/pcihp: add unit tests for hotplug on multifunction bridges for q35 Date: Mon, 6 Sep 2021 15:09:10 +0530 Message-Id: <20210906093911.2069140-3-ani@anisinha.ca> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20210906093911.2069140-1-ani@anisinha.ca> References: <20210906093911.2069140-1-ani@anisinha.ca> MIME-Version: 1.0 Received-SPF: none client-ip=2607:f8b0:4864:20::52f; envelope-from=ani@anisinha.ca; helo=mail-pg1-x52f.google.com X-Spam_score_int: 0 X-Spam_score: 0.0 X-Spam_bar: / X-Spam_report: (0.0 / 5.0 requ) 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: Ani Sinha , Igor Mammedov , "Michael S. Tsirkin" Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: "Qemu-devel" commit d7346e614f4ec ("acpi: x86: pcihp: add support hotplug on multifunction bridges") added ACPI hotplug descriptions for cold plugged bridges for functions other than 0. For all other devices, the ACPI hotplug descriptions are limited to function 0 only. This change adds unit tests for this feature. The diff of ACPI DSDT table before and after the change d7346e614f4e with the same newly added unit test is provided below: @@ -5,13 +5,13 @@ * * Disassembling to symbolic ASL+ operators * - * Disassembly of /tmp/aml-35UR70, Fri Aug 6 21:00:03 2021 + * Disassembly of /tmp/aml-GY8760, Fri Aug 6 21:10:31 2021 * * Original Table Header: * Signature "DSDT" - * Length 0x0000206A (8298) + * Length 0x000020F3 (8435) * Revision 0x01 **** 32-bit table (V1), no 64-bit math support - * Checksum 0x59 + * Checksum 0x1B * OEM ID "BOCHS " * OEM Table ID "BXPC " * OEM Revision 0x00000001 (1) @@ -20,28 +20,6 @@ */ DefinitionBlock ("", "DSDT", 1, "BOCHS ", "BXPC ", 0x00000001) { - /* - * iASL Warning: There was 1 external control method found during - * disassembly, but only 0 were resolved (1 unresolved). Additional - * ACPI tables may be required to properly disassemble the code. This - * resulting disassembler output file may not compile because the - * disassembler did not know how many arguments to assign to the - * unresolved methods. Note: SSDTs can be dynamically loaded at - * runtime and may or may not be available via the host OS. - * - * In addition, the -fe option can be used to specify a file containing - * control method external declarations with the associated method - * argument counts. Each line of the file must be of the form: - * External (, MethodObj, ) - * Invocation: - * iasl -fe refs.txt -d dsdt.aml - * - * The following methods were unresolved and many not compile properly - * because the disassembler had to guess at the number of arguments - * required for each: - */ - External (_SB_.PCI0.S09_.PCNT, MethodObj) // Warning: Unknown method, guessing 1 arguments - Scope (\) { OperationRegion (DBG, SystemIO, 0x0402, One) @@ -3280,9 +3258,45 @@ } } + Device (S09) + { + Name (_ADR, 0x00010001) // _ADR: Address + Name (BSEL, Zero) + Device (S00) + { + Name (_SUN, Zero) // _SUN: Slot User Number + Name (_ADR, Zero) // _ADR: Address + Method (_EJ0, 1, NotSerialized) // _EJx: Eject Device, x=0-9 + { + PCEJ (BSEL, _SUN) + } + + Method (_DSM, 4, Serialized) // _DSM: Device-Specific Method + { + Return (PDSM (Arg0, Arg1, Arg2, Arg3, BSEL, _SUN)) + } + } + + Method (DVNT, 2, NotSerialized) + { + If ((Arg0 & One)) + { + Notify (S00, Arg1) + } + } + + Method (PCNT, 0, NotSerialized) + { + BNUM = Zero + DVNT (PCIU, One) + DVNT (PCID, 0x03) + } + } + Method (PCNT, 0, NotSerialized) { - ^S09.PCNT (^S08.PCNT ()) + ^S09.PCNT () + ^S08.PCNT () } } } Signed-off-by: Ani Sinha --- tests/qtest/bios-tables-test.c | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) diff --git a/tests/qtest/bios-tables-test.c b/tests/qtest/bios-tables-test.c index 4f11d03055..89ba1a9a9a 100644 --- a/tests/qtest/bios-tables-test.c +++ b/tests/qtest/bios-tables-test.c @@ -859,6 +859,33 @@ static void test_acpi_q35_tcg_bridge(void) free_test_data(&data); } +static void test_acpi_q35_multif_bridge(void) +{ + test_data data = { + .machine = MACHINE_Q35, + .variant = ".multi-bridge", + .required_struct_types = base_required_struct_types, + .required_struct_types_len = ARRAY_SIZE(base_required_struct_types) + }; + /* + * lets try three things: + * (a) a multifunction bridge device + * (b) a bridge device with function 1 + * (c) a non-bridge device with function 2 + * We should see AML hotplug descriptions for (a) and (b) in DSDT. + * For (a) it should have a hotplug AML description for function 0. + */ + test_acpi_one("-nodefaults -device pcie-root-port,id=pcie-root-port-0," + "multifunction=on," + "port=0x0,chassis=1,addr=0x1,bus=pcie.0 " + "-device pcie-root-port,id=pcie-root-port-1," + "port=0x1,chassis=2,addr=0x1.0x1,bus=pcie.0 " + "-device virtio-balloon,id=balloon0," + "bus=pcie.0,addr=0x1.0x2", + &data); + free_test_data(&data); +} + static void test_acpi_q35_tcg_mmio64(void) { test_data data = { @@ -1534,6 +1561,7 @@ int main(int argc, char *argv[]) test_acpi_piix4_no_acpi_pci_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/multif-bridge", test_acpi_q35_multif_bridge); qtest_add_func("acpi/q35/mmio64", test_acpi_q35_tcg_mmio64); qtest_add_func("acpi/piix4/ipmi", test_acpi_piix4_tcg_ipmi); qtest_add_func("acpi/q35/ipmi", test_acpi_q35_tcg_ipmi); From patchwork Mon Sep 6 09:39:11 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ani Sinha X-Patchwork-Id: 12476747 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-16.6 required=3.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, LOTS_OF_MONEY,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 796C9C433F5 for ; Mon, 6 Sep 2021 09:46: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 DDC6F60E76 for ; Mon, 6 Sep 2021 09:46:45 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org DDC6F60E76 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=anisinha.ca Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=nongnu.org Received: from localhost ([::1]:44680 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mNBDA-0007XH-P9 for qemu-devel@archiver.kernel.org; Mon, 06 Sep 2021 05:46:44 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:36752) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mNB6H-00075n-Li for qemu-devel@nongnu.org; Mon, 06 Sep 2021 05:39:38 -0400 Received: from mail-pj1-x102a.google.com ([2607:f8b0:4864:20::102a]:39866) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mNB6D-0001rS-ID for qemu-devel@nongnu.org; Mon, 06 Sep 2021 05:39:37 -0400 Received: by mail-pj1-x102a.google.com with SMTP id mj9-20020a17090b368900b001965618d019so3933099pjb.4 for ; Mon, 06 Sep 2021 02:39: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 :mime-version:content-transfer-encoding; bh=IoCWghIjlelodCaBa4rFFT6aagv03YrabtxZqEa5v7o=; b=ZgPkW8FZeYGWTOVF/yjbNh8vzn+Vt8y/M8UPjJvmg01sTn/fjiBvJ7MccGSFGDk3/d pJ3bogKs5MulLhspAqtd8tOjab4JlDNFOaFnra49R2siNnF4X8CYUNxoCQBHLb2fXE/I rogNP8VWurRxvcIVc6+paf+KKxqWLl6P4UaV38i/+9XJlIxp/D6fjdStGI+sWptfSMWl TNB7zWCtT5izoPLTlCN0iBnSA1NXiVO0PUB9uv6Og1OUR+tcI2gKIDjSDPnx7FehgzMW i/BADZQO7oAcZg+cPI0uepB0YOjfnrrEfPQ8h701HTSxj1yPjDXCS9YO60X80eBc8pew oQCA== 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:mime-version:content-transfer-encoding; bh=IoCWghIjlelodCaBa4rFFT6aagv03YrabtxZqEa5v7o=; b=ErvoCUy7+2emrHquhTCSMQB0wHJ5NYOCokeUPpPcgz0XSM5+mixUI7CdLKv7cRmVT3 p1CSZec+Np0QpCJmdZJ+/Bl+jlLP/LBFPslxpB3WJiVdwUgyd0wSZ7y+8X4zfWWi3Lk8 arR13fnC8agyfxQIBR4V9D1Adz9KW1W/SzO4EhH/Ofh+gzWSyr+yakupKqxk0uffqJXg 7vqoV0FQwFFkqSERH5ay5+fOcqvGSbeY0030sO+brtJ8ODsMOEwaA/WQ6zofOFSiuR7i rJJdVM48vK+MdBvbwYF6Dc6TgOl9L51rtgF9IfKJDlqfsQqpT8ZuUlz6h4qkXJjiRHK/ +S5w== X-Gm-Message-State: AOAM531IvlvNgNWYEJaWw2sLjIid15qfSOblAB3xh4NXpAJmiM6u4cZu lwLwflY8vZp7lveHd18oOlJQkuMe5MjW3Q== X-Google-Smtp-Source: ABdhPJy8de+2lT5NDtm9kuzOVwJACYNpwQmc97FY4U//2IEzFY9FEsVsX3n/wAZJzxGKaF73zJTdYA== X-Received: by 2002:a17:90a:4093:: with SMTP id l19mr12952389pjg.118.1630921170627; Mon, 06 Sep 2021 02:39:30 -0700 (PDT) Received: from anisinha-lenovo.ba.nuagenetworks.net ([115.96.142.175]) by smtp.googlemail.com with ESMTPSA id z131sm7111183pfc.159.2021.09.06.02.39.28 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 06 Sep 2021 02:39:30 -0700 (PDT) From: Ani Sinha To: qemu-devel@nongnu.org Subject: [PATCH 3/3] tests/acpi: add DSDT binary blob for the unit test added in the previous commit Date: Mon, 6 Sep 2021 15:09:11 +0530 Message-Id: <20210906093911.2069140-4-ani@anisinha.ca> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20210906093911.2069140-1-ani@anisinha.ca> References: <20210906093911.2069140-1-ani@anisinha.ca> MIME-Version: 1.0 Received-SPF: none client-ip=2607:f8b0:4864:20::102a; envelope-from=ani@anisinha.ca; helo=mail-pj1-x102a.google.com 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, LOTS_OF_MONEY=0.001, 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: Ani Sinha , Igor Mammedov , "Michael S. Tsirkin" Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: "Qemu-devel" change 7feffbbf45 ("tests/acpi/pcihp: add unit tests for hotplug on multifunction bridges for q35") adds a new unit test to exercize multifunction bridge support in ACPI for q35. This change adds the ACPI DSDT table blob for this unit test. The changes that this unit test brings to the DSDT table is outlined in the following diff: @@ -1,30 +1,30 @@ /* * Intel ACPI Component Architecture * AML/ASL+ Disassembler version 20190509 (64-bit version) * Copyright (c) 2000 - 2019 Intel Corporation * * Disassembling to symbolic ASL+ operators * - * Disassembly of tests/data/acpi/q35/DSDT, Mon Sep 6 13:29:23 2021 + * Disassembly of /tmp/aml-GFM480, Mon Sep 6 13:29:23 2021 * * Original Table Header: * Signature "DSDT" - * Length 0x00002061 (8289) + * Length 0x000020F3 (8435) * Revision 0x01 **** 32-bit table (V1), no 64-bit math support - * Checksum 0xE5 + * Checksum 0x1B * 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 } @@ -171,68 +171,32 @@ IRQNoFlags () {1} }) } Device (MOU) { Name (_HID, EisaId ("PNP0F13") /* PS/2 Mouse */) // _HID: Hardware ID Name (_STA, 0x0F) // _STA: Status Name (_CRS, ResourceTemplate () // _CRS: Current Resource Settings { IRQNoFlags () {12} }) } - Device (LPT1) - { - Name (_HID, EisaId ("PNP0400") /* Standard LPT Parallel Port */) // _HID: Hardware ID - Name (_UID, One) // _UID: Unique ID - Name (_STA, 0x0F) // _STA: Status - Name (_CRS, ResourceTemplate () // _CRS: Current Resource Settings - { - IO (Decode16, - 0x0378, // Range Minimum - 0x0378, // Range Maximum - 0x08, // Alignment - 0x08, // Length - ) - IRQNoFlags () - {7} - }) - } - - Device (COM1) - { - Name (_HID, EisaId ("PNP0501") /* 16550A-compatible COM Serial Port */) // _HID: Hardware ID - Name (_UID, One) // _UID: Unique ID - Name (_STA, 0x0F) // _STA: Status - Name (_CRS, ResourceTemplate () // _CRS: Current Resource Settings - { - IO (Decode16, - 0x03F8, // Range Minimum - 0x03F8, // Range Maximum - 0x00, // Alignment - 0x08, // Length - ) - IRQNoFlags () - {4} - }) - } - Device (RTC) { Name (_HID, EisaId ("PNP0B00") /* AT Real-Time Clock */) // _HID: Hardware ID Name (_CRS, ResourceTemplate () // _CRS: Current Resource Settings { IO (Decode16, 0x0070, // Range Minimum 0x0070, // Range Maximum 0x01, // Alignment 0x08, // Length ) IRQNoFlags () {8} }) } } @@ -3249,39 +3213,92 @@ }) } } Scope (\_SB) { Scope (PCI0) { Device (S00) { Name (_ADR, Zero) // _ADR: Address } Device (S08) { Name (_ADR, 0x00010000) // _ADR: Address - Method (_S1D, 0, NotSerialized) // _S1D: S1 Device State + Name (BSEL, One) + Device (S00) { - Return (Zero) + Name (_SUN, Zero) // _SUN: Slot User Number + Name (_ADR, Zero) // _ADR: Address + Method (_EJ0, 1, NotSerialized) // _EJx: Eject Device, x=0-9 + { + PCEJ (BSEL, _SUN) + } + + Method (_DSM, 4, Serialized) // _DSM: Device-Specific Method + { + Return (PDSM (Arg0, Arg1, Arg2, Arg3, BSEL, _SUN)) + } } - Method (_S2D, 0, NotSerialized) // _S2D: S2 Device State + Method (DVNT, 2, NotSerialized) { - Return (Zero) + If ((Arg0 & One)) + { + Notify (S00, Arg1) + } } - Method (_S3D, 0, NotSerialized) // _S3D: S3 Device State + Method (PCNT, 0, NotSerialized) { - Return (Zero) + BNUM = One + DVNT (PCIU, One) + DVNT (PCID, 0x03) + } + } + + Device (S09) + { + Name (_ADR, 0x00010001) // _ADR: Address + Name (BSEL, Zero) + Device (S00) + { + Name (_SUN, Zero) // _SUN: Slot User Number + Name (_ADR, Zero) // _ADR: Address + Method (_EJ0, 1, NotSerialized) // _EJx: Eject Device, x=0-9 + { + PCEJ (BSEL, _SUN) + } + + Method (_DSM, 4, Serialized) // _DSM: Device-Specific Method + { + Return (PDSM (Arg0, Arg1, Arg2, Arg3, BSEL, _SUN)) + } + } + + Method (DVNT, 2, NotSerialized) + { + If ((Arg0 & One)) + { + Notify (S00, Arg1) + } + } + + Method (PCNT, 0, NotSerialized) + { + BNUM = Zero + DVNT (PCIU, One) + DVNT (PCID, 0x03) } } Method (PCNT, 0, NotSerialized) { + ^S09.PCNT () + ^S08.PCNT () } } } } Signed-off-by: Ani Sinha --- tests/data/acpi/q35/DSDT.multi-bridge | Bin 0 -> 8435 bytes tests/qtest/bios-tables-test-allowed-diff.h | 1 - 2 files changed, 1 deletion(-) diff --git a/tests/data/acpi/q35/DSDT.multi-bridge b/tests/data/acpi/q35/DSDT.multi-bridge index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..a6565acc5cc390826f4ac23585912f9cf1d9acb9 100644 GIT binary patch literal 8435 zcmcIpOKcm*8J;C6X|-HROKN4=vJ(+`^nnx!73bmf5ro|3%NA*hOT`Ijlq<_=B|AkH zNqk6*0I~ukjt@l>HbIYczyQ6qr(PSNxfJNZhXM`IQxCo58WhPX?Dx;?$TK7bREP4g z+JE-@=KsIh+5J{Ce&Bb$&NF75E?x9$LB8}-%gf_uFvjSd{yO#4W!ByIOVyr{PNa

*J`=PNNu`8cCA79yy-n|`OVFbEyC9*6!amow5pw#Og zcvj1+7tCI*?%TzCmTC4pah5cDMZe9=-d5db?#5j2V&J9jTxXttX?@U~>F;KjET`M} z=h<)8&b;u+r8kS8|Lh;XxO3e~0q`XLn)rJ*qC}^BwS(-Mb>{sQ#%vlK`u%Y<8vR+E zGU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GgDT=!Xh4`r|AkQaei|DHgpdjuUztk?`1a2jV(;0 zCkc&BR<&Yh#+jkFxKnd4^R2xXT)KaTLY|8Y!E&c41O@(|3SmbS;;!;SfBtw-cn*8t%?_QN<7fW`tJddg 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 dabc024f53..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/q35/DSDT.multi-bridge",