[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PULL 29/73] tests: acpi: add test_acpi_q35_tcg_no_acpi_hotplug test and
From: |
Michael S. Tsirkin |
Subject: |
[PULL 29/73] tests: acpi: add test_acpi_q35_tcg_no_acpi_hotplug test and extend test_acpi_piix4_no_acpi_pci_hotplug |
Date: |
Tue, 7 Mar 2023 20:12:16 -0500 |
From: Igor Mammedov <imammedo@redhat.com>
test bridge AML generator with ACPI PCI hotplug disabled
(i.e. with native hotplug enabled/disabled per bridge/root port)
PS:
while at make sure that devices on pci-bridge are starting
from addr=1.0 as slot 0 is not available there and test
passes only because of a bug in ACPI hotplug that will be
fixed by follow up patch
Signed-off-by: Igor Mammedov <imammedo@redhat.com>
Message-Id: <20230302161543.286002-4-imammedo@redhat.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
---
tests/qtest/bios-tables-test.c | 42 +++++++++++++++++++++++++++++++---
1 file changed, 39 insertions(+), 3 deletions(-)
diff --git a/tests/qtest/bios-tables-test.c b/tests/qtest/bios-tables-test.c
index d8c8cda58e..7828c6b7e6 100644
--- a/tests/qtest/bios-tables-test.c
+++ b/tests/qtest/bios-tables-test.c
@@ -949,9 +949,14 @@ static void test_acpi_piix4_no_acpi_pci_hotplug(void)
data.required_struct_types_len = ARRAY_SIZE(base_required_struct_types);
test_acpi_one("-global PIIX4_PM.acpi-root-pci-hotplug=off "
"-global PIIX4_PM.acpi-pci-hotplug-with-bridge-support=off "
- "-device pci-bridge,chassis_nr=1 "
- "-device pci-testdev,bus=pci.0 "
- "-device pci-testdev,bus=pci.1", &data);
+ "-device pci-bridge,chassis_nr=1,addr=4.0 "
+ "-device pci-testdev,bus=pci.0,addr=5.0 "
+ "-device pci-testdev,bus=pci.0,addr=6.0,acpi-index=101 "
+ "-device pci-testdev,bus=pci.1,addr=1.0 "
+ "-device pci-testdev,bus=pci.1,addr=2.0,acpi-index=201 "
+ "-device pci-bridge,id=nhpbr,chassis_nr=2,shpc=off,addr=7.0 "
+ "-device pci-testdev,bus=nhpbr,addr=1.0,acpi-index=301 "
+ , &data);
free_test_data(&data);
}
@@ -1002,6 +1007,35 @@ static void test_acpi_q35_tcg_bridge(void)
free_test_data(&data);
}
+static void test_acpi_q35_tcg_no_acpi_hotplug(void)
+{
+ test_data data;
+
+ memset(&data, 0, sizeof(data));
+ data.machine = MACHINE_Q35;
+ data.variant = ".noacpihp";
+ data.required_struct_types = base_required_struct_types;
+ data.required_struct_types_len = ARRAY_SIZE(base_required_struct_types);
+ test_acpi_one("-global ICH9-LPC.acpi-pci-hotplug-with-bridge-support=off"
+ " -device pci-testdev,bus=pcie.0,acpi-index=101,addr=3.0"
+ " -device pci-bridge,chassis_nr=1,id=shpcbr,addr=4.0"
+ " -device pci-testdev,bus=shpcbr,addr=1.0,acpi-index=201"
+ " -device pci-bridge,chassis_nr=2,shpc=off,id=noshpcbr,addr=5.0"
+ " -device pci-testdev,bus=noshpcbr,addr=1.0,acpi-index=301"
+ " -device pcie-root-port,id=hprp,port=0x0,chassis=1,addr=6.0"
+ " -device pci-testdev,bus=hprp,acpi-index=401"
+ " -device pcie-root-port,id=nohprp,port=0x0,chassis=2,hotplug=off,"
+ "addr=7.0"
+ " -device pci-testdev,bus=nohprp,acpi-index=501"
+ " -device pcie-root-port,id=nohprpint,port=0x0,chassis=3,hotplug=off,"
+ "addr=8.0"
+ " -device pcie-root-port,id=hprp2,port=0x0,chassis=4,bus=nohprpint,"
+ "addr=9.0"
+ " -device pci-testdev,bus=hprp2,acpi-index=601"
+ , &data);
+ free_test_data(&data);
+}
+
static void test_acpi_q35_multif_bridge(void)
{
test_data data = {
@@ -2094,6 +2128,8 @@ int main(int argc, char *argv[])
test_acpi_q35_tcg_tpm12_tis);
}
qtest_add_func("acpi/q35/bridge", test_acpi_q35_tcg_bridge);
+ qtest_add_func("acpi/q35/no-acpi-hotplug",
+ test_acpi_q35_tcg_no_acpi_hotplug);
qtest_add_func("acpi/q35/multif-bridge",
test_acpi_q35_multif_bridge);
qtest_add_func("acpi/q35/mmio64", test_acpi_q35_tcg_mmio64);
--
MST
- [PULL 17/73] vdpa: add vhost_vdpa->suspended parameter, (continued)
- [PULL 17/73] vdpa: add vhost_vdpa->suspended parameter, Michael S. Tsirkin, 2023/03/07
- [PULL 18/73] vdpa: add vhost_vdpa_suspend, Michael S. Tsirkin, 2023/03/07
- [PULL 19/73] vdpa: move vhost reset after get vring base, Michael S. Tsirkin, 2023/03/07
- [PULL 20/73] vdpa: add vdpa net migration state notifier, Michael S. Tsirkin, 2023/03/07
- [PULL 21/73] vdpa: disable RAM block discard only for the first device, Michael S. Tsirkin, 2023/03/07
- [PULL 22/73] vdpa net: block migration if the device has CVQ, Michael S. Tsirkin, 2023/03/07
- [PULL 24/73] vdpa: block migration if SVQ does not admit a feature, Michael S. Tsirkin, 2023/03/07
- [PULL 26/73] vdpa: return VHOST_F_LOG_ALL in vhost-vdpa devices, Michael S. Tsirkin, 2023/03/07
- [PULL 23/73] vdpa: block migration if device has unsupported features, Michael S. Tsirkin, 2023/03/07
- [PULL 28/73] tests: acpi: whitelist new q35.noacpihp test and pc.hpbrroot, Michael S. Tsirkin, 2023/03/07
- [PULL 29/73] tests: acpi: add test_acpi_q35_tcg_no_acpi_hotplug test and extend test_acpi_piix4_no_acpi_pci_hotplug,
Michael S. Tsirkin <=
- [PULL 30/73] tests: acpi: update expected blobs, Michael S. Tsirkin, 2023/03/07
- [PULL 25/73] vdpa net: allow VHOST_F_LOG_ALL, Michael S. Tsirkin, 2023/03/07
- [PULL 27/73] Revert "tests/qtest: Check for devices in bios-tables-test", Michael S. Tsirkin, 2023/03/07
- [PULL 31/73] tests: acpi: whitelist q35/DSDT.multi-bridge before extending testcase, Michael S. Tsirkin, 2023/03/07
- [PULL 33/73] x86: pcihp: fix missing PCNT callchain when intermediate root-port has 'hotplug=off' set, Michael S. Tsirkin, 2023/03/07
- [PULL 32/73] tests: acpi: extend multi-bridge case with case 'root-port,id=HOHP,hotplug=off root-port,bus=NOHP', Michael S. Tsirkin, 2023/03/07
- [PULL 34/73] tests: acpi: whitelist pc/DSDT.hpbrroot and pc/DSDT.hpbridge tests, Michael S. Tsirkin, 2023/03/07
- [PULL 35/73] x86: pcihp: fix missing bridge AML when intermediate root-port has 'hotplug=off' set, Michael S. Tsirkin, 2023/03/07