From 4d01b8994ca5ce7f48e85e48fb1d31e73699108b Mon Sep 17 00:00:00 2001 From: Gerd Hoffmann Date: Thu, 3 Dec 2020 11:54:18 +0100 Subject: microvm: add second ioapic Create second ioapic, route virtio-mmio IRQs to it, allow more virtio-mmio devices (24 instead of 8). Needs ACPI, enabled by default, can be turned off using -machine ioapic2=off Signed-off-by: Gerd Hoffmann Reviewed-by: Michael S. Tsirkin Reviewed-by: Igor Mammedov Reviewed-by: Sergio Lopez Message-id: 20201203105423.10431-8-kraxel@redhat.com --- tests/qtest/bios-tables-test.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'tests/qtest') diff --git a/tests/qtest/bios-tables-test.c b/tests/qtest/bios-tables-test.c index 64a9a772ee..61bf861ac9 100644 --- a/tests/qtest/bios-tables-test.c +++ b/tests/qtest/bios-tables-test.c @@ -1124,7 +1124,7 @@ static void test_acpi_microvm_tcg(void) test_data data; test_acpi_microvm_prepare(&data); - test_acpi_one(" -machine microvm,acpi=on,rtc=off", + test_acpi_one(" -machine microvm,acpi=on,ioapic2=off,rtc=off", &data); free_test_data(&data); } @@ -1135,7 +1135,7 @@ static void test_acpi_microvm_usb_tcg(void) test_acpi_microvm_prepare(&data); data.variant = ".usb"; - test_acpi_one(" -machine microvm,acpi=on,usb=on,rtc=off", + test_acpi_one(" -machine microvm,acpi=on,ioapic2=off,usb=on,rtc=off", &data); free_test_data(&data); } @@ -1146,7 +1146,7 @@ static void test_acpi_microvm_rtc_tcg(void) test_acpi_microvm_prepare(&data); data.variant = ".rtc"; - test_acpi_one(" -machine microvm,acpi=on,rtc=on", + test_acpi_one(" -machine microvm,acpi=on,ioapic2=off,rtc=on", &data); free_test_data(&data); } @@ -1158,7 +1158,7 @@ static void test_acpi_microvm_pcie_tcg(void) test_acpi_microvm_prepare(&data); data.variant = ".pcie"; data.tcg_only = true; /* need constant host-phys-bits */ - test_acpi_one(" -machine microvm,acpi=on,rtc=off,pcie=on", + test_acpi_one(" -machine microvm,acpi=on,ioapic2=off,rtc=off,pcie=on", &data); free_test_data(&data); } -- cgit v1.2.3-55-g7522 From cdecc3d39aa9940887b6e587faa8cf25f115c9dc Mon Sep 17 00:00:00 2001 From: Gerd Hoffmann Date: Thu, 3 Dec 2020 11:54:19 +0100 Subject: tests/acpi: allow updates for expected data files Signed-off-by: Gerd Hoffmann Reviewed-by: Michael S. Tsirkin Reviewed-by: Igor Mammedov Reviewed-by: Sergio Lopez Message-id: 20201203105423.10431-9-kraxel@redhat.com --- tests/qtest/bios-tables-test-allowed-diff.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'tests/qtest') diff --git a/tests/qtest/bios-tables-test-allowed-diff.h b/tests/qtest/bios-tables-test-allowed-diff.h index dfb8523c8b..191ac230b0 100644 --- a/tests/qtest/bios-tables-test-allowed-diff.h +++ b/tests/qtest/bios-tables-test-allowed-diff.h @@ -1 +1,3 @@ /* List of comma-separated changed AML files to ignore */ +"tests/data/acpi/microvm/APIC.ioapic2", +"tests/data/acpi/microvm/DSDT.ioapic2", -- cgit v1.2.3-55-g7522 From 38ee397f3f46df4fd728bb38e08549ee7cace73f Mon Sep 17 00:00:00 2001 From: Gerd Hoffmann Date: Thu, 3 Dec 2020 11:54:21 +0100 Subject: tests/acpi: add ioapic2=on test for microvm APIC table changes: [034h 0052 1] Subtable Type : 01 [I/O APIC] [035h 0053 1] Length : 0C [036h 0054 1] I/O Apic ID : 00 [037h 0055 1] Reserved : 00 [038h 0056 4] Address : FEC00000 [03Ch 0060 4] Interrupt : 00000000 +[040h 0064 1] Subtable Type : 01 [I/O APIC] +[041h 0065 1] Length : 0C +[042h 0066 1] I/O Apic ID : 01 +[043h 0067 1] Reserved : 00 +[044h 0068 4] Address : FEC10000 +[048h 0072 4] Interrupt : 00000018 DSDT table changes: - Device (VR07) + Device (VR23) { Name (_HID, "LNRO0005") // _HID: Hardware ID - Name (_UID, 0x07) // _UID: Unique ID + Name (_UID, 0x17) // _UID: Unique ID Name (_CCA, One) // _CCA: Cache Coherency Attribute Name (_CRS, ResourceTemplate () // _CRS: Current Resource Settings { Memory32Fixed (ReadWrite, - 0xFEB00E00, // Address Base + 0xFEB02E00, // Address Base 0x00000200, // Address Length ) Interrupt (ResourceConsumer, Level, ActiveHigh, Exclusive, ,, ) { - 0x00000017, + 0x0000002F, } }) } } Signed-off-by: Gerd Hoffmann Reviewed-by: Michael S. Tsirkin Reviewed-by: Igor Mammedov Reviewed-by: Sergio Lopez Message-id: 20201203105423.10431-11-kraxel@redhat.com --- tests/qtest/bios-tables-test.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'tests/qtest') diff --git a/tests/qtest/bios-tables-test.c b/tests/qtest/bios-tables-test.c index 61bf861ac9..f2f79dd6a4 100644 --- a/tests/qtest/bios-tables-test.c +++ b/tests/qtest/bios-tables-test.c @@ -1163,6 +1163,17 @@ static void test_acpi_microvm_pcie_tcg(void) free_test_data(&data); } +static void test_acpi_microvm_ioapic2_tcg(void) +{ + test_data data; + + test_acpi_microvm_prepare(&data); + data.variant = ".ioapic2"; + test_acpi_one(" -machine microvm,acpi=on,ioapic2=on,rtc=off", + &data); + free_test_data(&data); +} + static void test_acpi_virt_tcg_numamem(void) { test_data data = { @@ -1323,6 +1334,7 @@ int main(int argc, char *argv[]) qtest_add_func("acpi/microvm", test_acpi_microvm_tcg); qtest_add_func("acpi/microvm/usb", test_acpi_microvm_usb_tcg); qtest_add_func("acpi/microvm/rtc", test_acpi_microvm_rtc_tcg); + qtest_add_func("acpi/microvm/ioapic2", test_acpi_microvm_ioapic2_tcg); if (strcmp(arch, "x86_64") == 0) { qtest_add_func("acpi/microvm/pcie", test_acpi_microvm_pcie_tcg); } -- cgit v1.2.3-55-g7522 From 08af4e13f8d4db099bc444f83879c32459df7f3a Mon Sep 17 00:00:00 2001 From: Gerd Hoffmann Date: Thu, 3 Dec 2020 11:54:23 +0100 Subject: tests/acpi: disallow updates for expected data files Signed-off-by: Gerd Hoffmann Reviewed-by: Michael S. Tsirkin Reviewed-by: Igor Mammedov Reviewed-by: Sergio Lopez Message-id: 20201203105423.10431-13-kraxel@redhat.com --- tests/qtest/bios-tables-test-allowed-diff.h | 2 -- 1 file changed, 2 deletions(-) (limited to 'tests/qtest') diff --git a/tests/qtest/bios-tables-test-allowed-diff.h b/tests/qtest/bios-tables-test-allowed-diff.h index 191ac230b0..dfb8523c8b 100644 --- a/tests/qtest/bios-tables-test-allowed-diff.h +++ b/tests/qtest/bios-tables-test-allowed-diff.h @@ -1,3 +1 @@ /* List of comma-separated changed AML files to ignore */ -"tests/data/acpi/microvm/APIC.ioapic2", -"tests/data/acpi/microvm/DSDT.ioapic2", -- cgit v1.2.3-55-g7522