* [PATCH 0/2] hw/arm/virt: Fix make check-qtest-aarch64 when CONFIG_ARM_GIC_TCG is unset
@ 2022-03-08 18:24 Eric Auger
2022-03-08 18:24 ` [PATCH 1/2] hw/intc: Rename CONFIG_ARM_GIC_TCG into CONFIG_ARM_GICV3_TCG Eric Auger
` (2 more replies)
0 siblings, 3 replies; 7+ messages in thread
From: Eric Auger @ 2022-03-08 18:24 UTC (permalink / raw)
To: eric.auger.pro, eric.auger, peter.maydell, drjones, f4bug,
qemu-arm, qemu-devel
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(-)
--
2.26.3
^ permalink raw reply [flat|nested] 7+ messages in thread
* [PATCH 1/2] hw/intc: Rename CONFIG_ARM_GIC_TCG into CONFIG_ARM_GICV3_TCG
2022-03-08 18:24 [PATCH 0/2] hw/arm/virt: Fix make check-qtest-aarch64 when CONFIG_ARM_GIC_TCG is unset Eric Auger
@ 2022-03-08 18:24 ` Eric Auger
2022-03-09 7:13 ` Andrew Jones
2022-03-08 18:24 ` [PATCH 2/2] hw/arm/virt: Fix gic-version=max when CONFIG_ARM_GICV3_TCG is unset Eric Auger
2022-03-15 18:09 ` [PATCH 0/2] hw/arm/virt: Fix make check-qtest-aarch64 when CONFIG_ARM_GIC_TCG " Peter Maydell
2 siblings, 1 reply; 7+ messages in thread
From: Eric Auger @ 2022-03-08 18:24 UTC (permalink / raw)
To: eric.auger.pro, eric.auger, peter.maydell, drjones, f4bug,
qemu-arm, qemu-devel
CONFIG_ARM_GIC_TCG actually guards the compilation of TCG GICv3
specific files. So let's rename it into CONFIG_ARM_GICV3_TCG
Signed-off-by: Eric Auger <eric.auger@redhat.com>
---
hw/intc/Kconfig | 2 +-
hw/intc/meson.build | 4 ++--
2 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/hw/intc/Kconfig b/hw/intc/Kconfig
index ec8d4cec29..a7cf301eab 100644
--- a/hw/intc/Kconfig
+++ b/hw/intc/Kconfig
@@ -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
diff --git a/hw/intc/meson.build b/hw/intc/meson.build
index 81ccdb0d78..d6d012fb26 100644
--- a/hw/intc/meson.build
+++ b/hw/intc/meson.build
@@ -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'))
--
2.26.3
^ permalink raw reply related [flat|nested] 7+ messages in thread
* [PATCH 2/2] hw/arm/virt: Fix gic-version=max when CONFIG_ARM_GICV3_TCG is unset
2022-03-08 18:24 [PATCH 0/2] hw/arm/virt: Fix make check-qtest-aarch64 when CONFIG_ARM_GIC_TCG is unset Eric Auger
2022-03-08 18:24 ` [PATCH 1/2] hw/intc: Rename CONFIG_ARM_GIC_TCG into CONFIG_ARM_GICV3_TCG Eric Auger
@ 2022-03-08 18:24 ` Eric Auger
2022-03-09 7:14 ` Andrew Jones
2022-03-15 18:39 ` Philippe Mathieu-Daudé
2022-03-15 18:09 ` [PATCH 0/2] hw/arm/virt: Fix make check-qtest-aarch64 when CONFIG_ARM_GIC_TCG " Peter Maydell
2 siblings, 2 replies; 7+ messages in thread
From: Eric Auger @ 2022-03-08 18:24 UTC (permalink / raw)
To: eric.auger.pro, eric.auger, peter.maydell, drjones, f4bug,
qemu-arm, qemu-devel
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.
Signed-off-by: Eric Auger <eric.auger@redhat.com>
---
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(-)
diff --git a/hw/arm/virt.c b/hw/arm/virt.c
index 46bf7ceddf..39790d29d2 100644
--- a/hw/arm/virt.c
+++ b/hw/arm/virt.c
@@ -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");
--
2.26.3
^ permalink raw reply related [flat|nested] 7+ messages in thread
* Re: [PATCH 1/2] hw/intc: Rename CONFIG_ARM_GIC_TCG into CONFIG_ARM_GICV3_TCG
2022-03-08 18:24 ` [PATCH 1/2] hw/intc: Rename CONFIG_ARM_GIC_TCG into CONFIG_ARM_GICV3_TCG Eric Auger
@ 2022-03-09 7:13 ` Andrew Jones
0 siblings, 0 replies; 7+ messages in thread
From: Andrew Jones @ 2022-03-09 7:13 UTC (permalink / raw)
To: Eric Auger; +Cc: qemu-devel, peter.maydell, qemu-arm, f4bug, eric.auger.pro
On Tue, Mar 08, 2022 at 07:24:51PM +0100, Eric Auger wrote:
> CONFIG_ARM_GIC_TCG actually guards the compilation of TCG GICv3
> specific files. So let's rename it into CONFIG_ARM_GICV3_TCG
>
> Signed-off-by: Eric Auger <eric.auger@redhat.com>
> ---
> hw/intc/Kconfig | 2 +-
> hw/intc/meson.build | 4 ++--
> 2 files changed, 3 insertions(+), 3 deletions(-)
>
Reviewed-by: Andrew Jones <drjones@redhat.com>
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH 2/2] hw/arm/virt: Fix gic-version=max when CONFIG_ARM_GICV3_TCG is unset
2022-03-08 18:24 ` [PATCH 2/2] hw/arm/virt: Fix gic-version=max when CONFIG_ARM_GICV3_TCG is unset Eric Auger
@ 2022-03-09 7:14 ` Andrew Jones
2022-03-15 18:39 ` Philippe Mathieu-Daudé
1 sibling, 0 replies; 7+ messages in thread
From: Andrew Jones @ 2022-03-09 7:14 UTC (permalink / raw)
To: Eric Auger; +Cc: qemu-devel, peter.maydell, qemu-arm, f4bug, eric.auger.pro
On Tue, Mar 08, 2022 at 07:24:52PM +0100, Eric Auger wrote:
> 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.
>
> Signed-off-by: Eric Auger <eric.auger@redhat.com>
>
> ---
>
> 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(-)
>
> diff --git a/hw/arm/virt.c b/hw/arm/virt.c
> index 46bf7ceddf..39790d29d2 100644
> --- a/hw/arm/virt.c
> +++ b/hw/arm/virt.c
> @@ -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");
> --
> 2.26.3
>
Reviewed-by: Andrew Jones <drjones@redhat.com>
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH 0/2] hw/arm/virt: Fix make check-qtest-aarch64 when CONFIG_ARM_GIC_TCG is unset
2022-03-08 18:24 [PATCH 0/2] hw/arm/virt: Fix make check-qtest-aarch64 when CONFIG_ARM_GIC_TCG is unset Eric Auger
2022-03-08 18:24 ` [PATCH 1/2] hw/intc: Rename CONFIG_ARM_GIC_TCG into CONFIG_ARM_GICV3_TCG Eric Auger
2022-03-08 18:24 ` [PATCH 2/2] hw/arm/virt: Fix gic-version=max when CONFIG_ARM_GICV3_TCG is unset Eric Auger
@ 2022-03-15 18:09 ` Peter Maydell
2 siblings, 0 replies; 7+ messages in thread
From: Peter Maydell @ 2022-03-15 18:09 UTC (permalink / raw)
To: Eric Auger; +Cc: qemu-devel, drjones, qemu-arm, f4bug, eric.auger.pro
On Tue, 8 Mar 2022 at 18:25, Eric Auger <eric.auger@redhat.com> wrote:
>
> 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.
The use of module_object_class_by_name() looks much neater than
the ifdefs.
Applied to target-arm.next, thanks.
-- PMM
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH 2/2] hw/arm/virt: Fix gic-version=max when CONFIG_ARM_GICV3_TCG is unset
2022-03-08 18:24 ` [PATCH 2/2] hw/arm/virt: Fix gic-version=max when CONFIG_ARM_GICV3_TCG is unset Eric Auger
2022-03-09 7:14 ` Andrew Jones
@ 2022-03-15 18:39 ` Philippe Mathieu-Daudé
1 sibling, 0 replies; 7+ messages in thread
From: Philippe Mathieu-Daudé @ 2022-03-15 18:39 UTC (permalink / raw)
To: Eric Auger, eric.auger.pro, peter.maydell, drjones, f4bug,
qemu-arm, qemu-devel
On 8/3/22 19:24, Eric Auger wrote:
> 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.
>
> Signed-off-by: Eric Auger <eric.auger@redhat.com>
>
> ---
>
> 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(-)
>
> diff --git a/hw/arm/virt.c b/hw/arm/virt.c
> index 46bf7ceddf..39790d29d2 100644
> --- a/hw/arm/virt.c
> +++ b/hw/arm/virt.c
> @@ -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?
> + /* 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");
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2022-03-15 18:42 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-03-08 18:24 [PATCH 0/2] hw/arm/virt: Fix make check-qtest-aarch64 when CONFIG_ARM_GIC_TCG is unset Eric Auger
2022-03-08 18:24 ` [PATCH 1/2] hw/intc: Rename CONFIG_ARM_GIC_TCG into CONFIG_ARM_GICV3_TCG Eric Auger
2022-03-09 7:13 ` Andrew Jones
2022-03-08 18:24 ` [PATCH 2/2] hw/arm/virt: Fix gic-version=max when CONFIG_ARM_GICV3_TCG is unset Eric Auger
2022-03-09 7:14 ` Andrew Jones
2022-03-15 18:39 ` Philippe Mathieu-Daudé
2022-03-15 18:09 ` [PATCH 0/2] hw/arm/virt: Fix make check-qtest-aarch64 when CONFIG_ARM_GIC_TCG " Peter Maydell
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.