hw/arm/virt: Fix make check-qtest-aarch64 when CONFIG_ARM_GIC_TCG is unset
PATCH 1/2 hw/intc: Rename CONFIG_ARM_GIC_TCG into CONFIG_ARM_GICV3_TCG
In reply to Eric AugerCONFIG_ARM_GIC_TCG actually guards the compilation of TCG GICv3 specific files. So let's rename it into CONFIG_ARM_GICV3_TCG
--- hw/intc/Kconfig | 2 +- hw/intc/meson.build | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-)
hw/intc/Kconfig +1 -1
@@ -25,7 +25,7 @@ config APIC select MSI_NONBROKEN select I8259 -config ARM_GIC_TCG +config ARM_GICV3_TCG bool default y depends on ARM_GIC && TCG
hw/intc/meson.build +2 -2
@@ -6,7 +6,7 @@ softmmu_ss.add(when: 'CONFIG_ARM_GIC', if_true: files( 'arm_gicv3_common.c', 'arm_gicv3_its_common.c', )) -softmmu_ss.add(when: 'CONFIG_ARM_GIC_TCG', if_true: files( +softmmu_ss.add(when: 'CONFIG_ARM_GICV3_TCG', if_true: files( 'arm_gicv3.c', 'arm_gicv3_dist.c', 'arm_gicv3_its.c',
@@ -28,7 +28,7 @@ softmmu_ss.add(when: 'CONFIG_XLNX_ZYNQMP_PMU', if_true: files('xlnx-pmu-iomod-in specific_ss.add(when: 'CONFIG_ALLWINNER_A10_PIC', if_true: files('allwinner-a10-pic.c')) specific_ss.add(when: 'CONFIG_APIC', if_true: files('apic.c', 'apic_common.c')) specific_ss.add(when: 'CONFIG_ARM_GIC', if_true: files('arm_gicv3_cpuif_common.c')) -specific_ss.add(when: 'CONFIG_ARM_GIC_TCG', if_true: files('arm_gicv3_cpuif.c')) +specific_ss.add(when: 'CONFIG_ARM_GICV3_TCG', if_true: files('arm_gicv3_cpuif.c')) specific_ss.add(when: 'CONFIG_ARM_GIC_KVM', if_true: files('arm_gic_kvm.c')) specific_ss.add(when: ['CONFIG_ARM_GIC_KVM', 'TARGET_AARCH64'], if_true: files('arm_gicv3_kvm.c', 'arm_gicv3_its_kvm.c')) specific_ss.add(when: 'CONFIG_ARM_V7M', if_true: files('armv7m_nvic.c'))
Signature · 1 line
2.26.3
cover hw/arm/virt: Fix make check-qtest-aarch64 when CONFIG_ARM_GIC_TCG is unset
When CONFIG_ARM_GIC_TCG is unset, qtests fail with ERROR:../qom/object.c:715:object_new_with_type: assertion failed: (type != NULL)
This is due to the fact a bunch tests use gic-version=max which currectly unconditionally selects GICv3, ignoring the fact this latter may have been disabled.
This series renames CONFIG_ARM_GIC_TCG into CONFIG_ARM_GICv3_TCG. Also it selects GICv2 if gic-version=max and CONFIG_ARM_GICV3_TCG is unset, in TCG mode. With those fixes qtests pass along with virt machine node.
Best Regards
Eric
This series can be found at:
https://github.com/eauger/qemu/tree/gicv3_tcg_v3
Eric Auger (2):
hw/intc: Rename CONFIG_ARM_GIC_TCG into CONFIG_ARM_GICV3_TCG hw/arm/virt: Fix gic-version=max when CONFIG_ARM_GICV3_TCG is unset
hw/arm/virt.c | 7 ++++++- hw/intc/Kconfig | 2 +- hw/intc/meson.build | 4 ++-- 3 files changed, 9 insertions(+), 4 deletions(-)
Signature · 1 line
2.26.3
PATCH 2/2 hw/arm/virt: Fix gic-version=max when CONFIG_ARM_GICV3_TCG is unset
In TCG mode, if gic-version=max we always select GICv3 even if CONFIG_ARM_GICV3_TCG is unset. We shall rather select GICv2. This also brings the benefit of fixing qos tests errors for tests using gic-version=max with CONFIG_ARM_GICV3_TCG unset.
---
v2 -> v3:
- Use module_object_class_by_name() and refer to the renamed CONFIG_ARM_GICV3_TCG config
--- hw/arm/virt.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-)
hw/arm/virt.c +6 -1
@@ -1852,7 +1852,12 @@ static void finalize_gic_version(VirtMachineState *vms) vms->gic_version =VIRT_GIC_VERSION_2 ;break ;case VIRT_GIC_VERSION_MAX : - vms->gic_version =VIRT_GIC_VERSION_3 ; +if (module_object_class_by_name ("arm-gicv3" )) { +/* CONFIG_ARM_GICV3_TCG was set */ + vms->gic_version =VIRT_GIC_VERSION_3 ; + }else { + vms->gic_version =VIRT_GIC_VERSION_2 ; + }break ;case VIRT_GIC_VERSION_HOST :error_report ("gic-version=host requires KVM" );
Signature · 1 line
2.26.3
Re: [PATCH 1/2] hw/intc: Rename CONFIG_ARM_GIC_TCG into CONFIG_ARM_GICV3_TCG
In reply to Eric AugerQuoted 9 lines · Eric Auger
CONFIG_ARM_GIC_TCGactually guards the compilation of TCG GICv3 specific files. So let's rename it intoCONFIG_ARM_GICV3_TCGSigned-off-by Eric Auger <[email protected]>--- hw/intc/Kconfig | 2 +- hw/intc/meson.build | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-)
Re: [PATCH 2/2] hw/arm/virt: Fix gic-version=max when CONFIG_ARM_GICV3_TCG is unset
In reply to Eric AugerQuoted 37 lines · Eric Auger
In TCG mode, if gic-version=max we always select GICv3 even if
CONFIG_ARM_GICV3_TCGis unset. We shall rather select GICv2. This also brings the benefit of fixing qos tests errors for tests using gic-version=max withCONFIG_ARM_GICV3_TCGunset.Signed-off-by Eric Auger <[email protected]>---
v2 -> v3:
- Usemodule_object_class_by_name()and refer to the renamedCONFIG_ARM_GICV3_TCGconfig--- hw/arm/virt.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-)hw/arm/virt.c +6
-1@@ -1852,7 +1852,12 @@ static void finalize_gic_version(VirtMachineState *vms) vms->gic_version =VIRT_GIC_VERSION_2 ;break ;case VIRT_GIC_VERSION_MAX : - vms->gic_version =VIRT_GIC_VERSION_3 ; +if (module_object_class_by_name ("arm-gicv3" )) { +/* CONFIG_ARM_GICV3_TCG was set */ + vms->gic_version =VIRT_GIC_VERSION_3 ; + }else { + vms->gic_version =VIRT_GIC_VERSION_2 ; + }break ;case VIRT_GIC_VERSION_HOST :error_report ("gic-version=host requires KVM" );Signature · 1 line
2.26.3
Peter Maydell
AppliedQuoted 4 lines · Eric Auger
When
CONFIG_ARM_GIC_TCGis unset, qtests fail with ERROR:../qom/object.c:715:object_new_with_type: assertion failed: (type != NULL)
Quoted 8 lines
This is due to the fact a bunch tests use gic-version=max which currectly unconditionally selects GICv3, ignoring the fact this latter may have been disabled.
This series renames
CONFIG_ARM_GIC_TCGintoCONFIG_ARM_GICv3_TCG. Also it selects GICv2 if gic-version=max andCONFIG_ARM_GICV3_TCGis unset, in TCG mode. With those fixes qtests pass along with virt machine node.
The use of module_object_class_by_name() looks much neater than the ifdefs.
Applied to target-arm.next, thanks.
-- PMM
Re: [PATCH 2/2] hw/arm/virt: Fix gic-version=max when CONFIG_ARM_GICV3_TCG is unset
In reply to Eric AugerQuoted 21 lines · Eric Auger
In TCG mode, if gic-version=max we always select GICv3 even if
CONFIG_ARM_GICV3_TCGis unset. We shall rather select GICv2. This also brings the benefit of fixing qos tests errors for tests using gic-version=max withCONFIG_ARM_GICV3_TCGunset.Signed-off-by Eric Auger <[email protected]>---
v2 -> v3:
- Usemodule_object_class_by_name()and refer to the renamedCONFIG_ARM_GICV3_TCGconfig--- hw/arm/virt.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-)hw/arm/virt.c +0
-0
hw/arm/virt.c static void finalize_gic_version(VirtMachineState *vms) · line 1855
Quoted 5 lines
hw/arm/virt.c +1
-1@@ -1852,7 +1852,12 @@ static void finalize_gic_version(VirtMachineState *vms) vms->gic_version =VIRT_GIC_VERSION_2 ;break ;case VIRT_GIC_VERSION_MAX : - vms->gic_version =VIRT_GIC_VERSION_3 ; +if (module_object_class_by_name ("arm-gicv3" )) {
Too late, but why not use TYPE_ARM_GICV3?
Quoted 8 lines
hw/arm/virt.c +5
-0+/* CONFIG_ARM_GICV3_TCG was set */ + vms->gic_version =VIRT_GIC_VERSION_3 ; + }else { + vms->gic_version =VIRT_GIC_VERSION_2 ; + }break ;case VIRT_GIC_VERSION_HOST :error_report ("gic-version=host requires KVM" );