hw/arm: GIC ITS=off ACPI tables fixes
v3 cover hw/arm: GIC ITS=off ACPI tables fixes
Since v2:
- Fixed no_tcg_its inverted logic (rth)
Fix ACPI tables for '-M its=off' CLI option.
Regards,
Phil.
Philippe Mathieu-Daudé (9):
hw/arm/virt: Remove pointless VirtMachineState::tcg_its field hw/intc/gicv3_its: Do not check its_class_name() for NULL hw/arm/virt: Simplify create_its()
hw/arm/virt-acpi: Factor its_enabled() helper out qtest/bios-tables-test: Add test for -M virt,its=off qtest/bios-tables-test: Whitelist aarch64/virt 'its_off' variant blobs hw/arm/virt-acpi: Always build IORT table (even with GIC ITS disabled) hw/arm/virt-acpi: Do not advertise disabled GIC ITS qtest/bios-tables-test: Update aarch64/virt 'its_off' variant blobs
include/hw/arm/virt.h | 1 - include/hw/intc/arm_gicv3_its_common.h | 2 +- hw/arm/virt-acpi-build.c | 48 +++++++++++++--------- hw/arm/virt.c | 23 ++++------- tests/qtest/bios-tables-test.c | 22 ++++++++++ tests/data/acpi/aarch64/virt/APIC.its_off | Bin 0 -> 164 bytes tests/data/acpi/aarch64/virt/FACP.its_off | Bin 0 -> 276 bytes tests/data/acpi/aarch64/virt/IORT.its_off | Bin 0 -> 212 bytes 8 files changed, 59 insertions(+), 37 deletions(-) create mode 100644 tests/data/acpi/aarch64/virt/APIC.its_off create mode 100644 tests/data/acpi/aarch64/virt/FACP.its_off create mode 100644 tests/data/acpi/aarch64/virt/IORT.its_off
Signature · 1 line
2.47.1
PATCH v3 1/9 hw/arm/virt: Remove pointless VirtMachineState::tcg_its field
VirtMachineState::tcg_its has the negated logic value of VirtMachineClass::no_tcg_its. Directly use the latter, removing the former.
--- include/hw/arm/virt.h | 1 - hw/arm/virt.c | 13 +++++-------- 2 files changed, 5 insertions(+), 9 deletions(-)
include/hw/arm/virt.h +0 -1
@@ -150,7 +150,6 @@ struct VirtMachineState {bool highmem_mmio;bool highmem_redists;bool its; -bool tcg_its;bool virt;bool ras;bool mte;
hw/arm/virt.c +5 -8
@@ -710,11 +710,12 @@ static inline DeviceState *create_acpi_ged(VirtMachineState *vms)static void create_its (VirtMachineState *vms) { +VirtMachineClass *vmc =VIRT_MACHINE_GET_CLASS (vms);const char *itsclass =its_class_name ();DeviceState *dev;if (!strcmp (itsclass,"arm-gicv3-its" )) { -if (!vms->tcg_its) { +if (vmc->no_tcg_its) { itsclass =NULL ; } }
@@ -831,7 +832,9 @@ static void create_gic(VirtMachineState *vms, MemoryRegion *mem) redist_region_count);if (!kvm_irqchip_in_kernel ()) { -if (vms->tcg_its) { +VirtMachineClass *vmc =VIRT_MACHINE_GET_CLASS (vms); + +if (!vmc->no_tcg_its) {object_property_set_link (OBJECT (vms->gic),"sysmem" ,OBJECT (mem), &error_fatal);qdev_prop_set_bit (vms->gic,"has-lpi" , true);
@@ -3357,12 +3360,6 @@ static void virt_instance_init(Object *obj) }else {/* Default allows ITS instantiation */ vms->its = true; - -if (vmc->no_tcg_its) { - vms->tcg_its = false; - }else { - vms->tcg_its = true; - } }/* Default disallows iommu instantiation */
Signature · 1 line
2.47.1
Re: [PATCH-for-10.1 v3 1/9] hw/arm/virt: Remove pointless VirtMachineState::tcg_its field
Hi Philippe,
Quoted 5 lines · Philippe Mathieu-Daudé
VirtMachineState::tcg_itshas the negated logic value ofVirtMachineClass::no_tcg_its. Directly use the latter, removing the former.Signed-off-by Philippe Mathieu-Daudé <[email protected]>
Eric
Quoted 59 lines
--- include/hw/arm/virt.h | 1 - hw/arm/virt.c | 13 +++++-------- 2 files changed, 5 insertions(+), 9 deletions(-)include/hw/arm/virt.h +0
-1@@ -150,7 +150,6 @@ struct VirtMachineState {bool highmem_mmio;bool highmem_redists;bool its; -bool tcg_its;bool virt;bool ras;bool mte;hw/arm/virt.c +5
-8@@ -710,11 +710,12 @@ static inline DeviceState *create_acpi_ged(VirtMachineState *vms)static void create_its (VirtMachineState *vms) { +VirtMachineClass *vmc =VIRT_MACHINE_GET_CLASS (vms);const char *itsclass =its_class_name ();DeviceState *dev;if (!strcmp (itsclass,"arm-gicv3-its" )) { -if (!vms->tcg_its) { +if (vmc->no_tcg_its) { itsclass =NULL ; } }@@ -831,7 +832,9 @@ static void create_gic(VirtMachineState *vms, MemoryRegion *mem) redist_region_count);if (!kvm_irqchip_in_kernel ()) { -if (vms->tcg_its) { +VirtMachineClass *vmc =VIRT_MACHINE_GET_CLASS (vms); + +if (!vmc->no_tcg_its) {object_property_set_link (OBJECT (vms->gic),"sysmem" ,OBJECT (mem), &error_fatal);qdev_prop_set_bit (vms->gic,"has-lpi" , true);@@ -3357,12 +3360,6 @@ static void virt_instance_init(Object *obj) }else {/* Default allows ITS instantiation */ vms->its = true; - -if (vmc->no_tcg_its) { - vms->tcg_its = false; - }else { - vms->tcg_its = true; - } }/* Default disallows iommu instantiation */
PATCH v3 2/9 hw/intc/gicv3_its: Do not check its_class_name() for NULL
In reply to Philippe Mathieu-DaudéSince commit cc5e719e2c8 ("kvm: require KVM_CAP_SIGNAL_MSI"), its_class_name() single implementation doesn't return NULL anymore. Update the prototype docstring, and remove the pointless checks.
--- include/hw/intc/arm_gicv3_its_common.h | 2 +- hw/arm/virt-acpi-build.c | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-)
include/hw/intc/arm_gicv3_its_common.h +1 -1
@@ -128,7 +128,7 @@ struct GICv3ITSCommonClass {* Return the ITS class name to use depending on whether KVM acceleration * and KVM CAP_SIGNAL_MSI are supported * -* Returns: class name to use or NULL +* Returns: class name to use */ const char *its_class_name (void );
hw/arm/virt-acpi-build.c +2 -2
@@ -741,7 +741,7 @@ build_madt(GArray *table_data, BIOSLinker *linker, VirtMachineState *vms) memmap[VIRT_HIGH_GIC_REDIST2].size); } -if (its_class_name () && !vmc->no_its) { +if (!vmc->no_its) {/* * ACPI spec, Revision 6.0 Errata A * (original 6.0 definition has invalid Length)
@@ -973,7 +973,7 @@ void virt_acpi_build(VirtMachineState *vms, AcpiBuildTables *tables) vms->oem_table_id); } -if (its_class_name () && !vmc->no_its) { +if (!vmc->no_its) {acpi_add_table (table_offsets, tables_blob);build_iort (tables_blob, tables->linker, vms); }
Signature · 1 line
2.47.1
Re: [PATCH-for-10.1 v3 2/9] hw/intc/gicv3_its: Do not check its_class_name() for NULL
Quoted 8 lines · Philippe Mathieu-Daudé
Since commit
cc5e719e2c8("kvm: requireKVM_CAP_SIGNAL_MSI"),its_class_name()single implementation doesn't return NULL anymore. Update the prototype docstring, and remove the pointless checks.Reported-by Gustavo Romero <[email protected]>Signed-off-by Philippe Mathieu-Daudé <[email protected]>Reviewed-by Richard Henderson <[email protected]>
Eric
Quoted 40 lines
--- include/hw/intc/arm_gicv3_its_common.h | 2 +- hw/arm/virt-acpi-build.c | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-)include/hw/intc/arm_gicv3_its_common.h +1
-1@@ -128,7 +128,7 @@ struct GICv3ITSCommonClass {* Return the ITS class name to use depending on whether KVM acceleration * and KVM CAP_SIGNAL_MSI are supported * -* Returns: class name to use or NULL +* Returns: class name to use */ const char *its_class_name (void );hw/arm/virt-acpi-build.c +2
-2@@ -741,7 +741,7 @@ build_madt(GArray *table_data, BIOSLinker *linker, VirtMachineState *vms) memmap[VIRT_HIGH_GIC_REDIST2].size); } -if (its_class_name () && !vmc->no_its) { +if (!vmc->no_its) {/* * ACPI spec, Revision 6.0 Errata A * (original 6.0 definition has invalid Length) @@ -973,7 +973,7 @@ void virt_acpi_build(VirtMachineState *vms, AcpiBuildTables *tables) vms->oem_table_id); } -if (its_class_name () && !vmc->no_its) { +if (!vmc->no_its) {acpi_add_table (table_offsets, tables_blob);build_iort (tables_blob, tables->linker, vms); }
PATCH v3 3/9 hw/arm/virt: Simplify create_its()
In reply to Philippe Mathieu-DaudéNo need to strstr() check the class name when we can use kvm_irqchip_in_kernel().
--- hw/arm/virt.c | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-)
hw/arm/virt.c +3 -9
@@ -711,21 +711,15 @@ static inline DeviceState *create_acpi_ged(VirtMachineState *vms)static void create_its (VirtMachineState *vms) {VirtMachineClass *vmc =VIRT_MACHINE_GET_CLASS (vms); -const char *itsclass =its_class_name ();DeviceState *dev; -if (!strcmp (itsclass,"arm-gicv3-its" )) { -if (vmc->no_tcg_its) { - itsclass =NULL ; - } - } - -if (!itsclass) { +assert (!vmc->no_its); +if (!kvm_irqchip_in_kernel () && vmc->no_tcg_its) {/* Do nothing if not supported */ return ; } - dev =qdev_new (itsclass); + dev =qdev_new (its_class_name ());object_property_set_link (OBJECT (dev),"parent-gicv3" ,OBJECT (vms->gic), &error_abort);
Signature · 1 line
2.47.1
Re: [PATCH-for-10.1 v3 3/9] hw/arm/virt: Simplify create_its()
Hi Phil,
Quoted 28 lines · Philippe Mathieu-Daudé
No need to
strstr()check the class name when we can usekvm_irqchip_in_kernel().Signed-off-by Philippe Mathieu-Daudé <[email protected]>Reviewed-by Richard Henderson <[email protected]>--- hw/arm/virt.c | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-)hw/arm/virt.c +1
-8@@ -711,21 +711,15 @@ static inline DeviceState *create_acpi_ged(VirtMachineState *vms)static void create_its (VirtMachineState *vms) {VirtMachineClass *vmc =VIRT_MACHINE_GET_CLASS (vms); -const char *itsclass =its_class_name ();DeviceState *dev; -if (!strcmp (itsclass,"arm-gicv3-its" )) { -if (vmc->no_tcg_its) { - itsclass =NULL ; - } - } - -if (!itsclass) { +assert (!vmc->no_its);
hw/arm/virt.c static inline DeviceState *create_acpi_ged(VirtMachineState *vms) · line 725
Quoted 10 lines
hw/arm/virt.c +2
-1+if (!kvm_irqchip_in_kernel () && vmc->no_tcg_its) {/* Do nothing if not supported */ return ; } - dev =qdev_new (itsclass); + dev =qdev_new (its_class_name ());object_property_set_link (OBJECT (dev),"parent-gicv3" ,OBJECT (vms->gic), &error_abort);
Cheers,
Gustavo
Re: [PATCH-for-10.1 v3 3/9] hw/arm/virt: Simplify create_its()
In reply to Philippe Mathieu-DaudéQuoted 5 lines · Philippe Mathieu-Daudé
No need to
strstr()check the class name when we can usekvm_irqchip_in_kernel().Signed-off-by Philippe Mathieu-Daudé <[email protected]>Reviewed-by Richard Henderson <[email protected]>
Eric
Quoted 33 lines
--- hw/arm/virt.c | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-)hw/arm/virt.c +3
-9@@ -711,21 +711,15 @@ static inline DeviceState *create_acpi_ged(VirtMachineState *vms)static void create_its (VirtMachineState *vms) {VirtMachineClass *vmc =VIRT_MACHINE_GET_CLASS (vms); -const char *itsclass =its_class_name ();DeviceState *dev; -if (!strcmp (itsclass,"arm-gicv3-its" )) { -if (vmc->no_tcg_its) { - itsclass =NULL ; - } - } - -if (!itsclass) { +assert (!vmc->no_its); +if (!kvm_irqchip_in_kernel () && vmc->no_tcg_its) {/* Do nothing if not supported */ return ; } - dev =qdev_new (itsclass); + dev =qdev_new (its_class_name ());object_property_set_link (OBJECT (dev),"parent-gicv3" ,OBJECT (vms->gic), &error_abort);
PATCH v3 4/9 hw/arm/virt-acpi: Factor its_enabled() helper out
In reply to Philippe Mathieu-DaudéGIC ITS is checked for the MADT and IORT tables. Factor the checks out to the its_enabled() helper.
--- hw/arm/virt-acpi-build.c | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-)
hw/arm/virt-acpi-build.c +9 -3
@@ -208,6 +208,13 @@ static void acpi_dsdt_add_tpm(Aml *scope, VirtMachineState *vms)#define ROOT_COMPLEX_ENTRY_SIZE 36#define IORT_NODE_OFFSET 48 +static bool its_enabled (VirtMachineState *vms) +{ +VirtMachineClass *vmc =VIRT_MACHINE_GET_CLASS (vms); + +return !vmc->no_its; +} +/* * Append an ID mapping entry as described by "Table 4 ID mapping format" in * "IO Remapping Table System Software on ARM Platforms", Chapter 3.
@@ -670,7 +677,6 @@ static void build_madt(GArray *table_data, BIOSLinker *linker, VirtMachineState *vms) {int i; -VirtMachineClass *vmc =VIRT_MACHINE_GET_CLASS (vms);const MemMapEntry *memmap = vms->memmap;AcpiTable table = { .sig ="APIC" , .rev =4 , .oem_id = vms->oem_id, .oem_table_id = vms->oem_table_id };
@@ -741,7 +747,7 @@ build_madt(GArray *table_data, BIOSLinker *linker, VirtMachineState *vms) memmap[VIRT_HIGH_GIC_REDIST2].size); } -if (!vmc->no_its) { +if (its_enabled (vms)) {/* * ACPI spec, Revision 6.0 Errata A * (original 6.0 definition has invalid Length)
@@ -973,7 +979,7 @@ void virt_acpi_build(VirtMachineState *vms, AcpiBuildTables *tables) vms->oem_table_id); } -if (!vmc->no_its) { +if (its_enabled (vms)) {acpi_add_table (table_offsets, tables_blob);build_iort (tables_blob, tables->linker, vms); }
Signature · 1 line
2.47.1
Re: [PATCH-for-10.1 v3 4/9] hw/arm/virt-acpi: Factor its_enabled() helper out
Quoted 6 lines · Philippe Mathieu-Daudé
GIC ITS is checked for the MADT and IORT tables. Factor the checks out to the
its_enabled()helper.Signed-off-by Philippe Mathieu-Daudé <[email protected]>Reviewed-by Gustavo Romero <[email protected]>Reviewed-by Richard Henderson <[email protected]>
Eric
Quoted 48 lines
--- hw/arm/virt-acpi-build.c | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-)hw/arm/virt-acpi-build.c +9
-3@@ -208,6 +208,13 @@ static void acpi_dsdt_add_tpm(Aml *scope, VirtMachineState *vms)#define ROOT_COMPLEX_ENTRY_SIZE 36#define IORT_NODE_OFFSET 48 +static bool its_enabled (VirtMachineState *vms) +{ +VirtMachineClass *vmc =VIRT_MACHINE_GET_CLASS (vms); + +return !vmc->no_its; +} +/* * Append an ID mapping entry as described by "Table 4 ID mapping format" in * "IO Remapping Table System Software on ARM Platforms", Chapter 3. @@ -670,7 +677,6 @@ static void build_madt(GArray *table_data, BIOSLinker *linker, VirtMachineState *vms) {int i; -VirtMachineClass *vmc =VIRT_MACHINE_GET_CLASS (vms);const MemMapEntry *memmap = vms->memmap;AcpiTable table = { .sig ="APIC" , .rev =4 , .oem_id = vms->oem_id, .oem_table_id = vms->oem_table_id };@@ -741,7 +747,7 @@ build_madt(GArray *table_data, BIOSLinker *linker, VirtMachineState *vms) memmap[VIRT_HIGH_GIC_REDIST2].size); } -if (!vmc->no_its) { +if (its_enabled (vms)) {/* * ACPI spec, Revision 6.0 Errata A * (original 6.0 definition has invalid Length) @@ -973,7 +979,7 @@ void virt_acpi_build(VirtMachineState *vms, AcpiBuildTables *tables) vms->oem_table_id); } -if (!vmc->no_its) { +if (its_enabled (vms)) {acpi_add_table (table_offsets, tables_blob);build_iort (tables_blob, tables->linker, vms); }
PATCH v3 5/9 qtest/bios-tables-test: Add test for -M virt,its=off
In reply to Philippe Mathieu-DaudéAdd the use case reported as issue #2886 [*]. The test passes while it shouldn't. We are going to fix that in the following commits.
[*] https://gitlab.com/qemu-project/qemu/-/issues/2886
--- tests/qtest/bios-tables-test.c | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+)
tests/qtest/bios-tables-test.c +21 -0
@@ -2146,6 +2146,25 @@ static void test_acpi_aarch64_virt_tcg_topology(void)free_test_data (&data); } +static void test_acpi_aarch64_virt_tcg_its_off (void ) +{ +test_data data = { + .machine ="virt" , + .arch ="aarch64" , + .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 , + }; + +test_acpi_one ("-cpu cortex-a57 " +"-M virtualization=on,secure=off " +"-M gic-version=max,its=off,iommu=smmuv3" , &data); +free_test_data (&data); +} +static void test_acpi_q35_viot (void ) {test_data data = {
@@ -2577,6 +2596,8 @@ int main(int argc, char *argv[]) test_acpi_aarch64_virt_tcg_acpi_hmat);qtest_add_func ("acpi/virt/topology" , test_acpi_aarch64_virt_tcg_topology); +qtest_add_func ("acpi/virt/its_off" , + test_acpi_aarch64_virt_tcg_its_off);qtest_add_func ("acpi/virt/numamem" , test_acpi_aarch64_virt_tcg_numamem);qtest_add_func ("acpi/virt/memhp" , test_acpi_aarch64_virt_tcg_memhp);
Signature · 1 line
2.47.1
Re: [PATCH-for-10.1 v3 5/9] qtest/bios-tables-test: Add test for -M virt,its=off
Hi Phil,
Quoted 3 lines · Philippe Mathieu-Daudé
Add the use case reported as issue #2886 [*]. The test passes while it shouldn't. We are going to fix that in the following commits.
I think this organization is not ideal. I like better your first version, i.e., adding the correct blobs that make the new test pass, as you did in:
[PATCH-for-10.0 1/5] qtest/bios-tables-test: Add test for -M virt, its=o
https://mail.gnu.org/archive/html/qemu-devel/2025-03/msg07081.html
The way it is here if you checkout this commit and run the test (make check) the acpi test will _not pass_ because of the other changes in the APIC, FADT, and IORT tables caused by the other VM options (virtualization, gic-version, and iommu), as I pointed out in [0], even tho the bug is present and its=off does not take effect.
Cheers,
Gustavo
[0] https://mail.gnu.org/archive/html/qemu-devel/2025-04/msg00438.html
Quoted 46 lines
[*] https://gitlab.com/qemu-project/qemu/-/issues/2886
Signed-off-by Philippe Mathieu-Daudé <[email protected]>--- tests/qtest/bios-tables-test.c | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+)tests/qtest/bios-tables-test.c +21
-0@@ -2146,6 +2146,25 @@ static void test_acpi_aarch64_virt_tcg_topology(void)free_test_data (&data); } +static void test_acpi_aarch64_virt_tcg_its_off (void ) +{ +test_data data = { + .machine ="virt" , + .arch ="aarch64" , + .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 , + }; + +test_acpi_one ("-cpu cortex-a57 " +"-M virtualization=on,secure=off " +"-M gic-version=max,its=off,iommu=smmuv3" , &data); +free_test_data (&data); +} +static void test_acpi_q35_viot (void ) {test_data data = {@@ -2577,6 +2596,8 @@ int main(int argc, char *argv[]) test_acpi_aarch64_virt_tcg_acpi_hmat);qtest_add_func ("acpi/virt/topology" , test_acpi_aarch64_virt_tcg_topology); +qtest_add_func ("acpi/virt/its_off" , + test_acpi_aarch64_virt_tcg_its_off);qtest_add_func ("acpi/virt/numamem" , test_acpi_aarch64_virt_tcg_numamem);qtest_add_func ("acpi/virt/memhp" , test_acpi_aarch64_virt_tcg_memhp);
Re: [PATCH-for-10.1 v3 5/9] qtest/bios-tables-test: Add test for -M virt,its=off
Quoted 11 lines · Gustavo Romero
Hi Phil,
Quoted 3 lines · Philippe Mathieu-Daudé
Add the use case reported as issue #2886 [*]. The test passes while it shouldn't. We are going to fix that in the following commits.
I think this organization is not ideal. I like better your first version, i.e., adding the correct blobs that make the new test pass, as you did in:
Quoted 8 lines
[PATCH-for-10.0 1/5] qtest/bios-tables-test: Add test for -M virt, its=o
https://mail.gnu.org/archive/html/qemu-devel/2025-03/msg07081.htmlThe way it is here if you checkout this commit and run the test (make check) the acpi test will
_notpass_because of the other changes in the APIC, FADT, and IORT tables caused by the other VM options (virtualization, gic-version, and iommu), as I pointed out in [0], even tho the bug is present and its=off does not take effect.
I do agree with Gustavo. This looks introduced in a non std way.
Found
https://lore.kernel.org/all/[email protected]/
as an example:
step1) create dummy entries for the variant table data + mark those as ignored in tests/qtest/bios-tables-test-allowed-diff.h
<https://lore.kernel.org/all/[email protected]/#Z31tests:qtest:bios-tables-test-allowed-diff.h>
step2) create the new test
step3) Generate & store the new tables and remove lines in bios-tables-test-allowed-diff.h
<https://lore.kernel.org/all/[email protected]/#Z31tests:qtest:bios-tables-test-allowed-diff.h>
Thanks
Eric
Quoted 59 lines
Cheers,
Gustavo[0] https://mail.gnu.org/archive/html/qemu-devel/2025-04/msg00438.html
Quoted 49 lines
[*] https://gitlab.com/qemu-project/qemu/-/issues/2886
Signed-off-by Philippe Mathieu-Daudé <[email protected]>---
tests/qtest/bios-tables-test.c| 21 +++++++++++++++++++++1 file changed, 21 insertions(+)tests/qtest/bios-tables-test.c +18
-0@@ -2146,6 +2146,25 @@ static voidtest_acpi_aarch64_virt_tcg_topology (void ) free_test_data(&data); } +static void test_acpi_aarch64_virt_tcg_its_off(void) +{ + test_data data = { + .machine = "virt", + .arch = "aarch64", + .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, + }; + + test_acpi_one("-cpu cortex-a57 " + "-M virtualization=on,secure=off " + "-M gic-version=max,its=off,iommu=smmuv3", &data); + free_test_data(&data); +} + static void test_acpi_q35_viot(void){
test_datadata = {tests/qtest/bios-tables-test.c +2
-0@@ -2577,6 +2596,8 @@ int main(int argc, char *argv[]) test_acpi_aarch64_virt_tcg_acpi_hmat); qtest_add_func("acpi/virt/topology", test_acpi_aarch64_virt_tcg_topology); + qtest_add_func("acpi/virt/its_off", + test_acpi_aarch64_virt_tcg_its_off); qtest_add_func("acpi/virt/numamem", test_acpi_aarch64_virt_tcg_numamem); qtest_add_func("acpi/virt/memhp",
test_acpi_aarch64_virt_tcg_memhp);
PATCH v3 6/9 qtest/bios-tables-test: Whitelist aarch64/virt 'its_off' variant blobs
In reply to Philippe Mathieu-DaudéWe are going to fix the test_acpi_aarch64_virt_tcg_its_off() test. In preparation, copy the ACPI tables which will be altered as 'its_off' variants, and whitelist them.
--- tests/qtest/bios-tables-test-allowed-diff.h | 3 +++ tests/qtest/bios-tables-test.c | 1 + tests/data/acpi/aarch64/virt/APIC.its_off | Bin 0 -> 184 bytes tests/data/acpi/aarch64/virt/FACP.its_off | Bin 0 -> 276 bytes tests/data/acpi/aarch64/virt/IORT.its_off | Bin 0 -> 236 bytes 5 files changed, 4 insertions(+) create mode 100644 tests/data/acpi/aarch64/virt/APIC.its_off create mode 100644 tests/data/acpi/aarch64/virt/FACP.its_off create mode 100644 tests/data/acpi/aarch64/virt/IORT.its_off
tests/qtest/bios-tables-test-allowed-diff.h +3 -0
@@ -1 +1,4 @@/* List of comma-separated changed AML files to ignore */ +"tests/data/acpi/aarch64/virt/APIC.its_off" , +"tests/data/acpi/aarch64/virt/FACP.its_off" , +"tests/data/acpi/aarch64/virt/IORT.its_off",
tests/qtest/bios-tables-test.c +1 -0
@@ -2151,6 +2151,7 @@ static void test_acpi_aarch64_virt_tcg_its_off(void)test_data data = { .machine ="virt" , .arch ="aarch64" , + .variant =".its_off" , .tcg_only = true, .uefi_fl1 ="pc-bios/edk2-aarch64-code.fd" , .uefi_fl2 ="pc-bios/edk2-arm-vars.fd" ,
tests/data/acpi/aarch64/virt/APIC.its_off new file binary +0 -0
tests/data/acpi/aarch64/virt/FACP.its_off new file binary +0 -0
tests/data/acpi/aarch64/virt/IORT.its_off new file binary +0 -0
Signature · 1 line
2.47.1
Re: [PATCH-for-10.1 v3 6/9] qtest/bios-tables-test: Whitelist aarch64/virt 'its_off' variant blobs
Hi Phil,
Quoted 22 lines · Philippe Mathieu-Daudé
We are going to fix the
test_acpi_aarch64_virt_tcg_its_off()test. In preparation, copy the ACPI tables which will be altered as 'its_off' variants, and whitelist them.Reviewed-by Gustavo Romero <[email protected]>Signed-off-by Philippe Mathieu-Daudé <[email protected]>--- tests/qtest/bios-tables-test-allowed-diff.h | 3 +++ tests/qtest/bios-tables-test.c | 1 + tests/data/acpi/aarch64/virt/APIC.its_off | Bin 0 -> 184 bytes tests/data/acpi/aarch64/virt/FACP.its_off | Bin 0 -> 276 bytes tests/data/acpi/aarch64/virt/IORT.its_off | Bin 0 -> 236 bytes 5 files changed, 4 insertions(+)create mode 100644 tests/data/acpi/aarch64/virt/APIC.its_off create mode 100644 tests/data/acpi/aarch64/virt/FACP.its_off create mode 100644 tests/data/acpi/aarch64/virt/IORT.its_off
tests/qtest/bios-tables-test-allowed-diff.h +0
-0
tests/qtest/bios-tables-test-allowed-diff.h line 4
Quoted 4 lines
tests/qtest/bios-tables-test-allowed-diff.h +3
-0@@ -1 +1,4 @@/* List of comma-separated changed AML files to ignore */ +"tests/data/acpi/aarch64/virt/APIC.its_off" , +"tests/data/acpi/aarch64/virt/FACP.its_off" , +"tests/data/acpi/aarch64/virt/IORT.its_off",
I think your first approach is the correct one: you add the blobs
when adding the new test, so they would go into patch 5/9 in this series, making the test pass without adding anything to bios-tables-test-allowed-diff.h. Then in this patch only add the APIC.its_off table to the bios-tables-test-allowed-diff.h since that's the table that changes when the fix is in place, as you did in:
https://mail.gnu.org/archive/html/qemu-devel/2025-03/msg07082.html
Plus, adding the blobs, which are actually related to the test in the other patch, and ignoring them at the same time looks confusing to me. I understand that only the blob that changes (APIC.its_off) with the fix should be temporarily ignored and, later, updated, as in your first series.
Cheers,
Gustavo
Quoted 46 lines
tests/qtest/bios-tables-test.c +1
-0@@ -2151,6 +2151,7 @@ static void test_acpi_aarch64_virt_tcg_its_off(void)test_data data = { .machine ="virt" , .arch ="aarch64" , + .variant =".its_off" , .tcg_only = true, .uefi_fl1 ="pc-bios/edk2-aarch64-code.fd" , .uefi_fl2 ="pc-bios/edk2-arm-vars.fd" ,tests/data/acpi/aarch64/virt/APIC.its_off new file binary +0
-0tests/data/acpi/aarch64/virt/FACP.its_off new file binary +0
-0tests/data/acpi/aarch64/virt/IORT.its_off new file binary +0
-0
Re: [PATCH-for-10.1 v3 6/9] qtest/bios-tables-test: Whitelist aarch64/virt 'its_off' variant blobs
Quoted 20 lines · On Fri, 4 Apr 2025 00:01:22 -0300 Gustavo Romero <[email protected]>…
Hi Phil,
Quoted 17 lines · Philippe Mathieu-Daudé
We are going to fix the
test_acpi_aarch64_virt_tcg_its_off()test. In preparation, copy the ACPI tables which will be altered as 'its_off' variants, and whitelist them.Reviewed-by Gustavo Romero <[email protected]>Signed-off-by Philippe Mathieu-Daudé <[email protected]>--- tests/qtest/bios-tables-test-allowed-diff.h | 3 +++ tests/qtest/bios-tables-test.c | 1 + tests/data/acpi/aarch64/virt/APIC.its_off | Bin 0 -> 184 bytes tests/data/acpi/aarch64/virt/FACP.its_off | Bin 0 -> 276 bytes tests/data/acpi/aarch64/virt/IORT.its_off | Bin 0 -> 236 bytes 5 files changed, 4 insertions(+)create mode 100644 tests/data/acpi/aarch64/virt/APIC.its_off create mode 100644 tests/data/acpi/aarch64/virt/FACP.its_off create mode 100644 tests/data/acpi/aarch64/virt/IORT.its_off
Quoted 15 lines
tests/qtest/bios-tables-test-allowed-diff.h line 4
Quoted 9 lines
tests/qtest/bios-tables-test-allowed-diff.h +3
-0@@ -1 +1,4 @@/* List of comma-separated changed AML files to ignore */ +"tests/data/acpi/aarch64/virt/APIC.its_off" , +"tests/data/acpi/aarch64/virt/FACP.its_off" , +"tests/data/acpi/aarch64/virt/IORT.its_off",I think your first approach is the correct one: you add the blobs
when adding the new test, so they would go into patch 5/9 in this series, making the test pass without adding anything tobios-tables-test-allowed-diff.h. Then in this patch only add the APIC.its_off table to thebios-tables-test-allowed-diff.hsince that's the table that changes when the fix is in place, as you did in:
if APIC.its_off is the only one that's changing, but FACP/IORT blobs are the same as suffix-less blobs, one can omit copying FACP/IORT as test harness will fallback to suffix-less blob if the one with suffix isn't found.
if blobs are different from defaults then create empty blobs and whitelist them in the same patch then do your changes and then update blobs & wipeout withe list.
Phil,
the process is described in doc comment at the top of tests/qtest/bios-tables-test.c
Quoted 58 lines
https://mail.gnu.org/archive/html/qemu-devel/2025-03/msg07082.html
Plus, adding the blobs, which are actually related to the test in the other patch, and ignoring them at the same time looks confusing to me. I understand that only the blob that changes (APIC.its_off) with the fix should be temporarily ignored and, later, updated, as in your first series.
Cheers,
GustavoQuoted 46 lines
tests/qtest/bios-tables-test.c +1
-0@@ -2151,6 +2151,7 @@ static void test_acpi_aarch64_virt_tcg_its_off(void)test_data data = { .machine ="virt" , .arch ="aarch64" , + .variant =".its_off" , .tcg_only = true, .uefi_fl1 ="pc-bios/edk2-aarch64-code.fd" , .uefi_fl2 ="pc-bios/edk2-arm-vars.fd" ,tests/data/acpi/aarch64/virt/APIC.its_off new file binary +0
-0tests/data/acpi/aarch64/virt/FACP.its_off new file binary +0
-0zcmZ>BbPf<<WME(uaq@Te2v%^42yj*a0-z8Bhz+8t3j|P&V`N}P6&N^PpsQ~v$aVnZ CVg~^L
literal 0
HcmV?d00001tests/data/acpi/aarch64/virt/IORT.its_off new file binary +0
-0zcmebD4+?q1z
(#9?&R<65v<@85#X!<1dKp25F11@1F-=RgMkDCNC*yK9F_<M77!bR zUBI%eoFED&4;F$FSwK1)h;xBB2Pym{{M%tVD>TjFfcO#g+N#Zh@s|zoCF3AP#UU@ R!2`+%Dg6Hr$N|zYvjDIZ5CH%Hliteral 0
HcmV?d00001
Re: [PATCH-for-10.1 v3 6/9] qtest/bios-tables-test: Whitelist aarch64/virt 'its_off' variant blobs
Hi Igor,
Quoted 39 lines · Igor Mammedov
Quoted 20 lines · On Fri, 4 Apr 2025 00:01:22 -0300 Gustavo Romero <[email protected]>…
Hi Phil,
Quoted 17 lines · Philippe Mathieu-Daudé
We are going to fix the
test_acpi_aarch64_virt_tcg_its_off()test. In preparation, copy the ACPI tables which will be altered as 'its_off' variants, and whitelist them.Reviewed-by Gustavo Romero <[email protected]>Signed-off-by Philippe Mathieu-Daudé <[email protected]>--- tests/qtest/bios-tables-test-allowed-diff.h | 3 +++ tests/qtest/bios-tables-test.c | 1 + tests/data/acpi/aarch64/virt/APIC.its_off | Bin 0 -> 184 bytes tests/data/acpi/aarch64/virt/FACP.its_off | Bin 0 -> 276 bytes tests/data/acpi/aarch64/virt/IORT.its_off | Bin 0 -> 236 bytes 5 files changed, 4 insertions(+)create mode 100644 tests/data/acpi/aarch64/virt/APIC.its_off create mode 100644 tests/data/acpi/aarch64/virt/FACP.its_off create mode 100644 tests/data/acpi/aarch64/virt/IORT.its_off
Quoted 15 lines
tests/qtest/bios-tables-test-allowed-diff.h line 4
Quoted 9 lines
tests/qtest/bios-tables-test-allowed-diff.h +3
-0@@ -1 +1,4 @@/* List of comma-separated changed AML files to ignore */ +"tests/data/acpi/aarch64/virt/APIC.its_off" , +"tests/data/acpi/aarch64/virt/FACP.its_off" , +"tests/data/acpi/aarch64/virt/IORT.its_off",I think your first approach is the correct one: you add the blobs
when adding the new test, so they would go into patch 5/9 in this series, making the test pass without adding anything tobios-tables-test-allowed-diff.h. Then in this patch only add the APIC.its_off table to thebios-tables-test-allowed-diff.hsince that's the table that changes when the fix is in place, as you did in:
Quoted 3 lines
if APIC.its_off is the only one that's changing, but FACP/IORT blobs are the same as suffix-less blobs, one can omit copying FACP/IORT as test harness will fallback to suffix-less blob if the one with suffix isn't found.
OK. Just clarifying and for the records, this is not the case for this series
Quoted 2 lines
if blobs are different from defaults then create empty blobs and whitelist them in the same patch then do your changes and then update blobs & wipeout withe list.
Thanks for confirming it. That's what I suggested to Phil in my first review and what I understood from the prescription in bios-tables-test.c.
However, on second thoughts, for this particular series, isn't it better to have the following commit sequence instead:
1) Add the new test and the new blobs that make the test pass, i.e. APIC.suffix, FACP.suffix, and IORT.suffix (they are different than the default suffix-less blobs)
2) Whitelist only the APIC.suffix since that's the table that will change with the fix
3) Add the fix (which changes the APIC table so a new APIC.suffix blob is needed and also stops generating the IORT table, so no more IORT.suffix blob is necessary)
4) Finally, update only the APIC.suffix blob and remove the IORT.suffix blob and wipe out the whitelist
This way:
A) It's clear that only ACPI blob changed with the fix, because there is no addition of a FACP.suffix blob in 4) (it remains the same)
B) It's clear that the IORT table is removed with the fix and is not relevant anymore for the test
What do you think?
Cheers,
Gustavo
Quoted 62 lines
Phil,
the process is described in doc comment at the top oftests/qtest/bios-tables-test.cQuoted 58 lines
https://mail.gnu.org/archive/html/qemu-devel/2025-03/msg07082.html
Plus, adding the blobs, which are actually related to the test in the other patch, and ignoring them at the same time looks confusing to me. I understand that only the blob that changes (APIC.its_off) with the fix should be temporarily ignored and, later, updated, as in your first series.
Cheers,
GustavoQuoted 46 lines
tests/qtest/bios-tables-test.c +1
-0@@ -2151,6 +2151,7 @@ static void test_acpi_aarch64_virt_tcg_its_off(void)test_data data = { .machine ="virt" , .arch ="aarch64" , + .variant =".its_off" , .tcg_only = true, .uefi_fl1 ="pc-bios/edk2-aarch64-code.fd" , .uefi_fl2 ="pc-bios/edk2-arm-vars.fd" ,tests/data/acpi/aarch64/virt/APIC.its_off new file binary +0
-0tests/data/acpi/aarch64/virt/FACP.its_off new file binary +0
-0tests/data/acpi/aarch64/virt/IORT.its_off new file binary +0
-0
Re: [PATCH-for-10.1 v3 6/9] qtest/bios-tables-test: Whitelist aarch64/virt 'its_off' variant blobs
Quoted 52 lines · On Wed, 9 Apr 2025 12:49:36 -0300 Gustavo Romero <[email protected]>…
Hi Igor,
Quoted 39 lines · Igor Mammedov
Quoted 20 lines · On Fri, 4 Apr 2025 00:01:22 -0300 Gustavo Romero <[email protected]>…
Hi Phil,
Quoted 17 lines · Philippe Mathieu-Daudé
We are going to fix the
test_acpi_aarch64_virt_tcg_its_off()test. In preparation, copy the ACPI tables which will be altered as 'its_off' variants, and whitelist them.Reviewed-by Gustavo Romero <[email protected]>Signed-off-by Philippe Mathieu-Daudé <[email protected]>--- tests/qtest/bios-tables-test-allowed-diff.h | 3 +++ tests/qtest/bios-tables-test.c | 1 + tests/data/acpi/aarch64/virt/APIC.its_off | Bin 0 -> 184 bytes tests/data/acpi/aarch64/virt/FACP.its_off | Bin 0 -> 276 bytes tests/data/acpi/aarch64/virt/IORT.its_off | Bin 0 -> 236 bytes 5 files changed, 4 insertions(+)create mode 100644 tests/data/acpi/aarch64/virt/APIC.its_off create mode 100644 tests/data/acpi/aarch64/virt/FACP.its_off create mode 100644 tests/data/acpi/aarch64/virt/IORT.its_off
Quoted 15 lines
tests/qtest/bios-tables-test-allowed-diff.h line 4
Quoted 9 lines
tests/qtest/bios-tables-test-allowed-diff.h +3
-0@@ -1 +1,4 @@/* List of comma-separated changed AML files to ignore */ +"tests/data/acpi/aarch64/virt/APIC.its_off" , +"tests/data/acpi/aarch64/virt/FACP.its_off" , +"tests/data/acpi/aarch64/virt/IORT.its_off",I think your first approach is the correct one: you add the blobs
when adding the new test, so they would go into patch 5/9 in this series, making the test pass without adding anything tobios-tables-test-allowed-diff.h. Then in this patch only add the APIC.its_off table to thebios-tables-test-allowed-diff.hsince that's the table that changes when the fix is in place, as you did in:Quoted 3 lines
if APIC.its_off is the only one that's changing, but FACP/IORT blobs are the same as suffix-less blobs, one can omit copying FACP/IORT as test harness will fallback to suffix-less blob if the one with suffix isn't found.
OK. Just clarifying and for the records, this is not the case for this series
Quoted 2 lines
if blobs are different from defaults then create empty blobs and whitelist them in the same patch then do your changes and then update blobs & wipeout withe list.
Quoted 6 lines
Thanks for confirming it. That's what I suggested to Phil in my first review and what I understood from the prescription in
bios-tables-test.c.However, on second thoughts, for this particular series, isn't it better to have the following commit sequence instead:
1) Add the new test and the new blobs that make the test pass, i.e. APIC.suffix, FACP.suffix, and IORT.suffix (they are different than the default suffix-less blobs)
blobs should be a separate commit (that way it's easier for maintainer to rebase them, if they clash during merge with some other change.
Quoted 8 lines
2) Whitelist only the APIC.suffix since that's the table that will change with the fix
3) Add the fix (which changes the APIC table so a new APIC.suffix blob is needed and also stops generating the IORT table, so no more IORT.suffix blob is necessary)
4) Finally, update only the APIC.suffix blob and remove the IORT.suffix blob and wipe out the whitelistThis way:
A) It's clear that only ACPI blob changed with the fix, because there is no addition of a FACP.suffix blob in 4) (it remains the same)
B) It's clear that the IORT table is removed with the fix and is not relevant anymore for the test
I'd just mention it in commit log so that later no one would wonder why we are adding and then removing tables
As for the rest of suggestions, it looks fine to me.
Quoted 70 lines
What do you think?
Cheers,
GustavoQuoted 62 lines
Phil,
the process is described in doc comment at the top oftests/qtest/bios-tables-test.cQuoted 58 lines
https://mail.gnu.org/archive/html/qemu-devel/2025-03/msg07082.html
Plus, adding the blobs, which are actually related to the test in the other patch, and ignoring them at the same time looks confusing to me. I understand that only the blob that changes (APIC.its_off) with the fix should be temporarily ignored and, later, updated, as in your first series.
Cheers,
GustavoQuoted 46 lines
tests/qtest/bios-tables-test.c +1
-0@@ -2151,6 +2151,7 @@ static void test_acpi_aarch64_virt_tcg_its_off(void)test_data data = { .machine ="virt" , .arch ="aarch64" , + .variant =".its_off" , .tcg_only = true, .uefi_fl1 ="pc-bios/edk2-aarch64-code.fd" , .uefi_fl2 ="pc-bios/edk2-arm-vars.fd" ,tests/data/acpi/aarch64/virt/APIC.its_off new file binary +0
-0tests/data/acpi/aarch64/virt/FACP.its_off new file binary +0
-0zcmZ>BbPf<<WME(uaq@Te2v%^42yj*a0-z8Bhz+8t3j|P&V`N}P6&N^PpsQ~v$aVnZ CVg~^L
literal 0
HcmV?d00001tests/data/acpi/aarch64/virt/IORT.its_off new file binary +0
-0zcmebD4+?q1z
(#9?&R<65v<@85#X!<1dKp25F11@1F-=RgMkDCNC*yK9F_<M77!bR zUBI%eoFED&4;F$FSwK1)h;xBB2Pym{{M%tVD>TjFfcO#g+N#Zh@s|zoCF3AP#UU@ R!2`+%Dg6Hr$N|zYvjDIZ5CH%Hliteral 0
HcmV?d00001
Re: [PATCH-for-10.1 v3 6/9] qtest/bios-tables-test: Whitelist aarch64/virt 'its_off' variant blobs
Hi Igor,
Quoted 58 lines · Igor Mammedov
Quoted 55 lines · On Wed, 9 Apr 2025 12:49:36 -0300 Gustavo Romero <[email protected]>…
Hi Igor,
Quoted 39 lines · Igor Mammedov
Quoted 20 lines · On Fri, 4 Apr 2025 00:01:22 -0300 Gustavo Romero <[email protected]>…
Hi Phil,
Quoted 17 lines · Philippe Mathieu-Daudé
We are going to fix the
test_acpi_aarch64_virt_tcg_its_off()test. In preparation, copy the ACPI tables which will be altered as 'its_off' variants, and whitelist them.Reviewed-by Gustavo Romero <[email protected]>Signed-off-by Philippe Mathieu-Daudé <[email protected]>--- tests/qtest/bios-tables-test-allowed-diff.h | 3 +++ tests/qtest/bios-tables-test.c | 1 + tests/data/acpi/aarch64/virt/APIC.its_off | Bin 0 -> 184 bytes tests/data/acpi/aarch64/virt/FACP.its_off | Bin 0 -> 276 bytes tests/data/acpi/aarch64/virt/IORT.its_off | Bin 0 -> 236 bytes 5 files changed, 4 insertions(+)create mode 100644 tests/data/acpi/aarch64/virt/APIC.its_off create mode 100644 tests/data/acpi/aarch64/virt/FACP.its_off create mode 100644 tests/data/acpi/aarch64/virt/IORT.its_off
Quoted 15 lines
tests/qtest/bios-tables-test-allowed-diff.h line 4
Quoted 9 lines
tests/qtest/bios-tables-test-allowed-diff.h +3
-0@@ -1 +1,4 @@/* List of comma-separated changed AML files to ignore */ +"tests/data/acpi/aarch64/virt/APIC.its_off" , +"tests/data/acpi/aarch64/virt/FACP.its_off" , +"tests/data/acpi/aarch64/virt/IORT.its_off",I think your first approach is the correct one: you add the blobs
when adding the new test, so they would go into patch 5/9 in this series, making the test pass without adding anything tobios-tables-test-allowed-diff.h. Then in this patch only add the APIC.its_off table to thebios-tables-test-allowed-diff.hsince that's the table that changes when the fix is in place, as you did in:Quoted 3 lines
if APIC.its_off is the only one that's changing, but FACP/IORT blobs are the same as suffix-less blobs, one can omit copying FACP/IORT as test harness will fallback to suffix-less blob if the one with suffix isn't found.
OK. Just clarifying and for the records, this is not the case for this series
Quoted 2 lines
if blobs are different from defaults then create empty blobs and whitelist them in the same patch then do your changes and then update blobs & wipeout withe list.
Thanks for confirming it. That's what I suggested to Phil in my first review and what I understood from the prescription in
bios-tables-test.c.
Quoted 6 lines
Quoted 3 lines
However, on second thoughts, for this particular series, isn't it better to have the following commit sequence instead:
1) Add the new test and the new blobs that make the test pass, i.e. APIC.suffix, FACP.suffix, and IORT.suffix (they are different than the default suffix-less blobs)
blobs should be a separate commit (that way it's easier for maintainer to rebase them, if they clash during merge with some other change.
I see. What is a bit confusing here is that the series consists in
one blob addition act (for the new test) and one blob update/removal act (after the fix).
Quoted 4 lines
Quoted 4 lines
2) Whitelist only the APIC.suffix since that's the table that will change with the fix
3) Add the fix (which changes the APIC table so a new APIC.suffix blob is needed and also stops generating the IORT table, so no more IORT.suffix blob is necessary)
4) Finally, update only the APIC.suffix blob and remove the IORT.suffix blob and wipe out the whitelist
Quoted 8 lines
Quoted 4 lines
This way:
A) It's clear that only ACPI blob changed with the fix, because there is no addition of a FACP.suffix blob in 4) (it remains the same)
B) It's clear that the IORT table is removed with the fix and is not relevant anymore for the testI'd just mention it in commit log so that later no one would wonder why we are adding and then removing tables
As for the rest of suggestions, it looks fine to me.
Well, 2) won't make sense anymore since APIC.suffix would be already in the whitelist in the previous patch that added the empty blobs. Since there won't be a commit that adds _only_ the APIC.suffix to the whitelist, in preparation for the fix, this info is "lost" in the series, even tho it's possible to mention in the commit message.
Hence, what I think is not ideal from a maintainer's/reviewer's perspective, is that in one commit all the blobs are updated/removed at once, which is confusing because the fix did not touch the FACP table (for instance) and this table is updated with APIC and with the removal of IORT, altogether, in the last commit.
So, for this series, which adds new blobs and _also_ updates and removes some of them, how about the following organization:
- Patch 1 : Add the new test, add the empty blobs *.suffix files, whitelist such a blobs
- Patch 2 : Update the blobs in Patch 1 with the ones that make the new test pass and remove them from the whitelist
- Patch 3 : Add the APIC.suffix blob to the whitelist (the table that changes due to the fix)
- Patch 4 - n : Fix(es)
- Patch (n+1) : Update the APIC.suffix blob, remove IORT.suffix blob, and remove the APIC.suffix blob from the whitelist
* Add the APIC diff to the commit log
* Mention in the commit log that IORT.suffix is removed because IORT table is no long generated after the fix
This way: a) no commit fails the test and b) blobs are added/updated/removed in separate commits
What do you think?
Cheers,
Gustavo
Re: [PATCH-for-10.1 v3 6/9] qtest/bios-tables-test: Whitelist aarch64/virt 'its_off' variant blobs
Hi Igor and Michael,
Quoted 108 lines · Gustavo Romero
Hi Igor,
Quoted 57 lines · Igor Mammedov
Quoted 54 lines · On Wed, 9 Apr 2025 12:49:36 -0300 Gustavo Romero <[email protected]>…
Hi Igor,
Quoted 38 lines · Igor Mammedov
Quoted 20 lines · On Fri, 4 Apr 2025 00:01:22 -0300 Gustavo Romero <[email protected]>…
Hi Phil,
Quoted 17 lines · Philippe Mathieu-Daudé
We are going to fix the
test_acpi_aarch64_virt_tcg_its_off()test. In preparation, copy the ACPI tables which will be altered as 'its_off' variants, and whitelist them.Reviewed-by Gustavo Romero <[email protected]>Signed-off-by Philippe Mathieu-Daudé <[email protected]>---
tests/qtest/bios-tables-test-allowed-diff.h| 3 +++ tests/qtest/bios-tables-test.c | 1 +tests/data/acpi/aarch64/virt/APIC.its_off | Bin 0 -> 184 bytes tests/data/acpi/aarch64/virt/FACP.its_off | Bin 0 -> 276 bytes tests/data/acpi/aarch64/virt/IORT.its_off | Bin 0 -> 236 bytes 5 files changed, 4 insertions(+)create mode 100644 tests/data/acpi/aarch64/virt/APIC.its_off create mode 100644 tests/data/acpi/aarch64/virt/FACP.its_off create mode 100644 tests/data/acpi/aarch64/virt/IORT.its_off
Quoted 15 lines
tests/qtest/bios-tables-test-allowed-diff.h line 4
Quoted 9 lines
tests/qtest/bios-tables-test-allowed-diff.h +3
-0@@ -1 +1,4 @@ /* List of comma-separated changed AML files to ignore */ +"tests/data/acpi/aarch64/virt/APIC.its_off" , +"tests/data/acpi/aarch64/virt/FACP.its_off" , +"tests/data/acpi/aarch64/virt/IORT.its_off",I think your first approach is the correct one: you add the blobs
when adding the new test, so they would go into patch 5/9 in this series, making the test pass without adding anything tobios-tables-test-allowed-diff.h. Then in this patch only add the APIC.its_off table to thebios-tables-test-allowed-diff.hsince that's the table that changes when the fix is in place, as you did in:Quoted 3 lines
if APIC.its_off is the only one that's changing, but FACP/IORT blobs are the same as suffix-less blobs, one can omit copying FACP/IORT as test harness will fallback to suffix-less blob if the one with suffix isn't found.
OK. Just clarifying and for the records, this is not the case for this series
Quoted 2 lines
if blobs are different from defaults then create empty blobs and whitelist them in the same patch then do your changes and then update blobs & wipeout withe list.
Thanks for confirming it. That's what I suggested to Phil in my first review and what I understood from the prescription in
bios-tables-test.c.Quoted 6 lines
Quoted 3 lines
However, on second thoughts, for this particular series, isn't it better to have the following commit sequence instead:
1) Add the new test and the new blobs that make the test pass, i.e. APIC.suffix, FACP.suffix, and IORT.suffix (they are different than the default suffix-less blobs)
blobs should be a separate commit (that way it's easier for maintainer to rebase them, if they clash during merge with some other change.
I see. What is a bit confusing here is that the series consists in
one blob addition act (for the new test) and one blob update/removal act (after the fix).Quoted 4 lines
Quoted 4 lines
2) Whitelist only the APIC.suffix since that's the table that will change with the fix
3) Add the fix (which changes the APIC table so a new APIC.suffix blob is needed and also stops generating the IORT table, so no more IORT.suffix blob is necessary)
4) Finally, update only the APIC.suffix blob and remove the IORT.suffix blob and wipe out the whitelistQuoted 8 lines
Quoted 4 lines
This way:
A) It's clear that only ACPI blob changed with the fix, because there is no addition of a FACP.suffix blob in 4) (it remains the same)
B) It's clear that the IORT table is removed with the fix and is not relevant anymore for the testI'd just mention it in commit log so that later no one would wonder why we are adding and then removing tables
As for the rest of suggestions, it looks fine to me.
Well, 2) won't make sense anymore since APIC.suffix would be already in the whitelist in the previous patch that added the empty blobs. Since there won't be a commit that adds _only_ the APIC.suffix to the whitelist, in preparation for the fix, this info is "lost" in the series, even tho it's possible to mention in the commit message.
Hence, what I think is not ideal from a maintainer's/reviewer's perspective, is that in one commit all the blobs are updated/removed at once, which is confusing because the fix did not touch the FACP table (for instance) and this table is updated with APIC and with the removal of IORT, altogether, in the last commit.
So, for this series, which adds new blobs and _also_ updates and removes some of them, how about the following organization:
- Patch 1 : Add the new test, add the empty blobs *.suffix files, whitelist such a blobs
- Patch 2 : Update the blobs in Patch 1 with the ones that make the new test pass and remove them from the whitelist- Patch 3 : Add the APIC.suffix blob to the whitelist (the table that changes due to the fix)
- Patch 4 - n : Fix(es)
- Patch (n+1) : Update the APIC.suffix blob, remove IORT.suffix blob, and remove the APIC.suffix blob from the whitelist
* Add the APIC diff to the commit log
* Mention in the commit log that IORT.suffix is removed because IORT table is no long generated after the fix
Quoted 3 lines
This way: a) no commit fails the test and b) blobs are added/updated/removed in separate commits
What do you think?
I’d really appreciate it if you could confirm whether this organization makes sense.
Cheers,
Gustavo
Re: [PATCH-for-10.1 v3 6/9] qtest/bios-tables-test: Whitelist aarch64/virt 'its_off' variant blobs
Quoted 113 lines · Gustavo Romero
Hi Igor and Michael,
Quoted 110 lines · Gustavo Romero
Hi Igor,
Quoted 57 lines · Igor Mammedov
Quoted 54 lines · On Wed, 9 Apr 2025 12:49:36 -0300 Gustavo Romero <[email protected]>…
Hi Igor,
Quoted 38 lines · Igor Mammedov
Quoted 20 lines · On Fri, 4 Apr 2025 00:01:22 -0300 Gustavo Romero <[email protected]>…
Hi Phil,
Quoted 17 lines · Philippe Mathieu-Daudé
We are going to fix the
test_acpi_aarch64_virt_tcg_its_off()test. In preparation, copy the ACPI tables which will be altered as 'its_off' variants, and whitelist them.Reviewed-by Gustavo Romero <[email protected]>Signed-off-by Philippe Mathieu-Daudé <[email protected]>---
tests/qtest/bios-tables-test-allowed-diff.h| 3 +++ tests/qtest/bios-tables-test.c | 1 +tests/data/acpi/aarch64/virt/APIC.its_off | Bin 0 -> 184 bytes tests/data/acpi/aarch64/virt/FACP.its_off | Bin 0 -> 276 bytes tests/data/acpi/aarch64/virt/IORT.its_off | Bin 0 -> 236 bytes 5 files changed, 4 insertions(+)create mode 100644 tests/data/acpi/aarch64/virt/APIC.its_off create mode 100644 tests/data/acpi/aarch64/virt/FACP.its_off create mode 100644 tests/data/acpi/aarch64/virt/IORT.its_off
Quoted 15 lines
tests/qtest/bios-tables-test-allowed-diff.h line 4
Quoted 9 lines
tests/qtest/bios-tables-test-allowed-diff.h +3
-0@@ -1 +1,4 @@ /* List of comma-separated changed AML files to ignore */ +"tests/data/acpi/aarch64/virt/APIC.its_off" , +"tests/data/acpi/aarch64/virt/FACP.its_off" , +"tests/data/acpi/aarch64/virt/IORT.its_off",I think your first approach is the correct one: you add the blobs
when adding the new test, so they would go into patch 5/9 in this series, making the test pass without adding anything tobios-tables-test-allowed-diff.h. Then in this patch only add the APIC.its_off table to thebios-tables-test-allowed-diff.hsince that's the table that changes when the fix is in place, as you did in:Quoted 3 lines
if APIC.its_off is the only one that's changing, but FACP/IORT blobs are the same as suffix-less blobs, one can omit copying FACP/IORT as test harness will fallback to suffix-less blob if the one with suffix isn't found.
OK. Just clarifying and for the records, this is not the case for this series
Quoted 2 lines
if blobs are different from defaults then create empty blobs and whitelist them in the same patch then do your changes and then update blobs & wipeout withe list.
Thanks for confirming it. That's what I suggested to Phil in my first review and what I understood from the prescription in
bios-tables-test.c.Quoted 6 lines
Quoted 3 lines
However, on second thoughts, for this particular series, isn't it better to have the following commit sequence instead:
1) Add the new test and the new blobs that make the test pass, i.e. APIC.suffix, FACP.suffix, and IORT.suffix (they are different than the default suffix-less blobs)
blobs should be a separate commit (that way it's easier for maintainer to rebase them, if they clash during merge with some other change.
I see. What is a bit confusing here is that the series consists in
one blob addition act (for the new test) and one blob update/removal act (after the fix).Quoted 4 lines
Quoted 4 lines
2) Whitelist only the APIC.suffix since that's the table that will change with the fix
3) Add the fix (which changes the APIC table so a new APIC.suffix blob is needed and also stops generating the IORT table, so no more IORT.suffix blob is necessary)
4) Finally, update only the APIC.suffix blob and remove the IORT.suffix blob and wipe out the whitelistQuoted 8 lines
Quoted 4 lines
This way:
A) It's clear that only ACPI blob changed with the fix, because there is no addition of a FACP.suffix blob in 4) (it remains the same)
B) It's clear that the IORT table is removed with the fix and is not relevant anymore for the testI'd just mention it in commit log so that later no one would wonder why we are adding and then removing tables
As for the rest of suggestions, it looks fine to me.
Well, 2) won't make sense anymore since APIC.suffix would be already in the whitelist in the previous patch that added the empty blobs. Since there won't be a commit that adds _only_ the APIC.suffix to the whitelist, in preparation for the fix, this info is "lost" in the series, even tho it's possible to mention in the commit message.
Hence, what I think is not ideal from a maintainer's/reviewer's perspective, is that in one commit all the blobs are updated/removed at once, which is confusing because the fix did not touch the FACP table (for instance) and this table is updated with APIC and with the removal of IORT, altogether, in the last commit.
So, for this series, which adds new blobs and _also_ updates and removes some of them, how about the following organization:
- Patch 1 : Add the new test, add the empty blobs *.suffix files, whitelist such a blobs
- Patch 2 : Update the blobs in Patch 1 with the ones that make the new test pass and remove them from the whitelist- Patch 3 : Add the APIC.suffix blob to the whitelist (the table that changes due to the fix)
- Patch 4 - n : Fix(es)
- Patch (n+1) : Update the APIC.suffix blob, remove IORT.suffix blob, and remove the APIC.suffix blob from the whitelist
* Add the APIC diff to the commit log
* Mention in the commit log that IORT.suffix is removed because IORT table is no long generated after the fixThis way: a) no commit fails the test and b) blobs are added/updated/removed in separate commits
Quoted 7 lines
Quoted 1 line
What do you think?
I’d really appreciate it if you could confirm whether this organization makes sense.
Cheers,
Gustavo
looks ok. Igor?
Re: [PATCH-for-10.1 v3 6/9] qtest/bios-tables-test: Whitelist aarch64/virt 'its_off' variant blobs
In reply to Gustavo RomeroQuoted 97 lines · On Thu, 10 Apr 2025 13:22:06 -0300 Gustavo Romero <[email protected]>…
Hi Igor,
Quoted 58 lines · Igor Mammedov
Quoted 55 lines · On Wed, 9 Apr 2025 12:49:36 -0300 Gustavo Romero <[email protected]>…
Hi Igor,
Quoted 39 lines · Igor Mammedov
Quoted 20 lines · On Fri, 4 Apr 2025 00:01:22 -0300 Gustavo Romero <[email protected]>…
Hi Phil,
Quoted 17 lines · Philippe Mathieu-Daudé
We are going to fix the
test_acpi_aarch64_virt_tcg_its_off()test. In preparation, copy the ACPI tables which will be altered as 'its_off' variants, and whitelist them.Reviewed-by Gustavo Romero <[email protected]>Signed-off-by Philippe Mathieu-Daudé <[email protected]>--- tests/qtest/bios-tables-test-allowed-diff.h | 3 +++ tests/qtest/bios-tables-test.c | 1 + tests/data/acpi/aarch64/virt/APIC.its_off | Bin 0 -> 184 bytes tests/data/acpi/aarch64/virt/FACP.its_off | Bin 0 -> 276 bytes tests/data/acpi/aarch64/virt/IORT.its_off | Bin 0 -> 236 bytes 5 files changed, 4 insertions(+)create mode 100644 tests/data/acpi/aarch64/virt/APIC.its_off create mode 100644 tests/data/acpi/aarch64/virt/FACP.its_off create mode 100644 tests/data/acpi/aarch64/virt/IORT.its_off
Quoted 15 lines
tests/qtest/bios-tables-test-allowed-diff.h line 4
Quoted 9 lines
tests/qtest/bios-tables-test-allowed-diff.h +3
-0@@ -1 +1,4 @@/* List of comma-separated changed AML files to ignore */ +"tests/data/acpi/aarch64/virt/APIC.its_off" , +"tests/data/acpi/aarch64/virt/FACP.its_off" , +"tests/data/acpi/aarch64/virt/IORT.its_off",I think your first approach is the correct one: you add the blobs
when adding the new test, so they would go into patch 5/9 in this series, making the test pass without adding anything tobios-tables-test-allowed-diff.h. Then in this patch only add the APIC.its_off table to thebios-tables-test-allowed-diff.hsince that's the table that changes when the fix is in place, as you did in:Quoted 3 lines
if APIC.its_off is the only one that's changing, but FACP/IORT blobs are the same as suffix-less blobs, one can omit copying FACP/IORT as test harness will fallback to suffix-less blob if the one with suffix isn't found.
OK. Just clarifying and for the records, this is not the case for this series
Quoted 2 lines
if blobs are different from defaults then create empty blobs and whitelist them in the same patch then do your changes and then update blobs & wipeout withe list.
Thanks for confirming it. That's what I suggested to Phil in my first review and what I understood from the prescription in
bios-tables-test.c.Quoted 6 lines
Quoted 3 lines
However, on second thoughts, for this particular series, isn't it better to have the following commit sequence instead:
1) Add the new test and the new blobs that make the test pass, i.e. APIC.suffix, FACP.suffix, and IORT.suffix (they are different than the default suffix-less blobs)
blobs should be a separate commit (that way it's easier for maintainer to rebase them, if they clash during merge with some other change.
I see. What is a bit confusing here is that the series consists in
one blob addition act (for the new test) and one blob update/removal act (after the fix).Quoted 4 lines
Quoted 4 lines
2) Whitelist only the APIC.suffix since that's the table that will change with the fix
3) Add the fix (which changes the APIC table so a new APIC.suffix blob is needed and also stops generating the IORT table, so no more IORT.suffix blob is necessary)
4) Finally, update only the APIC.suffix blob and remove the IORT.suffix blob and wipe out the whitelistQuoted 8 lines
Quoted 4 lines
This way:
A) It's clear that only ACPI blob changed with the fix, because there is no addition of a FACP.suffix blob in 4) (it remains the same)
B) It's clear that the IORT table is removed with the fix and is not relevant anymore for the testI'd just mention it in commit log so that later no one would wonder why we are adding and then removing tables
As for the rest of suggestions, it looks fine to me.
Well, 2) won't make sense anymore since APIC.suffix would be already in the whitelist in the previous patch that added the empty blobs. Since there won't be a commit that adds _only_ the APIC.suffix to the whitelist, in preparation for the fix, this info is "lost" in the series, even tho it's possible to mention in the commit message.
Hence, what I think is not ideal from a maintainer's/reviewer's perspective, is that in one commit all the blobs are updated/removed at once, which is confusing because the fix did not touch the FACP table (for instance) and this table is updated with APIC and with the removal of IORT, altogether, in the last commit.
Quoted 8 lines
So, for this series, which adds new blobs and _also_ updates and removes some of them, how about the following organization:
- Patch 1 : Add the new test, add the empty blobs *.suffix files, whitelist such a blobs
- Patch 2 : Update the blobs in Patch 1 with the ones that make the new test pass and remove them from the whitelist- Patch 3 : Add the APIC.suffix blob to the whitelist (the table that changes due to the fix)
- Patch 4 - n : Fix(es)
3 is not bynanry so it can be folded into 4 or be a separate patch (either way works for me)
Quoted 7 lines
- Patch (n+1) : Update the APIC.suffix blob, remove IORT.suffix blob, and remove the APIC.suffix blob from the whitelist
* Add the APIC diff to the commit log
* Mention in the commit log that IORT.suffix is removed because IORT table is no long generated after the fixThis way: a) no commit fails the test and b) blobs are added/updated/removed in separate commits
What do you think?
LGTM
Quoted 4 lines
Cheers,
Gustavo
PATCH v3 7/9 hw/arm/virt-acpi: Always build IORT table (even with GIC ITS disabled)
In reply to Philippe Mathieu-DaudéCiting Gustavo [*]:
Gating IORT table generation entirely based on the presence of ITS looks wrong because IORT table has data beyond GIC ITS, like for SMMUv3 etc..
[*] https://lore.kernel.org/qemu-devel/[email protected]/
--- hw/arm/virt-acpi-build.c | 38 +++++++++++++++++++++----------------- 1 file changed, 21 insertions(+), 17 deletions(-)
hw/arm/virt-acpi-build.c +21 -17
@@ -287,6 +287,7 @@ build_iort(GArray *table_data, BIOSLinker *linker, VirtMachineState *vms)uint32_t id =0 ;GArray *smmu_idmaps =g_array_new (false, true,sizeof (AcpiIortIdMapping));GArray *its_idmaps =g_array_new (false, true,sizeof (AcpiIortIdMapping)); +bool has_its =its_enabled (vms);AcpiTable table = { .sig ="IORT" , .rev =3 , .oem_id = vms->oem_id, .oem_table_id = vms->oem_table_id };
@@ -325,9 +326,12 @@ build_iort(GArray *table_data, BIOSLinker *linker, VirtMachineState *vms) nb_nodes =3 ;/* RC, ITS, SMMUv3 */ rc_mapping_count = smmu_idmaps->len + its_idmaps->len; - }else { + }else if (has_its) { nb_nodes =2 ;/* RC, ITS */ rc_mapping_count =1 ; + }else { + nb_nodes =1 ;/* RC */ + rc_mapping_count =1 ; }/* Number of IORT Nodes */ build_append_int_noprefix (table_data, nb_nodes,4 );
@@ -336,17 +340,19 @@ build_iort(GArray *table_data, BIOSLinker *linker, VirtMachineState *vms)build_append_int_noprefix (table_data,IORT_NODE_OFFSET ,4 );build_append_int_noprefix (table_data,0 ,4 );/* Reserved */ -/* Table 12 ITS Group Format */ -build_append_int_noprefix (table_data,0 /* ITS Group */ ,1 );/* Type */ - node_size =20 /* fixed header size */ +4 /* 1 GIC ITS Identifier */ ; -build_append_int_noprefix (table_data, node_size,2 );/* Length */ -build_append_int_noprefix (table_data,1 ,1 );/* Revision */ -build_append_int_noprefix (table_data, id++,4 );/* Identifier */ -build_append_int_noprefix (table_data,0 ,4 );/* Number of ID mappings */ -build_append_int_noprefix (table_data,0 ,4 );/* Reference to ID Array */ -build_append_int_noprefix (table_data,1 ,4 );/* Number of ITSs */ -/* GIC ITS Identifier Array */ -build_append_int_noprefix (table_data,0 /* MADT translation_id */ ,4 ); +if (has_its) { +/* Table 12 ITS Group Format */ +build_append_int_noprefix (table_data,0 /* ITS Group */ ,1 );/* Type */ // + node_size =20 /* fixed header size */ +4 /* 1 GIC ITS Identifier */ ; +build_append_int_noprefix (table_data, node_size,2 );/* Length */ +build_append_int_noprefix (table_data,1 ,1 );/* Revision */ +build_append_int_noprefix (table_data, id++,4 );/* Identifier */ +build_append_int_noprefix (table_data,0 ,4 );/* Number of ID mappings */ +build_append_int_noprefix (table_data,0 ,4 );/* Reference to ID Array */ +build_append_int_noprefix (table_data,1 ,4 );/* Number of ITSs */ +/* GIC ITS Identifier Array */ +build_append_int_noprefix (table_data,0 /* MADT translation_id */ ,4 ); + }if (vms->iommu ==VIRT_IOMMU_SMMUV3 ) {int irq = vms->irqmap[VIRT_SMMU ] +ARM_SPI_BASE ;
@@ -429,7 +435,7 @@ build_iort(GArray *table_data, BIOSLinker *linker, VirtMachineState *vms)build_iort_id_mapping (table_data, range->input_base, range->id_count,IORT_NODE_OFFSET ); } - }else { + }else if (has_its) {/* output IORT node is the ITS group node (the first node) */ build_iort_id_mapping (table_data,0 ,0x10000 ,IORT_NODE_OFFSET ); }
@@ -979,10 +985,8 @@ void virt_acpi_build(VirtMachineState *vms, AcpiBuildTables *tables) vms->oem_table_id); } -if (its_enabled (vms)) { -acpi_add_table (table_offsets, tables_blob); -build_iort (tables_blob, tables->linker, vms); - } +acpi_add_table (table_offsets, tables_blob); +build_iort (tables_blob, tables->linker, vms);#ifdef CONFIG_TPM if (tpm_get_version (tpm_find ()) ==TPM_VERSION_2_0 ) {
Signature · 1 line
2.47.1
Re: [PATCH-for-10.1 v3 7/9] hw/arm/virt-acpi: Always build IORT table (even with GIC ITS disabled)
Hi Phil,
Quoted 10 lines · Philippe Mathieu-Daudé
Citing Gustavo [*]:
Gating IORT table generation entirely based on the presence of ITS looks wrong because IORT table has data beyond GIC ITS, like for SMMUv3 etc..
[*] https://lore.kernel.org/qemu-devel/[email protected]/
Reported-by Gustavo Romero <[email protected]>Signed-off-by Philippe Mathieu-Daudé <[email protected]>
Maybe it's worth to cite the "IO Remapping Table Platform Design Document", in particular page 10, which reads:
"the IORT provides an ACPI description for IO topology, SMMUs, and GIC ITSs"
https://developer.arm.com/documentation/den0049/latest/
Now that the target is 10.1, let me thing a bit more about it.
Cheers,
Gustavo
Quoted 83 lines
--- hw/arm/virt-acpi-build.c | 38 +++++++++++++++++++++----------------- 1 file changed, 21 insertions(+), 17 deletions(-)hw/arm/virt-acpi-build.c +21
-17@@ -287,6 +287,7 @@ build_iort(GArray *table_data, BIOSLinker *linker, VirtMachineState *vms)uint32_t id =0 ;GArray *smmu_idmaps =g_array_new (false, true,sizeof (AcpiIortIdMapping));GArray *its_idmaps =g_array_new (false, true,sizeof (AcpiIortIdMapping)); +bool has_its =its_enabled (vms);AcpiTable table = { .sig ="IORT" , .rev =3 , .oem_id = vms->oem_id, .oem_table_id = vms->oem_table_id };@@ -325,9 +326,12 @@ build_iort(GArray *table_data, BIOSLinker *linker, VirtMachineState *vms) nb_nodes =3 ;/* RC, ITS, SMMUv3 */ rc_mapping_count = smmu_idmaps->len + its_idmaps->len; - }else { + }else if (has_its) { nb_nodes =2 ;/* RC, ITS */ rc_mapping_count =1 ; + }else { + nb_nodes =1 ;/* RC */ + rc_mapping_count =1 ; }/* Number of IORT Nodes */ build_append_int_noprefix (table_data, nb_nodes,4 );@@ -336,17 +340,19 @@ build_iort(GArray *table_data, BIOSLinker *linker, VirtMachineState *vms)build_append_int_noprefix (table_data,IORT_NODE_OFFSET ,4 );build_append_int_noprefix (table_data,0 ,4 );/* Reserved */ -/* Table 12 ITS Group Format */ -build_append_int_noprefix (table_data,0 /* ITS Group */ ,1 );/* Type */ - node_size =20 /* fixed header size */ +4 /* 1 GIC ITS Identifier */ ; -build_append_int_noprefix (table_data, node_size,2 );/* Length */ -build_append_int_noprefix (table_data,1 ,1 );/* Revision */ -build_append_int_noprefix (table_data, id++,4 );/* Identifier */ -build_append_int_noprefix (table_data,0 ,4 );/* Number of ID mappings */ -build_append_int_noprefix (table_data,0 ,4 );/* Reference to ID Array */ -build_append_int_noprefix (table_data,1 ,4 );/* Number of ITSs */ -/* GIC ITS Identifier Array */ -build_append_int_noprefix (table_data,0 /* MADT translation_id */ ,4 ); +if (has_its) { +/* Table 12 ITS Group Format */ +build_append_int_noprefix (table_data,0 /* ITS Group */ ,1 );/* Type */ // + node_size =20 /* fixed header size */ +4 /* 1 GIC ITS Identifier */ ; +build_append_int_noprefix (table_data, node_size,2 );/* Length */ +build_append_int_noprefix (table_data,1 ,1 );/* Revision */ +build_append_int_noprefix (table_data, id++,4 );/* Identifier */ +build_append_int_noprefix (table_data,0 ,4 );/* Number of ID mappings */ +build_append_int_noprefix (table_data,0 ,4 );/* Reference to ID Array */ +build_append_int_noprefix (table_data,1 ,4 );/* Number of ITSs */ +/* GIC ITS Identifier Array */ +build_append_int_noprefix (table_data,0 /* MADT translation_id */ ,4 ); + }if (vms->iommu ==VIRT_IOMMU_SMMUV3 ) {int irq = vms->irqmap[VIRT_SMMU ] +ARM_SPI_BASE ;@@ -429,7 +435,7 @@ build_iort(GArray *table_data, BIOSLinker *linker, VirtMachineState *vms)build_iort_id_mapping (table_data, range->input_base, range->id_count,IORT_NODE_OFFSET ); } - }else { + }else if (has_its) {/* output IORT node is the ITS group node (the first node) */ build_iort_id_mapping (table_data,0 ,0x10000 ,IORT_NODE_OFFSET ); }@@ -979,10 +985,8 @@ void virt_acpi_build(VirtMachineState *vms, AcpiBuildTables *tables) vms->oem_table_id); } -if (its_enabled (vms)) { -acpi_add_table (table_offsets, tables_blob); -build_iort (tables_blob, tables->linker, vms); - } +acpi_add_table (table_offsets, tables_blob); +build_iort (tables_blob, tables->linker, vms);#ifdef CONFIG_TPM if (tpm_get_version (tpm_find ()) ==TPM_VERSION_2_0 ) {
Re: [PATCH-for-10.1 v3 7/9] hw/arm/virt-acpi: Always build IORT table (even with GIC ITS disabled)
In reply to Philippe Mathieu-DaudéHi Philippe,
Quoted 57 lines · Philippe Mathieu-Daudé
Citing Gustavo [*]:
Gating IORT table generation entirely based on the presence
of ITS looks wrong because IORT table has data beyond GIC ITS,
like for SMMUv3 etc..
[*] https://lore.kernel.org/qemu-devel/[email protected]/Reported-by Gustavo Romero <[email protected]>Signed-off-by Philippe Mathieu-Daudé <[email protected]>--- hw/arm/virt-acpi-build.c | 38 +++++++++++++++++++++----------------- 1 file changed, 21 insertions(+), 17 deletions(-)hw/arm/virt-acpi-build.c +8
-12@@ -287,6 +287,7 @@ build_iort(GArray *table_data, BIOSLinker *linker, VirtMachineState *vms)uint32_t id =0 ;GArray *smmu_idmaps =g_array_new (false, true,sizeof (AcpiIortIdMapping));GArray *its_idmaps =g_array_new (false, true,sizeof (AcpiIortIdMapping)); +bool has_its =its_enabled (vms);AcpiTable table = { .sig ="IORT" , .rev =3 , .oem_id = vms->oem_id, .oem_table_id = vms->oem_table_id };@@ -325,9 +326,12 @@ build_iort(GArray *table_data, BIOSLinker *linker, VirtMachineState *vms) nb_nodes =3 ;/* RC, ITS, SMMUv3 */ rc_mapping_count = smmu_idmaps->len + its_idmaps->len; - }else { + }else if (has_its) { nb_nodes =2 ;/* RC, ITS */ rc_mapping_count =1 ; + }else { + nb_nodes =1 ;/* RC */ + rc_mapping_count =1 ; }/* Number of IORT Nodes */ build_append_int_noprefix (table_data, nb_nodes,4 );@@ -336,17 +340,19 @@ build_iort(GArray *table_data, BIOSLinker *linker, VirtMachineState *vms)build_append_int_noprefix (table_data,IORT_NODE_OFFSET ,4 );build_append_int_noprefix (table_data,0 ,4 );/* Reserved */ -/* Table 12 ITS Group Format */ -build_append_int_noprefix (table_data,0 /* ITS Group */ ,1 );/* Type */ - node_size =20 /* fixed header size */ +4 /* 1 GIC ITS Identifier */ ; -build_append_int_noprefix (table_data, node_size,2 );/* Length */ -build_append_int_noprefix (table_data,1 ,1 );/* Revision */ -build_append_int_noprefix (table_data, id++,4 );/* Identifier */ -build_append_int_noprefix (table_data,0 ,4 );/* Number of ID mappings */ -build_append_int_noprefix (table_data,0 ,4 );/* Reference to ID Array */ -build_append_int_noprefix (table_data,1 ,4 );/* Number of ITSs */ -/* GIC ITS Identifier Array */ -build_append_int_noprefix (table_data,0 /* MADT translation_id */ ,4 ); +if (has_its) { +/* Table 12 ITS Group Format */ +build_append_int_noprefix (table_data,0 /* ITS Group */ ,1 );/* Type */ //
hw/arm/virt-acpi-build.c build_iort(GArray *table_data, BIOSLinker *linker, VirtMachineState *vms) · line 355
Quoted 10 lines
hw/arm/virt-acpi-build.c +10
-0+ node_size =20 /* fixed header size */ +4 /* 1 GIC ITS Identifier */ ; +build_append_int_noprefix (table_data, node_size,2 );/* Length */ +build_append_int_noprefix (table_data,1 ,1 );/* Revision */ +build_append_int_noprefix (table_data, id++,4 );/* Identifier */ +build_append_int_noprefix (table_data,0 ,4 );/* Number of ID mappings */ +build_append_int_noprefix (table_data,0 ,4 );/* Reference to ID Array */ +build_append_int_noprefix (table_data,1 ,4 );/* Number of ITSs */ +/* GIC ITS Identifier Array */ +build_append_int_noprefix (table_data,0 /* MADT translation_id */ ,4 ); + }
Do we allow configs where we have SMMU and no ITS?
The IORT spec says "
ID mappings that are defined in an SMMU IORT node can only have an ITS Group node as an output reference,
or no IDs in the case of a system that does not have ITS units. All other object types are explicitly forbidden.
"
So in case we do not have any ITS we also need to take care of ID mappings of SMMUs
Eric
Quoted 25 lines
hw/arm/virt-acpi-build.c +3
-5if (vms->iommu ==VIRT_IOMMU_SMMUV3 ) {int irq = vms->irqmap[VIRT_SMMU ] +ARM_SPI_BASE ;@@ -429,7 +435,7 @@ build_iort(GArray *table_data, BIOSLinker *linker, VirtMachineState *vms)build_iort_id_mapping (table_data, range->input_base, range->id_count,IORT_NODE_OFFSET ); } - }else { + }else if (has_its) {/* output IORT node is the ITS group node (the first node) */ build_iort_id_mapping (table_data,0 ,0x10000 ,IORT_NODE_OFFSET ); }@@ -979,10 +985,8 @@ void virt_acpi_build(VirtMachineState *vms, AcpiBuildTables *tables) vms->oem_table_id); } -if (its_enabled (vms)) { -acpi_add_table (table_offsets, tables_blob); -build_iort (tables_blob, tables->linker, vms); - } +acpi_add_table (table_offsets, tables_blob); +build_iort (tables_blob, tables->linker, vms);#ifdef CONFIG_TPM if (tpm_get_version (tpm_find ()) ==TPM_VERSION_2_0 ) {
PATCH v3 8/9 hw/arm/virt-acpi: Do not advertise disabled GIC ITS
In reply to Philippe Mathieu-DaudéGIC ITS can be disabled at runtime using '-M its=off', which sets VirtMachineState::its = false. Check this field to avoid advertising the ITS in the MADT table.
Resolves: https://gitlab.com/qemu-project/qemu/-/issues/2886
--- hw/arm/virt-acpi-build.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
hw/arm/virt-acpi-build.c +1 -1
@@ -212,7 +212,7 @@ static bool its_enabled(VirtMachineState *vms) {VirtMachineClass *vmc =VIRT_MACHINE_GET_CLASS (vms); -return !vmc->no_its; +return !vmc->no_its && vms->its; }/*
Signature · 1 line
2.47.1
PATCH v3 9/9 qtest/bios-tables-test: Update aarch64/virt 'its_off' variant blobs
In reply to Philippe Mathieu-DaudéCommit the blobs generated by tests/data/acpi/rebuild-expected-aml.sh.
Changes in the tables:
@@ -1,32 +1,32 @@
/*
* Intel ACPI Component Architecture
* AML/ASL+ Disassembler version 20240927 (64-bit version)
* Copyright (c) 2000 - 2023 Intel Corporation
*
* Disassembly of tests/data/acpi/aarch64/virt/APIC.its_off
*
* ACPI Data Table [APIC]
*
* Format: [HexOffset DecimalOffset ByteLength] FieldName : FieldValue (in hex) */
[000h 0000 004h] Signature : "APIC" [Multiple APIC Description Table (MADT)]
-[004h 0004 004h] Table Length : 000000B8
+[004h 0004 004h] Table Length : 000000A4
[008h 0008 001h] Revision : 04 -[009h 0009 001h] Checksum : A7 +[009h 0009 001h] Checksum : EE
[00Ah 0010 006h] Oem ID : "BOCHS "
[010h 0016 008h] Oem Table ID : "BXPC "
[018h 0024 004h] Oem Revision : 00000001
[01Ch 0028 004h] Asl Compiler ID : "BXPC"
[020h 0032 004h] Asl Compiler Revision : 00000001
[024h 0036 004h] Local Apic Address : 00000000
[028h 0040 004h] Flags (decoded below) : 00000000
PC-AT Compatibility : 0
[02Ch 0044 001h] Subtable Type : 0C [Generic Interrupt Distributor]
[02Dh 0045 001h] Length : 18
[02Eh 0046 002h] Reserved : 0000
[030h 0048 004h] Local GIC Hardware ID : 00000000
[034h 0052 008h] Base Address : 0000000008000000
[03Ch 0060 004h] Interrupt Base : 00000000
@@ -49,37 +49,29 @@
[06Ch 0108 008h] Virtual GIC Base Address : 0000000000000000
[074h 0116 008h] Hypervisor GIC Base Address : 0000000000000000
[07Ch 0124 004h] Virtual GIC Interrupt : 00000019
[080h 0128 008h] Redistributor Base Address : 0000000000000000
[088h 0136 008h] ARM MPIDR : 0000000000000000
[090h 0144 001h] Efficiency Class : 00
[091h 0145 001h] Reserved : 00
[092h 0146 002h] SPE Overflow Interrupt : 0000
[094h 0148 002h] TRBE Interrupt : 100E
[094h 0148 001h] Subtable Type : 0E [Generic Interrupt Redistributor]
[095h 0149 001h] Length : 10
[097h 0151 002h] Reserved : 0000
[098h 0152 008h] Base Address : 00000000080A0000
[0A0h 0160 004h] Length : 00F60000
-[0A4h 0164 001h] Subtable Type : 0F [Generic Interrupt Translator]
-[0A5h 0165 001h] Length : 14
-[0A7h 0167 002h] Reserved : 0000
-[0A8h 0168 004h] Translation ID : 00000000
-[0ACh 0172 008h] Base Address : 0000000008080000
-[0B4h 0180 004h] Reserved : 00000000
+Raw Table Data: Length 164 (0xA4)
-Raw Table Data: Length 184 (0xB8)
-
- 0000: 41 50 49 43 B8 00 00 00 04 A7 42 4F 43 48 53 20 // APIC......BOCHS
+ 0000: 41 50 49 43 A4 00 00 00 04 EE 42 4F 43 48 53 20 // APIC......BOCHS
0010: 42 58 50 43 20 20 20 20 01 00 00 00 42 58 50 43 // BXPC ....BXPC
0020: 01 00 00 00 00 00 00 00 00 00 00 00 0C 18 00 00 // ................
0030: 00 00 00 00 00 00 00 08 00 00 00 00 00 00 00 00 // ................
0040: 04 00 00 00 0B 50 00 00 00 00 00 00 00 00 00 00 // .....P..........
0050: 01 00 00 00 00 00 00 00 17 00 00 00 00 00 00 00 // ................
0060: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 // ................
0070: 00 00 00 00 00 00 00 00 00 00 00 00 19 00 00 00 // ................
0080: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 // ................
0090: 00 00 00 00 0E 10 00 00 00 00 0A 08 00 00 00 00 // ................
- 00A0: 00 00 F6 00 0F 14 00 00 00 00 00 00 00 00 08 08 // ................
- 00B0: 00 00 00 00 00 00 00 00 // ........
+ 00A0: 00 00 F6 00 // .... /*
* Intel ACPI Component Architecture
* AML/ASL+ Disassembler version 20240927 (64-bit version)
* Copyright (c) 2000 - 2023 Intel Corporation
*
* Disassembly of tests/data/acpi/aarch64/virt/FACP
*
* ACPI Data Table [FACP]
*
* Format: [HexOffset DecimalOffset ByteLength] FieldName : FieldValue (in hex) */
[000h 0000 004h] Signature : "FACP" [Fixed ACPI Description Table (FADT)]
[004h 0004 004h] Table Length : 00000114
[008h 0008 001h] Revision : 06 -[009h 0009 001h] Checksum : 12 +[009h 0009 001h] Checksum : 14
[00Ah 0010 006h] Oem ID : "BOCHS "
[010h 0016 008h] Oem Table ID : "BXPC "
[018h 0024 004h] Oem Revision : 00000001
[01Ch 0028 004h] Asl Compiler ID : "BXPC"
[020h 0032 004h] Asl Compiler Revision : 00000001
[024h 0036 004h] FACS Address : 00000000
[028h 0040 004h] DSDT Address : 00000000
[02Ch 0044 001h] Model : 00
[02Dh 0045 001h] PM Profile : 00 [Unspecified]
[02Eh 0046 002h] SCI Interrupt : 0000
[030h 0048 004h] SMI Command Port : 00000000
[034h 0052 001h] ACPI Enable Value : 00
[035h 0053 001h] ACPI Disable Value : 00
[036h 0054 001h] S4BIOS Command : 00
[037h 0055 001h] P-State Control : 00
@@ -82,35 +82,35 @@
Use Platform Timer (V4) : 0
RTC_STS valid on S4 wake (V4) : 0
Remote Power-on capable (V4) : 0
Use APIC Cluster Model (V4) : 0
Use APIC Physical Destination Mode (V4) : 0
Hardware Reduced (V5) : 1
Low Power S0 Idle (V5) : 0
[074h 0116 00Ch] Reset Register : [Generic Address Structure]
[074h 0116 001h] Space ID : 00 [SystemMemory]
[075h 0117 001h] Bit Width : 00
[076h 0118 001h] Bit Offset : 00
[077h 0119 001h] Encoded Access Width : 00 [Undefined/Legacy]
[078h 0120 008h] Address : 0000000000000000
[080h 0128 001h] Value to cause reset : 00
-[081h 0129 002h] ARM Flags (decoded below) : 0003
+[081h 0129 002h] ARM Flags (decoded below) : 0001
PSCI Compliant : 1
- Must use HVC for PSCI : 1
+ Must use HVC for PSCI : 0
[083h 0131 001h] FADT Minor Revision : 03
[084h 0132 008h] FACS Address : 0000000000000000
[08Ch 0140 008h] DSDT Address : 0000000000000000
[094h 0148 00Ch] PM1A Event Block : [Generic Address Structure]
[094h 0148 001h] Space ID : 00 [SystemMemory]
[095h 0149 001h] Bit Width : 00
[096h 0150 001h] Bit Offset : 00
[097h 0151 001h] Encoded Access Width : 00 [Undefined/Legacy]
[098h 0152 008h] Address : 0000000000000000
[0A0h 0160 00Ch] PM1B Event Block : [Generic Address Structure]
[0A0h 0160 001h] Space ID : 00 [SystemMemory]
[0A1h 0161 001h] Bit Width : 00
[0A2h 0162 001h] Bit Offset : 00
[0A3h 0163 001h] Encoded Access Width : 00 [Undefined/Legacy]
@@ -164,34 +164,34 @@
[0F5h 0245 001h] Bit Width : 00
[0F6h 0246 001h] Bit Offset : 00
[0F7h 0247 001h] Encoded Access Width : 00 [Undefined/Legacy]
[0F8h 0248 008h] Address : 0000000000000000
[100h 0256 00Ch] Sleep Status Register : [Generic Address Structure]
[100h 0256 001h] Space ID : 00 [SystemMemory]
[101h 0257 001h] Bit Width : 00
[102h 0258 001h] Bit Offset : 00
[103h 0259 001h] Encoded Access Width : 00 [Undefined/Legacy]
[104h 0260 008h] Address : 0000000000000000
[10Ch 0268 008h] Hypervisor ID : 00000000554D4551
Raw Table Data: Length 276 (0x114)
- 0000: 46 41 43 50 14 01 00 00 06 12 42 4F 43 48 53 20 // FACP......BOCHS
+ 0000: 46 41 43 50 14 01 00 00 06 14 42 4F 43 48 53 20 // FACP......BOCHS
0010: 42 58 50 43 20 20 20 20 01 00 00 00 42 58 50 43 // BXPC ....BXPC
0020: 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 // ................
0030: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 // ................
0040: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 // ................
0050: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 // ................
0060: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 // ................
0070: 00 00 10 00 00 00 00 00 00 00 00 00 00 00 00 00 // ................
- 0080: 00 03 00 03 00 00 00 00 00 00 00 00 00 00 00 00 // ................
+ 0080: 00 01 00 03 00 00 00 00 00 00 00 00 00 00 00 00 // ................
0090: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 // ................
00A0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 // ................
00B0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 // ................
00C0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 // ................
00D0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 // ................
00E0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 // ................
00F0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 // ................
0100: 00 00 00 00 00 00 00 00 00 00 00 00 51 45 4D 55 // ............QEMU
0110: 00 00 00 00 // .... @@ -1,122 +1,111 @@
/*
* Intel ACPI Component Architecture
* AML/ASL+ Disassembler version 20240927 (64-bit version)
* Copyright (c) 2000 - 2023 Intel Corporation
*
* Disassembly of tests/data/acpi/aarch64/virt/IORT.its_off
*
* ACPI Data Table [IORT]
*
* Format: [HexOffset DecimalOffset ByteLength] FieldName : FieldValue (in hex) */
[000h 0000 004h] Signature : "IORT" [IO Remapping Table]
-[004h 0004 004h] Table Length : 000000EC
+[004h 0004 004h] Table Length : 000000D4
[008h 0008 001h] Revision : 03 -[009h 0009 001h] Checksum : 57 +[009h 0009 001h] Checksum : A3
[00Ah 0010 006h] Oem ID : "BOCHS "
[010h 0016 008h] Oem Table ID : "BXPC "
[018h 0024 004h] Oem Revision : 00000001
[01Ch 0028 004h] Asl Compiler ID : "BXPC"
[020h 0032 004h] Asl Compiler Revision : 00000001
[024h 0036 004h] Node Count : 00000003
[028h 0040 004h] Node Offset : 00000030
[02Ch 0044 004h] Reserved : 00000000
-[030h 0048 001h] Type : 00
-[031h 0049 002h] Length : 0018
-[033h 0051 001h] Revision : 01
+[030h 0048 001h] Type : 04
+[031h 0049 002h] Length : 0058
+[033h 0051 001h] Revision : 04
[034h 0052 004h] Identifier : 00000000
-[038h 0056 004h] Mapping Count : 00000000
-[03Ch 0060 004h] Mapping Offset : 00000000
+[038h 0056 004h] Mapping Count : 00000001
+[03Ch 0060 004h] Mapping Offset : 00000044
-[040h 0064 004h] ItsCount : 00000001
-[044h 0068 004h] Identifiers : 00000000
-
-[048h 0072 001h] Type : 04
-[049h 0073 002h] Length : 0058
-[04Bh 0075 001h] Revision : 04
-[04Ch 0076 004h] Identifier : 00000001
-[050h 0080 004h] Mapping Count : 00000001
-[054h 0084 004h] Mapping Offset : 00000044
-
-[058h 0088 008h] Base Address : 0000000009050000
-[060h 0096 004h] Flags (decoded below) : 00000001
+[040h 0064 008h] Base Address : 0000000009050000
+[048h 0072 004h] Flags (decoded below) : 00000001
COHACC Override : 1
HTTU Override : 0
Proximity Domain Valid : 0
DeviceID Valid : 0
-[064h 0100 004h] Reserved : 00000000
-[068h 0104 008h] VATOS Address : 0000000000000000
-[070h 0112 004h] Model : 00000000
-[074h 0116 004h] Event GSIV : 0000006A
-[078h 0120 004h] PRI GSIV : 0000006B
-[07Ch 0124 004h] GERR GSIV : 0000006D
-[080h 0128 004h] Sync GSIV : 0000006C
-[084h 0132 004h] Proximity Domain : 00000000
-[088h 0136 004h] Device ID Mapping Index : 00000000
+[04Ch 0076 004h] Reserved : 00000000
+[050h 0080 008h] VATOS Address : 0000000000000000
+[058h 0088 004h] Model : 00000000
+[05Ch 0092 004h] Event GSIV : 0000006A
+[060h 0096 004h] PRI GSIV : 0000006B
+[064h 0100 004h] GERR GSIV : 0000006D
+[068h 0104 004h] Sync GSIV : 0000006C
+[06Ch 0108 004h] Proximity Domain : 00000000
+[070h 0112 004h] Device ID Mapping Index : 00000000
-[08Ch 0140 004h] Input base : 00000000
-[090h 0144 004h] ID Count : 0000FFFF
-[094h 0148 004h] Output Base : 00000000
-[098h 0152 004h] Output Reference : 00000030
-[09Ch 0156 004h] Flags (decoded below) : 00000000
+[074h 0116 004h] Input base : 00000000
+[078h 0120 004h] ID Count : 0000FFFF
+[07Ch 0124 004h] Output Base : 00000000
+[080h 0128 004h] Output Reference : 00000030
+[084h 0132 004h] Flags (decoded below) : 00000000
Single Mapping : 0
-[0A0h 0160 001h] Type : 02
-[0A1h 0161 002h] Length : 004C
-[0A3h 0163 001h] Revision : 03
-[0A4h 0164 004h] Identifier : 00000002
-[0A8h 0168 004h] Mapping Count : 00000002
-[0ACh 0172 004h] Mapping Offset : 00000024
+[088h 0136 001h] Type : 02
+[089h 0137 002h] Length : 004C
+[08Bh 0139 001h] Revision : 03
+[08Ch 0140 004h] Identifier : 00000001
+[090h 0144 004h] Mapping Count : 00000002
+[094h 0148 004h] Mapping Offset : 00000024
-[0B0h 0176 008h] Memory Properties : [IORT Memory Access Properties]
-[0B0h 0176 004h] Cache Coherency : 00000001
-[0B4h 0180 001h] Hints (decoded below) : 00
+[098h 0152 008h] Memory Properties : [IORT Memory Access Properties]
+[098h 0152 004h] Cache Coherency : 00000001
+[09Ch 0156 001h] Hints (decoded below) : 00
Transient : 0
Write Allocate : 0
Read Allocate : 0
Override : 0
-[0B5h 0181 002h] Reserved : 0000
-[0B7h 0183 001h] Memory Flags (decoded below) : 03
+[09Dh 0157 002h] Reserved : 0000
+[09Fh 0159 001h] Memory Flags (decoded below) : 03
Coherency : 1
Device Attribute : 1
Ensured Coherency of Accesses : 0
-[0B8h 0184 004h] ATS Attribute : 00000000
-[0BCh 0188 004h] PCI Segment Number : 00000000
-[0C0h 0192 001h] Memory Size Limit : 40
-[0C1h 0193 002h] PASID Capabilities : 0000
-[0C3h 0195 001h] Reserved : 00
+[0A0h 0160 004h] ATS Attribute : 00000000
+[0A4h 0164 004h] PCI Segment Number : 00000000
+[0A8h 0168 001h] Memory Size Limit : 40
+[0A9h 0169 002h] PASID Capabilities : 0000
+[0ABh 0171 001h] Reserved : 00
-[0C4h 0196 004h] Input base : 00000000
-[0C8h 0200 004h] ID Count : 000000FF
-[0CCh 0204 004h] Output Base : 00000000
-[0D0h 0208 004h] Output Reference : 00000048
-[0D4h 0212 004h] Flags (decoded below) : 00000000
+[0ACh 0172 004h] Input base : 00000000
+[0B0h 0176 004h] ID Count : 000000FF
+[0B4h 0180 004h] Output Base : 00000000
+[0B8h 0184 004h] Output Reference : 00000030
+[0BCh 0188 004h] Flags (decoded below) : 00000000
Single Mapping : 0
-[0D8h 0216 004h] Input base : 00000100
-[0DCh 0220 004h] ID Count : 0000FEFF
-[0E0h 0224 004h] Output Base : 00000100
-[0E4h 0228 004h] Output Reference : 00000030
-[0E8h 0232 004h] Flags (decoded below) : 00000000
+[0C0h 0192 004h] Input base : 00000100
+[0C4h 0196 004h] ID Count : 0000FEFF
+[0C8h 0200 004h] Output Base : 00000100
+[0CCh 0204 004h] Output Reference : 00000030
+[0D0h 0208 004h] Flags (decoded below) : 00000000
Single Mapping : 0
-Raw Table Data: Length 236 (0xEC)
+Raw Table Data: Length 212 (0xD4)
- 0000: 49 4F 52 54 EC 00 00 00 03 57 42 4F 43 48 53 20 // IORT.....WBOCHS
+ 0000: 49 4F 52 54 D4 00 00 00 03 A3 42 4F 43 48 53 20 // IORT......BOCHS
0010: 42 58 50 43 20 20 20 20 01 00 00 00 42 58 50 43 // BXPC ....BXPC
0020: 01 00 00 00 03 00 00 00 30 00 00 00 00 00 00 00 // ........0.......
- 0030: 00 18 00 01 00 00 00 00 00 00 00 00 00 00 00 00 // ................
- 0040: 01 00 00 00 00 00 00 00 04 58 00 04 01 00 00 00 // .........X......
- 0050: 01 00 00 00 44 00 00 00 00 00 05 09 00 00 00 00 // ....D...........
- 0060: 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 // ................
- 0070: 00 00 00 00 6A 00 00 00 6B 00 00 00 6D 00 00 00 // ....j...k...m...
- 0080: 6C 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 // l...............
- 0090: FF FF 00 00 00 00 00 00 30 00 00 00 00 00 00 00 // ........0.......
- 00A0: 02 4C 00 03 02 00 00 00 02 00 00 00 24 00 00 00 // .L..........$...
- 00B0: 01 00 00 00 00 00 00 03 00 00 00 00 00 00 00 00 // ................
- 00C0: 40 00 00 00 00 00 00 00 FF 00 00 00 00 00 00 00 // @...............
- 00D0: 48 00 00 00 00 00 00 00 00 01 00 00 FF FE 00 00 // H...............
- 00E0: 00 01 00 00 30 00 00 00 00 00 00 00 // ....0.......
+ 0030: 04 58 00 04 00 00 00 00 01 00 00 00 44 00 00 00 // .X..........D...
+ 0040: 00 00 05 09 00 00 00 00 01 00 00 00 00 00 00 00 // ................
+ 0050: 00 00 00 00 00 00 00 00 00 00 00 00 6A 00 00 00 // ............j...
+ 0060: 6B 00 00 00 6D 00 00 00 6C 00 00 00 00 00 00 00 // k...m...l.......
+ 0070: 00 00 00 00 00 00 00 00 FF FF 00 00 00 00 00 00 // ................
+ 0080: 30 00 00 00 00 00 00 00 02 4C 00 03 01 00 00 00 // 0........L......
+ 0090: 02 00 00 00 24 00 00 00 01 00 00 00 00 00 00 03 // ....$...........
+ 00A0: 00 00 00 00 00 00 00 00 40 00 00 00 00 00 00 00 // ........@.......
+ 00B0: FF 00 00 00 00 00 00 00 30 00 00 00 00 00 00 00 // ........0.......
+ 00C0: 00 01 00 00 FF FE 00 00 00 01 00 00 30 00 00 00 // ............0...
+ 00D0: 00 00 00 00 // ....--- tests/qtest/bios-tables-test-allowed-diff.h | 3 --- tests/data/acpi/aarch64/virt/APIC.its_off | Bin 184 -> 164 bytes tests/data/acpi/aarch64/virt/IORT.its_off | Bin 236 -> 212 bytes 3 files changed, 3 deletions(-)
tests/qtest/bios-tables-test-allowed-diff.h +0 -3
@@ -1,4 +1 @@/* List of comma-separated changed AML files to ignore */ -"tests/data/acpi/aarch64/virt/APIC.its_off" , -"tests/data/acpi/aarch64/virt/FACP.its_off" , -"tests/data/acpi/aarch64/virt/IORT.its_off",
tests/data/acpi/aarch64/virt/APIC.its_off binary +0 -0
tests/data/acpi/aarch64/virt/IORT.its_off binary +0 -0
Signature · 1 line
2.47.1
Re: [PATCH-for-10.1 v3 9/9] qtest/bios-tables-test: Update aarch64/virt 'its_off' variant blobs
Hi Phil,
Quoted 1 line · Philippe Mathieu-Daudé
Commit the blobs generated by
tests/data/acpi/rebuild-expected-aml.sh.
In accordance with my comments in 5/9 and 6/9 about the blobs organization, after the fix, I think only APIC blob should be updated and removed from the "ignore list".
Cheers,
Gustavo
Quoted 409 lines
Changes in the tables:
@@ -1,32 +1,32 @@ /* * Intel ACPI Component Architecture * AML/ASL+ Disassembler version 20240927 (64-bit version) * Copyright (c) 2000 - 2023 Intel Corporation * * Disassembly of tests/data/acpi/aarch64/virt/APIC.its_off * * ACPI Data Table [APIC] * * Format: [HexOffset DecimalOffset ByteLength] FieldName : FieldValue (in hex) */ [000h 0000 004h] Signature : "APIC" [Multiple APIC Description Table (MADT)] -[004h 0004 004h] Table Length : 000000B8 +[004h 0004 004h] Table Length : 000000A4 [008h 0008 001h] Revision : 04 -[009h 0009 001h] Checksum : A7 +[009h 0009 001h] Checksum : EE [00Ah 0010 006h] Oem ID : "BOCHS " [010h 0016 008h] Oem Table ID : "BXPC " [018h 0024 004h] Oem Revision : 00000001 [01Ch 0028 004h] Asl Compiler ID : "BXPC" [020h 0032 004h] Asl Compiler Revision : 00000001 [024h 0036 004h] Local Apic Address : 00000000 [028h 0040 004h] Flags (decoded below) : 00000000 PC-AT Compatibility : 0 [02Ch 0044 001h] Subtable Type : 0C [Generic Interrupt Distributor] [02Dh 0045 001h] Length : 18 [02Eh 0046 002h] Reserved : 0000 [030h 0048 004h] Local GIC Hardware ID : 00000000 [034h 0052 008h] Base Address : 0000000008000000 [03Ch 0060 004h] Interrupt Base : 00000000 @@ -49,37 +49,29 @@ [06Ch 0108 008h] Virtual GIC Base Address : 0000000000000000 [074h 0116 008h] Hypervisor GIC Base Address : 0000000000000000 [07Ch 0124 004h] Virtual GIC Interrupt : 00000019 [080h 0128 008h] Redistributor Base Address : 0000000000000000 [088h 0136 008h] ARM MPIDR : 0000000000000000 [090h 0144 001h] Efficiency Class : 00 [091h 0145 001h] Reserved : 00 [092h 0146 002h] SPE Overflow Interrupt : 0000 [094h 0148 002h] TRBE Interrupt : 100E [094h 0148 001h] Subtable Type : 0E [Generic Interrupt Redistributor] [095h 0149 001h] Length : 10 [097h 0151 002h] Reserved : 0000 [098h 0152 008h] Base Address : 00000000080A0000 [0A0h 0160 004h] Length : 00F60000 -[0A4h 0164 001h] Subtable Type : 0F [Generic Interrupt Translator] -[0A5h 0165 001h] Length : 14 -[0A7h 0167 002h] Reserved : 0000 -[0A8h 0168 004h] Translation ID : 00000000 -[0ACh 0172 008h] Base Address : 0000000008080000 -[0B4h 0180 004h] Reserved : 00000000 +Raw Table Data: Length 164 (0xA4) -Raw Table Data: Length 184 (0xB8) - - 0000: 41 50 49 43 B8 00 00 00 04 A7 42 4F 43 48 53 20 // APIC......BOCHS + 0000: 41 50 49 43 A4 00 00 00 04 EE 42 4F 43 48 53 20 // APIC......BOCHS 0010: 42 58 50 43 20 20 20 20 01 00 00 00 42 58 50 43 // BXPC ....BXPC 0020: 01 00 00 00 00 00 00 00 00 00 00 00 0C 18 00 00 // ................ 0030: 00 00 00 00 00 00 00 08 00 00 00 00 00 00 00 00 // ................ 0040: 04 00 00 00 0B 50 00 00 00 00 00 00 00 00 00 00 // .....P.......... 0050: 01 00 00 00 00 00 00 00 17 00 00 00 00 00 00 00 // ................ 0060: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 // ................ 0070: 00 00 00 00 00 00 00 00 00 00 00 00 19 00 00 00 // ................ 0080: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 // ................ 0090: 00 00 00 00 0E 10 00 00 00 00 0A 08 00 00 00 00 // ................ - 00A0: 00 00 F6 00 0F 14 00 00 00 00 00 00 00 00 08 08 // ................ - 00B0: 00 00 00 00 00 00 00 00 // ........ + 00A0: 00 00 F6 00 // .... /* * Intel ACPI Component Architecture * AML/ASL+ Disassembler version 20240927 (64-bit version) * Copyright (c) 2000 - 2023 Intel Corporation * * Disassembly of tests/data/acpi/aarch64/virt/FACP * * ACPI Data Table [FACP] * * Format: [HexOffset DecimalOffset ByteLength] FieldName : FieldValue (in hex) */ [000h 0000 004h] Signature : "FACP" [Fixed ACPI Description Table (FADT)] [004h 0004 004h] Table Length : 00000114 [008h 0008 001h] Revision : 06 -[009h 0009 001h] Checksum : 12 +[009h 0009 001h] Checksum : 14 [00Ah 0010 006h] Oem ID : "BOCHS " [010h 0016 008h] Oem Table ID : "BXPC " [018h 0024 004h] Oem Revision : 00000001 [01Ch 0028 004h] Asl Compiler ID : "BXPC" [020h 0032 004h] Asl Compiler Revision : 00000001 [024h 0036 004h] FACS Address : 00000000 [028h 0040 004h] DSDT Address : 00000000 [02Ch 0044 001h] Model : 00 [02Dh 0045 001h] PM Profile : 00 [Unspecified] [02Eh 0046 002h] SCI Interrupt : 0000 [030h 0048 004h] SMI Command Port : 00000000 [034h 0052 001h] ACPI Enable Value : 00 [035h 0053 001h] ACPI Disable Value : 00 [036h 0054 001h] S4BIOS Command : 00 [037h 0055 001h] P-State Control : 00 @@ -82,35 +82,35 @@ Use Platform Timer (V4) : 0 RTC_STS valid on S4 wake (V4) : 0 Remote Power-on capable (V4) : 0 Use APIC Cluster Model (V4) : 0 Use APIC Physical Destination Mode (V4) : 0 Hardware Reduced (V5) : 1 Low Power S0 Idle (V5) : 0 [074h 0116 00Ch] Reset Register : [Generic Address Structure] [074h 0116 001h] Space ID : 00 [SystemMemory] [075h 0117 001h] Bit Width : 00 [076h 0118 001h] Bit Offset : 00 [077h 0119 001h] Encoded Access Width : 00 [Undefined/Legacy] [078h 0120 008h] Address : 0000000000000000 [080h 0128 001h] Value to cause reset : 00 -[081h 0129 002h] ARM Flags (decoded below) : 0003 +[081h 0129 002h] ARM Flags (decoded below) : 0001 PSCI Compliant : 1 - Must use HVC for PSCI : 1 + Must use HVC for PSCI : 0 [083h 0131 001h] FADT Minor Revision : 03 [084h 0132 008h] FACS Address : 0000000000000000 [08Ch 0140 008h] DSDT Address : 0000000000000000 [094h 0148 00Ch] PM1A Event Block : [Generic Address Structure] [094h 0148 001h] Space ID : 00 [SystemMemory] [095h 0149 001h] Bit Width : 00 [096h 0150 001h] Bit Offset : 00 [097h 0151 001h] Encoded Access Width : 00 [Undefined/Legacy] [098h 0152 008h] Address : 0000000000000000 [0A0h 0160 00Ch] PM1B Event Block : [Generic Address Structure] [0A0h 0160 001h] Space ID : 00 [SystemMemory] [0A1h 0161 001h] Bit Width : 00 [0A2h 0162 001h] Bit Offset : 00 [0A3h 0163 001h] Encoded Access Width : 00 [Undefined/Legacy] @@ -164,34 +164,34 @@ [0F5h 0245 001h] Bit Width : 00 [0F6h 0246 001h] Bit Offset : 00 [0F7h 0247 001h] Encoded Access Width : 00 [Undefined/Legacy] [0F8h 0248 008h] Address : 0000000000000000 [100h 0256 00Ch] Sleep Status Register : [Generic Address Structure] [100h 0256 001h] Space ID : 00 [SystemMemory] [101h 0257 001h] Bit Width : 00 [102h 0258 001h] Bit Offset : 00 [103h 0259 001h] Encoded Access Width : 00 [Undefined/Legacy] [104h 0260 008h] Address : 0000000000000000 [10Ch 0268 008h] Hypervisor ID : 00000000554D4551 Raw Table Data: Length 276 (0x114) - 0000: 46 41 43 50 14 01 00 00 06 12 42 4F 43 48 53 20 // FACP......BOCHS + 0000: 46 41 43 50 14 01 00 00 06 14 42 4F 43 48 53 20 // FACP......BOCHS 0010: 42 58 50 43 20 20 20 20 01 00 00 00 42 58 50 43 // BXPC ....BXPC 0020: 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 // ................ 0030: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 // ................ 0040: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 // ................ 0050: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 // ................ 0060: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 // ................ 0070: 00 00 10 00 00 00 00 00 00 00 00 00 00 00 00 00 // ................ - 0080: 00 03 00 03 00 00 00 00 00 00 00 00 00 00 00 00 // ................ + 0080: 00 01 00 03 00 00 00 00 00 00 00 00 00 00 00 00 // ................ 0090: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 // ................ 00A0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 // ................ 00B0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 // ................ 00C0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 // ................ 00D0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 // ................ 00E0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 // ................ 00F0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 // ................ 0100: 00 00 00 00 00 00 00 00 00 00 00 00 51 45 4D 55 // ............QEMU 0110: 00 00 00 00 // .... @@ -1,122 +1,111 @@ /* * Intel ACPI Component Architecture * AML/ASL+ Disassembler version 20240927 (64-bit version) * Copyright (c) 2000 - 2023 Intel Corporation * * Disassembly of tests/data/acpi/aarch64/virt/IORT.its_off * * ACPI Data Table [IORT] * * Format: [HexOffset DecimalOffset ByteLength] FieldName : FieldValue (in hex) */ [000h 0000 004h] Signature : "IORT" [IO Remapping Table] -[004h 0004 004h] Table Length : 000000EC +[004h 0004 004h] Table Length : 000000D4 [008h 0008 001h] Revision : 03 -[009h 0009 001h] Checksum : 57 +[009h 0009 001h] Checksum : A3 [00Ah 0010 006h] Oem ID : "BOCHS " [010h 0016 008h] Oem Table ID : "BXPC " [018h 0024 004h] Oem Revision : 00000001 [01Ch 0028 004h] Asl Compiler ID : "BXPC" [020h 0032 004h] Asl Compiler Revision : 00000001 [024h 0036 004h] Node Count : 00000003 [028h 0040 004h] Node Offset : 00000030 [02Ch 0044 004h] Reserved : 00000000 -[030h 0048 001h] Type : 00 -[031h 0049 002h] Length : 0018 -[033h 0051 001h] Revision : 01 +[030h 0048 001h] Type : 04 +[031h 0049 002h] Length : 0058 +[033h 0051 001h] Revision : 04 [034h 0052 004h] Identifier : 00000000 -[038h 0056 004h] Mapping Count : 00000000 -[03Ch 0060 004h] Mapping Offset : 00000000 +[038h 0056 004h] Mapping Count : 00000001 +[03Ch 0060 004h] Mapping Offset : 00000044 -[040h 0064 004h] ItsCount : 00000001 -[044h 0068 004h] Identifiers : 00000000 - -[048h 0072 001h] Type : 04 -[049h 0073 002h] Length : 0058 -[04Bh 0075 001h] Revision : 04 -[04Ch 0076 004h] Identifier : 00000001 -[050h 0080 004h] Mapping Count : 00000001 -[054h 0084 004h] Mapping Offset : 00000044 - -[058h 0088 008h] Base Address : 0000000009050000 -[060h 0096 004h] Flags (decoded below) : 00000001 +[040h 0064 008h] Base Address : 0000000009050000 +[048h 0072 004h] Flags (decoded below) : 00000001 COHACC Override : 1 HTTU Override : 0 Proximity Domain Valid : 0 DeviceID Valid : 0 -[064h 0100 004h] Reserved : 00000000 -[068h 0104 008h] VATOS Address : 0000000000000000 -[070h 0112 004h] Model : 00000000 -[074h 0116 004h] Event GSIV : 0000006A -[078h 0120 004h] PRI GSIV : 0000006B -[07Ch 0124 004h] GERR GSIV : 0000006D -[080h 0128 004h] Sync GSIV : 0000006C -[084h 0132 004h] Proximity Domain : 00000000 -[088h 0136 004h] Device ID Mapping Index : 00000000 +[04Ch 0076 004h] Reserved : 00000000 +[050h 0080 008h] VATOS Address : 0000000000000000 +[058h 0088 004h] Model : 00000000 +[05Ch 0092 004h] Event GSIV : 0000006A +[060h 0096 004h] PRI GSIV : 0000006B +[064h 0100 004h] GERR GSIV : 0000006D +[068h 0104 004h] Sync GSIV : 0000006C +[06Ch 0108 004h] Proximity Domain : 00000000 +[070h 0112 004h] Device ID Mapping Index : 00000000 -[08Ch 0140 004h] Input base : 00000000 -[090h 0144 004h] ID Count : 0000FFFF -[094h 0148 004h] Output Base : 00000000 -[098h 0152 004h] Output Reference : 00000030 -[09Ch 0156 004h] Flags (decoded below) : 00000000 +[074h 0116 004h] Input base : 00000000 +[078h 0120 004h] ID Count : 0000FFFF +[07Ch 0124 004h] Output Base : 00000000 +[080h 0128 004h] Output Reference : 00000030 +[084h 0132 004h] Flags (decoded below) : 00000000 Single Mapping : 0 -[0A0h 0160 001h] Type : 02 -[0A1h 0161 002h] Length : 004C -[0A3h 0163 001h] Revision : 03 -[0A4h 0164 004h] Identifier : 00000002 -[0A8h 0168 004h] Mapping Count : 00000002 -[0ACh 0172 004h] Mapping Offset : 00000024 +[088h 0136 001h] Type : 02 +[089h 0137 002h] Length : 004C +[08Bh 0139 001h] Revision : 03 +[08Ch 0140 004h] Identifier : 00000001 +[090h 0144 004h] Mapping Count : 00000002 +[094h 0148 004h] Mapping Offset : 00000024 -[0B0h 0176 008h] Memory Properties : [IORT Memory Access Properties] -[0B0h 0176 004h] Cache Coherency : 00000001 -[0B4h 0180 001h] Hints (decoded below) : 00 +[098h 0152 008h] Memory Properties : [IORT Memory Access Properties] +[098h 0152 004h] Cache Coherency : 00000001 +[09Ch 0156 001h] Hints (decoded below) : 00 Transient : 0 Write Allocate : 0 Read Allocate : 0 Override : 0 -[0B5h 0181 002h] Reserved : 0000 -[0B7h 0183 001h] Memory Flags (decoded below) : 03 +[09Dh 0157 002h] Reserved : 0000 +[09Fh 0159 001h] Memory Flags (decoded below) : 03 Coherency : 1 Device Attribute : 1 Ensured Coherency of Accesses : 0 -[0B8h 0184 004h] ATS Attribute : 00000000 -[0BCh 0188 004h] PCI Segment Number : 00000000 -[0C0h 0192 001h] Memory Size Limit : 40 -[0C1h 0193 002h] PASID Capabilities : 0000 -[0C3h 0195 001h] Reserved : 00 +[0A0h 0160 004h] ATS Attribute : 00000000 +[0A4h 0164 004h] PCI Segment Number : 00000000 +[0A8h 0168 001h] Memory Size Limit : 40 +[0A9h 0169 002h] PASID Capabilities : 0000 +[0ABh 0171 001h] Reserved : 00 -[0C4h 0196 004h] Input base : 00000000 -[0C8h 0200 004h] ID Count : 000000FF -[0CCh 0204 004h] Output Base : 00000000 -[0D0h 0208 004h] Output Reference : 00000048 -[0D4h 0212 004h] Flags (decoded below) : 00000000 +[0ACh 0172 004h] Input base : 00000000 +[0B0h 0176 004h] ID Count : 000000FF +[0B4h 0180 004h] Output Base : 00000000 +[0B8h 0184 004h] Output Reference : 00000030 +[0BCh 0188 004h] Flags (decoded below) : 00000000 Single Mapping : 0 -[0D8h 0216 004h] Input base : 00000100 -[0DCh 0220 004h] ID Count : 0000FEFF -[0E0h 0224 004h] Output Base : 00000100 -[0E4h 0228 004h] Output Reference : 00000030 -[0E8h 0232 004h] Flags (decoded below) : 00000000 +[0C0h 0192 004h] Input base : 00000100 +[0C4h 0196 004h] ID Count : 0000FEFF +[0C8h 0200 004h] Output Base : 00000100 +[0CCh 0204 004h] Output Reference : 00000030 +[0D0h 0208 004h] Flags (decoded below) : 00000000 Single Mapping : 0 -Raw Table Data: Length 236 (0xEC) +Raw Table Data: Length 212 (0xD4) - 0000: 49 4F 52 54 EC 00 00 00 03 57 42 4F 43 48 53 20 // IORT.....WBOCHS + 0000: 49 4F 52 54 D4 00 00 00 03 A3 42 4F 43 48 53 20 // IORT......BOCHS 0010: 42 58 50 43 20 20 20 20 01 00 00 00 42 58 50 43 // BXPC ....BXPC 0020: 01 00 00 00 03 00 00 00 30 00 00 00 00 00 00 00 // ........0....... - 0030: 00 18 00 01 00 00 00 00 00 00 00 00 00 00 00 00 // ................ - 0040: 01 00 00 00 00 00 00 00 04 58 00 04 01 00 00 00 // .........X...... - 0050: 01 00 00 00 44 00 00 00 00 00 05 09 00 00 00 00 // ....D........... - 0060: 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 // ................ - 0070: 00 00 00 00 6A 00 00 00 6B 00 00 00 6D 00 00 00 // ....j...k...m... - 0080: 6C 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 // l............... - 0090: FF FF 00 00 00 00 00 00 30 00 00 00 00 00 00 00 // ........0....... - 00A0: 02 4C 00 03 02 00 00 00 02 00 00 00 24 00 00 00 // .L..........$... - 00B0: 01 00 00 00 00 00 00 03 00 00 00 00 00 00 00 00 // ................ - 00C0: 40 00 00 00 00 00 00 00 FF 00 00 00 00 00 00 00 // @............... - 00D0: 48 00 00 00 00 00 00 00 00 01 00 00 FF FE 00 00 // H............... - 00E0: 00 01 00 00 30 00 00 00 00 00 00 00 // ....0....... + 0030: 04 58 00 04 00 00 00 00 01 00 00 00 44 00 00 00 // .X..........D... + 0040: 00 00 05 09 00 00 00 00 01 00 00 00 00 00 00 00 // ................ + 0050: 00 00 00 00 00 00 00 00 00 00 00 00 6A 00 00 00 // ............j... + 0060: 6B 00 00 00 6D 00 00 00 6C 00 00 00 00 00 00 00 // k...m...l....... + 0070: 00 00 00 00 00 00 00 00 FF FF 00 00 00 00 00 00 // ................ + 0080: 30 00 00 00 00 00 00 00 02 4C 00 03 01 00 00 00 // 0........L...... + 0090: 02 00 00 00 24 00 00 00 01 00 00 00 00 00 00 03 // ....$........... + 00A0: 00 00 00 00 00 00 00 00 40 00 00 00 00 00 00 00 // ........@....... + 00B0: FF 00 00 00 00 00 00 00 30 00 00 00 00 00 00 00 // ........0....... + 00C0: 00 01 00 00 FF FE 00 00 00 01 00 00 30 00 00 00 // ............0... + 00D0: 00 00 00 00 // ....Signed-off-by Philippe Mathieu-Daudé <[email protected]>--- tests/qtest/bios-tables-test-allowed-diff.h | 3 --- tests/data/acpi/aarch64/virt/APIC.its_off | Bin 184 -> 164 bytes tests/data/acpi/aarch64/virt/IORT.its_off | Bin 236 -> 212 bytes 3 files changed, 3 deletions(-)tests/qtest/bios-tables-test-allowed-diff.h +0
-3@@ -1,4 +1 @@/* List of comma-separated changed AML files to ignore */ -"tests/data/acpi/aarch64/virt/APIC.its_off" , -"tests/data/acpi/aarch64/virt/FACP.its_off" , -"tests/data/acpi/aarch64/virt/IORT.its_off",tests/data/acpi/aarch64/virt/APIC.its_off binary +0
-0tests/data/acpi/aarch64/virt/IORT.its_off binary +0
-0
Hi Gustavo,
Could you take over this series? You seem better suited with ACPI and testing with Aarch64 virt machine :)
Thanks,
Phil.
Quoted 17 lines · Philippe Mathieu-Daudé
Fix ACPI tables for '-M its=off' CLI option.
Regards,
Phil.
Philippe Mathieu-Daudé (9):
hw/arm/virt: Remove pointlessVirtMachineState::tcg_itsfield hw/intc/gicv3_its: Do not checkits_class_name()for NULL hw/arm/virt: Simplifycreate_its()
hw/arm/virt-acpi: Factorits_enabled()helper out qtest/bios-tables-test: Add test for -M virt,its=off qtest/bios-tables-test: Whitelist aarch64/virt 'its_off' variant blobs hw/arm/virt-acpi: Always build IORT table (even with GIC ITS disabled) hw/arm/virt-acpi: Do not advertise disabled GIC ITS qtest/bios-tables-test: Update aarch64/virt 'its_off' variant blobs
Hi Phil,
Quoted 6 lines · Philippe Mathieu-Daudé
Hi Gustavo,
Could you take over this series? You seem better suited with ACPI and testing with Aarch64 virt machine :)
Thanks,
Sure. I just need to clarify a couple of things regarding the IORT spec. Meanwhile I'm (hopefully) waiting Igor or Michael confirm that the patch organization I've suggested makes sense for them.
Cheers,
Gustavo