From patchwork Thu Oct 7 13:57:48 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ani Sinha X-Patchwork-Id: 12541987 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 67F1AC433EF for ; Thu, 7 Oct 2021 14:02: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 1001C60FD7 for ; Thu, 7 Oct 2021 14:02:03 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 1001C60FD7 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]:60530 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mYTyE-0002hI-51 for qemu-devel@archiver.kernel.org; Thu, 07 Oct 2021 10:02:02 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:42380) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mYTui-0008BR-Ei for qemu-devel@nongnu.org; Thu, 07 Oct 2021 09:58:24 -0400 Received: from mail-pf1-x433.google.com ([2607:f8b0:4864:20::433]:33655) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mYTug-0000x1-01 for qemu-devel@nongnu.org; Thu, 07 Oct 2021 09:58:24 -0400 Received: by mail-pf1-x433.google.com with SMTP id s16so5486733pfk.0 for ; Thu, 07 Oct 2021 06:58:21 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=anisinha-ca.20210112.gappssmtp.com; s=20210112; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=MpTwyC6LmhLimBWu/X6COjcvXv9MrWnGiSjZi/aYcAs=; b=UZyhF6GmM+oe1EKknV3kWvBKDE1QLtCy5SgHuPHn1d4c49uQSICC5g3k3uJ7N6CKhP eVKGmE3FZm1P3xoFdzh8PEdlrZV3r1UA7n4nyrrnZ86dUVF3ua3pXFANgWLc5K54chz8 HQRySombswxVYhjQFTA0Gwb82PAuAQtf4DopDNH5bXUIUzYKUn5iYHawZ78mTgyOMZWh ZWwDiaq7KNKJFlxu4xiu8JjOnm8K6d1Zjwvr/DtyzPvxJ4iGD2gGciMwSxVUx22WEV2E RYw5T4/qXkK7ISZrqkEuQghzeMS4fFX/1oNTp2+B2pbOofGifw4VbcwmaUen7BhV6uo9 n2Xw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=MpTwyC6LmhLimBWu/X6COjcvXv9MrWnGiSjZi/aYcAs=; b=b+aCp88mYn3YwLV7s3ZIwGihYu37nrS+Y0EyHBRJkxzK+nRIQ6rgtHs6ik3s3/hxPh TWz4G6KJaPmtOPr8ZI53iyEbzcX02bdh/y8mUGFGA00BTrqQ4lCyQwQW0nhikfiNpIfR OdH4v8eA/cM2dNE1u7WydjRq7zLfGfkD9ax7sQ/916XcrQXUvvNnS3lqb61ywAV0p2i/ vQUJPKWGM99RFVXJqLdmACBr9On1wgvkNZdPHOhcNh+aUQt4CaQjwhZRssQalTESTmx5 SKZL3LiA9iBde48Rzws323wvmKo6mhesQrFQQQCsXqOF6vVj5lvSijdXSnBwVpkWKF07 ySBQ== X-Gm-Message-State: AOAM531jmLBoCFI3j38MKGiaXAJsCNzQX0n3Qla/A2KZVig1I4chceYB pK+WN7ruNQgcPWHwOuYZUi1Hnr55XwHihQ== X-Google-Smtp-Source: ABdhPJzbQPqxqj0UPbBhyJqWxyGY0CHjdWGlek/0mMLSXxNk4K13JAz9EAxnNMlZg1XCnqakQD2yZA== X-Received: by 2002:a63:dd46:: with SMTP id g6mr3521934pgj.347.1633615100320; Thu, 07 Oct 2021 06:58:20 -0700 (PDT) Received: from anisinha-lenovo.ba.nuagenetworks.net ([115.96.196.214]) by smtp.googlemail.com with ESMTPSA id p189sm24283400pfp.167.2021.10.07.06.58.18 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 07 Oct 2021 06:58:19 -0700 (PDT) From: Ani Sinha To: qemu-devel@nongnu.org Subject: [PATCH v3 1/3] tests/acpi/bios-tables-test: add and allow changes to a new q35 DSDT table blob Date: Thu, 7 Oct 2021 19:27:48 +0530 Message-Id: <20211007135750.1277213-2-ani@anisinha.ca> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20211007135750.1277213-1-ani@anisinha.ca> References: <20211007135750.1277213-1-ani@anisinha.ca> MIME-Version: 1.0 Received-SPF: none client-ip=2607:f8b0:4864:20::433; envelope-from=ani@anisinha.ca; helo=mail-pf1-x433.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 in q35 for multi-function bridges. This 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 Acked-by: Igor Mammedov --- 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 Thu Oct 7 13:57:49 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ani Sinha X-Patchwork-Id: 12541991 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 535F3C433EF for ; Thu, 7 Oct 2021 14:02:14 +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 C95F360FD7 for ; Thu, 7 Oct 2021 14:02:13 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org C95F360FD7 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]:60644 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mYTyO-0002mG-Q3 for qemu-devel@archiver.kernel.org; Thu, 07 Oct 2021 10:02:12 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:42416) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mYTuk-0008Cx-Bj for qemu-devel@nongnu.org; Thu, 07 Oct 2021 09:58:27 -0400 Received: from mail-pj1-x102b.google.com ([2607:f8b0:4864:20::102b]:51081) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mYTui-0000z5-HD for qemu-devel@nongnu.org; Thu, 07 Oct 2021 09:58:26 -0400 Received: by mail-pj1-x102b.google.com with SMTP id k23so4969201pji.0 for ; Thu, 07 Oct 2021 06:58:24 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=anisinha-ca.20210112.gappssmtp.com; s=20210112; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=xDvZkZPduV0YZzkx1a9jG5giYPDiBVcmwOowVfVZ+cs=; b=z7EJY+UeRjwMba84VoONYbhxScRrnIqlFH0IvZggQaBmG4/5aZOMop1ewoga2Y2QmX zDdYqi9Q0FOUEF6IWbMefP7Zy+/56ZNs0nKv6uYE83we9oaZml9xnvq7pEvx24Y+odWo xzOaY2t6/zDNZDcVzbVyQAhMaQmi+b4/n5dclmHW/m0NxBNXpKzvtI+ix0OR/n0S9UZH buu7HcnRsf7hswPuWww5XKY7CPV9ZLor1CfvEippPH4WkHSPk9uFVrJgZwHCQx6RHR3c 3a04Xi9wSPyXx0Wj0cq4fVtYzPRb50J/gvFzTkigXIxgo1IU+3Q1NgKNw+5lCIJkZmBt 8Sjg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=xDvZkZPduV0YZzkx1a9jG5giYPDiBVcmwOowVfVZ+cs=; b=gcbTGnaOPQrB6gwI0Xg+xYeOFzEY3MpRHyAqXJhBAIdhTs1QpzCr/Foc5t/6yk2N/r h4HPa/IQXGJ5AqZtZtsRIgfsjTZMJ2jinWEYvpBLVjT7tfr4fi2zO3l2elsx9vqyAkoM WlzdBaOknz5joqbnKlYPzk8mOWUAD6f2qGLGQBqGQKMDrLNgsgNTUHQFOO1Vj/3oat8M p2CtEVgAwcE/1LKiFbhPw6IGo3JEYKegTTjvweo/DcGCzIgilkDK9SjxBLmdZ+eHqv7G /f+VbEB27ygXMJeh0va/C7v1LJh7wCTkdRLmDvT3epB+aGUjVPNX0h6VYWOy/uM4BaiY /HKQ== X-Gm-Message-State: AOAM53055xiaBBxGqwDJlYG3ov4ATRIm0ueRoYDOZYwL6XASCHiWx/6N R7Uz+UB1zLeH2F+SWCySTQfBoFGDpXydKw== X-Google-Smtp-Source: ABdhPJzx5TQPg28EefwScwXdDPKO0nqazjf1OXZI2PS8j/OaTDBY4A7JaYDKy3vDJQ5d+6wiYcx3Tg== X-Received: by 2002:a17:902:bf0a:b0:13d:f4b8:111 with SMTP id bi10-20020a170902bf0a00b0013df4b80111mr4121581plb.35.1633615102844; Thu, 07 Oct 2021 06:58:22 -0700 (PDT) Received: from anisinha-lenovo.ba.nuagenetworks.net ([115.96.196.214]) by smtp.googlemail.com with ESMTPSA id p189sm24283400pfp.167.2021.10.07.06.58.20 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 07 Oct 2021 06:58:22 -0700 (PDT) From: Ani Sinha To: qemu-devel@nongnu.org Subject: [PATCH v3 2/3] tests/acpi/pcihp: add unit tests for hotplug on multifunction bridges for q35 Date: Thu, 7 Oct 2021 19:27:49 +0530 Message-Id: <20211007135750.1277213-3-ani@anisinha.ca> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20211007135750.1277213-1-ani@anisinha.ca> References: <20211007135750.1277213-1-ani@anisinha.ca> MIME-Version: 1.0 Received-SPF: none client-ip=2607:f8b0:4864:20::102b; envelope-from=ani@anisinha.ca; helo=mail-pj1-x102b.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" 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. This test adds the following devices to qemu and then checks the changes introduced in the DSDT table due to the addition of the following devices: (a) a multifunction bridge device (b) a bridge device with function 1 (c) a non-bridge device with function 2 In the DSDT table, we should see AML hotplug descriptions for (a) and (b). For (a) we should find a hotplug AML description for function 0. The following diff compares the DSDT table AML with the new unit test before and after the change d7346e614f4ec is introduced. In other words, this diff reflects the changes that occurs in the DSDT table due to the change d7346e614f4ec . @@ -1,60 +1,38 @@ /* * 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.multi-bridge, Thu Oct 7 18:56:05 2021 + * Disassembly of /tmp/aml-AN0DA1, Thu Oct 7 18:56:05 2021 * * Original Table Header: * Signature "DSDT" - * Length 0x000020FE (8446) + * Length 0x00002187 (8583) * Revision 0x01 **** 32-bit table (V1), no 64-bit math support - * Checksum 0xDE + * Checksum 0x8D * OEM ID "BOCHS " * OEM Table ID "BXPC " * OEM Revision 0x00000001 (1) * Compiler ID "BXPC" * Compiler Version 0x00000001 (1) */ 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.S19_.PCNT, MethodObj) // Warning: Unknown method, guessing 1 arguments - Scope (\) { OperationRegion (DBG, SystemIO, 0x0402, One) Field (DBG, ByteAcc, NoLock, Preserve) { DBGB, 8 } Method (DBUG, 1, NotSerialized) { ToHexString (Arg0, Local0) ToBuffer (Local0, Local0) Local1 = (SizeOf (Local0) - One) Local2 = Zero While ((Local2 < Local1)) { @@ -3322,24 +3300,60 @@ Method (DVNT, 2, NotSerialized) { If ((Arg0 & One)) { Notify (S00, Arg1) } } Method (PCNT, 0, NotSerialized) { BNUM = One DVNT (PCIU, One) DVNT (PCID, 0x03) } } + Device (S19) + { + Name (_ADR, 0x00030001) // _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) { - ^S19.PCNT (^S10.PCNT ()) + ^S19.PCNT () + ^S10.PCNT () } } } } Signed-off-by: Ani Sinha Reviewed-by: Igor Mammedov --- tests/qtest/bios-tables-test.c | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/tests/qtest/bios-tables-test.c b/tests/qtest/bios-tables-test.c index 4f11d03055..33107caeed 100644 --- a/tests/qtest/bios-tables-test.c +++ b/tests/qtest/bios-tables-test.c @@ -859,6 +859,23 @@ 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", + }; + test_acpi_one("-device pcie-root-port,id=pcie-root-port-0," + "multifunction=on," + "port=0x0,chassis=1,addr=0x2,bus=pcie.0 " + "-device pcie-root-port,id=pcie-root-port-1," + "port=0x1,chassis=2,addr=0x3.0x1,bus=pcie.0 " + "-device virtio-balloon,id=balloon0," + "bus=pcie.0,addr=0x4.0x2", + &data); + free_test_data(&data); +} + static void test_acpi_q35_tcg_mmio64(void) { test_data data = { @@ -1534,6 +1551,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 Thu Oct 7 13:57:50 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ani Sinha X-Patchwork-Id: 12541993 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 13AE8C433EF for ; Thu, 7 Oct 2021 14:05:56 +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 85B4B61040 for ; Thu, 7 Oct 2021 14:05:55 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 85B4B61040 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]:38614 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mYU1y-00078l-EB for qemu-devel@archiver.kernel.org; Thu, 07 Oct 2021 10:05:54 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:42454) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mYTun-0008IX-Ca for qemu-devel@nongnu.org; Thu, 07 Oct 2021 09:58:29 -0400 Received: from mail-pl1-x632.google.com ([2607:f8b0:4864:20::632]:46052) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mYTul-000112-43 for qemu-devel@nongnu.org; Thu, 07 Oct 2021 09:58:29 -0400 Received: by mail-pl1-x632.google.com with SMTP id n2so3947438plk.12 for ; Thu, 07 Oct 2021 06:58:26 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=anisinha-ca.20210112.gappssmtp.com; s=20210112; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=rnpC5yzE0gWUdoEFE55LCrzvU068PvVk76TIGtwT7yI=; b=J21othrks62VEufkOZoOrYgqOPz/WtQT4/+t504pbWiihqIuR26n57qaMZw2p1oZwM qO6ka+nSBwWgCgoXZLEbytGpUk9Mo5jfkV1tL9okUePwl+baStD+Q1pnVxMEOJSUHHZt IogiEiBlxbAtsUppP9bvivLALhD1x+S8XZOWriezltZZqYGAH7Aka516BaZlUjP/qFVR RW6XDLa5JkdvwrhblR2DDZ/hWTYKgc2G1TmB8QOK4eGfBt8NR6HK1EzREZTazpRdm47n zofUg2qPd3F4elH0B9n0b65/I1qwVaJArPxfoMneVU5rJXvzkDw0hkF12tAwAhd+C4r4 dILg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=rnpC5yzE0gWUdoEFE55LCrzvU068PvVk76TIGtwT7yI=; b=b3A3mH+1LBV/yGFwkcs3twGmP2a8kMYiVT/eTUVCtxu6gLiUI/79EkaQnmn31m01rb ns/GwhweEjI9gt3dv9/nI77j5AKTQNzdB3Mprg8jQQD8fkUkks0NMhr95N6PscmYn4wq 9cIyciFg6W3yDM+ziGtbLs3lViHNOPJgAs/64fIr1k2C11kAUZjTbN6c6oiidHkS/UoD v3vx/LM95x6TEnmPYWlFMuHGkGji0uxnQlXgt9HMvjUvkTpKeJYiyPWkufTa1wMTepAl sFbdzlzzHlwk8Kytrksuqh+zBbVDPMOUUd2iF5B7DrmQk6/VBWsQALbU8wXZhAysC6hN Gb5Q== X-Gm-Message-State: AOAM533cT1VGGAufvx/pRZTNy2XUnH/rk9+iAg5uHNBR2oLe5OuEOf2V GnnWxla3/7mdk3DyZJIYoO87uolY09BpyA== X-Google-Smtp-Source: ABdhPJwHilC6+WvP8zIDlqGFhSKfG4OXaF/XERtG9QF/tfqNsQxL2wPkKrwyRzVHo4Pkx3b0lFjOEw== X-Received: by 2002:a17:90a:9310:: with SMTP id p16mr4977951pjo.204.1633615105387; Thu, 07 Oct 2021 06:58:25 -0700 (PDT) Received: from anisinha-lenovo.ba.nuagenetworks.net ([115.96.196.214]) by smtp.googlemail.com with ESMTPSA id p189sm24283400pfp.167.2021.10.07.06.58.23 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 07 Oct 2021 06:58:24 -0700 (PDT) From: Ani Sinha To: qemu-devel@nongnu.org Subject: [PATCH v3 3/3] tests/acpi/bios-tables-test: update DSDT blob for multifunction bridge test Date: Thu, 7 Oct 2021 19:27:50 +0530 Message-Id: <20211007135750.1277213-4-ani@anisinha.ca> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20211007135750.1277213-1-ani@anisinha.ca> References: <20211007135750.1277213-1-ani@anisinha.ca> MIME-Version: 1.0 Received-SPF: none client-ip=2607:f8b0:4864:20::632; envelope-from=ani@anisinha.ca; helo=mail-pl1-x632.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 added a new unit test for testing acpi hotplug on multifunction bridges in q35 machines. Here, we update the DSDT table gloden master blob for this unit test. The test adds the following devices to qemu and then checks the changes introduced in the DSDT table due to the addition of the following devices: (a) a multifunction bridge device (b) a bridge device with function 1 (c) a non-bridge device with function 2 In the DSDT table, we should see AML hotplug descriptions for (a) and (b). For (a) we should find a hotplug AML description for function 0. Following is the ASL diff between the original DSDT table and the modified DSDT table due to the unit test. We see that multifunction bridge on bus 2 and single function bridge on bus 3 function 1 are described, not the non-bridge balloon device on bus 4, function 2. @@ -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, Thu Oct 7 18:29:19 2021 + * Disassembly of /tmp/aml-C7JCA1, Thu Oct 7 18:29:19 2021 * * Original Table Header: * Signature "DSDT" - * Length 0x00002061 (8289) + * Length 0x00002187 (8583) * Revision 0x01 **** 32-bit table (V1), no 64-bit math support - * Checksum 0xF9 + * Checksum 0x8D * 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 } @@ -3265,23 +3265,95 @@ 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 (S10) + { + Name (_ADR, 0x00020000) // _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, 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 = One + DVNT (PCIU, One) + DVNT (PCID, 0x03) + } + } + + Device (S19) + { + Name (_ADR, 0x00030001) // _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) { + ^S19.PCNT () + ^S10.PCNT () } } } } Signed-off-by: Ani Sinha Acked-by: Igor Mammedov --- tests/data/acpi/q35/DSDT.multi-bridge | Bin 0 -> 8583 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..a24c713d22102a1a1583b5c902edffe1694e5cfe 100644 GIT binary patch literal 8583 zcmcIpOKcm*8J^`sS}j-7l3Gc&>_n`S^pzr^>^%DjO78Myi4?`9;si8G%5qxCPLV|t z14)bkvH~QIfd)<31U=FL1N7FOdaZ$8+M90;&{Ge+wvgpJq&UJ!9r+w&I z4X>IrJC&+$=kHpk+400#-0bB2CNn$RRiC*V)1A%0OWeB3JpaO4zn<*vr57xxUHj*` zuUAk1{Id&h=I{LMAHTeH)k*+x7Jp6rJr~lUd%bI|cKgmJy?x_dqVsEO{e@3@{IY0s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QV#l%O?`*yxb|)&<#rrG%jb<^BPpO5;32&P98r#{*Yj1|HUi(${ z^;h0_?b_?Rue`z9hS%6wkDk_9%PJdR+F#m+ja7Yk5-pv7Xw~UaOOmVyOJt08g&rpM@0OOlz^j|b$S}Qn@j@mx4B2jI zT>jk8^e!7AyBr$bknMcFVgI(*H9p-%Q#aflP00n1HsYrAmp>hC#ckRBqCeByv4%+V zML6kt|Ix9Lqx&B2-lQ6L*tH#0b^F==(_=9HWZ?GgTJdmfU~mzPTPLOs_mO&;djjJFxI>|=&`^3yWbKL#({pD;F|6&r0O=#|k%4D-b5 z+V4F_&ot&gewZG3uFU~G-IxKjd@G%@Oor74`VMvHuxZ*#kr=kOf5kn8$y06=JH^~t z7R`8?Nc2oOn+dwaCw?@ia?ddLd0^KV4aCuopxCie8X8`mSE?bL+M<}Ld{c<;m7Y&o zf4(`(Vpt-;Z%7C17~Zq**@lUB1MejKzQ*Ny_E9{GJtW5d!#7#^b^0tG4(YR)elezP zzna*_`lGnQ{-9mCgMHa=#FaZQ+pt6`8zQ?m7Oy9PUrbVqta-KA*OBQ`<-BrCcIzA`?_P_v5gbhru@N0 zqz}$@GE)fywd4G$PR2}FF$;@$h@Pe^q{R8j{oBw!e4=#06TUaQRjh5}F*-|VZ04#J zJ4q)=Z*j+8zR0)sHkRlvwhvQ5E+_VkF(f|>a?gnXcg$cg<6zBa*tEpSS$T4fPTGfM zGgyn50LPeF!21RtF+UX@2HSO%LA(8KrbDhko1+Bj;0nH|u&-$kXm=A2@ztaDjQ?W2 z73-(2?-}fU>S*6xrDu_a2JNQORg}GLL?^x#7lk|@RSnw_g`mLyQz7h_LfjQz=r5iK P)}F_He7!|yIezv(me~h+ 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",