>> >> Jonathan, Alex, do you know how we may add tests that is dependent >> >> on the vfio-pci device? >> > >> > There are none. >> > >> > This would require a host device always available for passthrough and >> > there is no simple solution for this problem. Such tests would need to >> > run in a nested environment under avocado: a pc/virt machine with an >> > igb device and use the PF and/or VFs to check device assignment in a >> > nested guests. >> > >> > PPC just introduced new tests to check nested guest support on two >> > different HV implementations. If you have time, please take a look >> > at tests/avocado/ppc_hv_tests.py for the framework. >> > >> > I will try to propose a new test when I am done with the reviews, >> > not before 9.0 soft freeze though. >> >> Thanks for the information. As part of this patch, I'll leave out >> this test change then. > > For BIOS table purposes it can be any PCI device. I've been testing > this with a virtio-net-pci but something like virtio-rng-pci will > do fine. The table contents doesn't care if it's vfio or not.
Thanks, I was able to work this out with the virtio-rng-pci device. > I can spin a test as part of the follow up Generic Port series that > incorporates both and pushes the limits of the hmat code in general. > Current tests are too tame ;) Sure, that is fine by me. FYI, this is how the test change looked like in case you were wondering. diff --git a/tests/qtest/bios-tables-test.c b/tests/qtest/bios-tables-test.c index fe6a9a8563..8ac8e3f048 100644 --- a/tests/qtest/bios-tables-test.c +++ b/tests/qtest/bios-tables-test.c @@ -2157,6 +2157,29 @@ static void test_acpi_virt_oem_fields(void) g_free(args); } +static void test_acpi_virt_srat_gi(void) +{ + test_data data = { + .machine = "virt", + .tcg_only = true, + .uefi_fl1 = "pc-bios/edk2-aarch64-code.fd", + .uefi_fl2 = "pc-bios/edk2-arm-vars.fd", + .cd = "tests/data/uefi-boot-images/bios-tables-test.aarch64.iso.qcow2", + .ram_start = 0x40000000ULL, + .scan_len = 128ULL * 1024 * 1024, + }; + + data.variant = ".gi"; + test_acpi_one(" -cpu cortex-a57" + " -object memory-backend-ram,id=ram0,size=128M" + " -numa node,memdev=ram0,nodeid=0" + " -numa node,nodeid=1" + " -device virtio-rng-pci,id=dev0" + " -object acpi-generic-initiator,id=gi0,pci-dev=dev0,node=1", + &data); + + free_test_data(&data); +} int main(int argc, char *argv[]) { @@ -2312,6 +2335,7 @@ int main(int argc, char *argv[]) if (qtest_has_device("virtio-iommu-pci")) { qtest_add_func("acpi/virt/viot", test_acpi_virt_viot); } + qtest_add_func("acpi/virt/gi", test_acpi_virt_srat_gi); } } ret = g_test_run(); -- 2.34.1 > Given I don't think we have clarification from ACPI spec side on > the many to one mapping you are using, I'd just use a 1-1 in any > test. Ack.