diff mbox series

[3/4] tests/acpi/bios-table-test: add pcie root port device for DMAR test

Message ID 20220822090438.426748-5-ani@anisinha.ca (mailing list archive)
State New, archived
Headers show
Series enable ATS per pcie root port, not globally | expand

Commit Message

Ani Sinha Aug. 22, 2022, 9:04 a.m. UTC
In the previos commit, we are explicitly adding scopes for pcie root ports in
Root Port ATS capability reporting structure. We add a pcie root port in the
QEMU test command line for DMAR tests so that we can verify that the scope of
the root port has been correctly added and structure looks sane.

After the changes, the above structure will look like this:

+[078h 0120   2]                Subtable Type : 0002 [Root Port ATS Capability]
+[07Ah 0122   2]                       Length : 0010
+
+[07Ch 0124   1]                        Flags : 00
+[07Dh 0125   1]                     Reserved : 00
+[07Eh 0126   2]           PCI Segment Number : 0000
+
+[080h 0128   1]            Device Scope Type : 02 [PCI Bridge Device]
+[081h 0129   1]                 Entry Length : 08
+[082h 0130   2]                     Reserved : 0000
+[084h 0132   1]               Enumeration ID : 00
+[085h 0133   1]               PCI Bus Number : 00
+
+[086h 0134   2]                     PCI Path : 02,00
+
+

Signed-off-by: Ani Sinha <ani@anisinha.ca>
---
 tests/qtest/bios-tables-test.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
diff mbox series

Patch

diff --git a/tests/qtest/bios-tables-test.c b/tests/qtest/bios-tables-test.c
index 7c5f736b51..dc79eafbb5 100644
--- a/tests/qtest/bios-tables-test.c
+++ b/tests/qtest/bios-tables-test.c
@@ -1141,7 +1141,8 @@  static void test_acpi_q35_kvm_dmar(void)
     data.machine = MACHINE_Q35;
     data.variant = ".dmar";
     test_acpi_one("-machine kernel-irqchip=split -accel kvm"
-                  " -device intel-iommu,intremap=on,device-iotlb=on", &data);
+                  " -device intel-iommu,intremap=on,device-iotlb=on"
+                  " -device pcie-root-port,bus=pcie.0", &data);
     free_test_data(&data);
 }