diff mbox series

[1/2] hw/arm/virt: Fix gic-version=max when CONFIG_ARM_GIC_TCG is unset

Message ID 20220131154531.429533-2-eric.auger@redhat.com
State New
Headers show
Series hw/arm/virt, qtests: Fix make check-qtest-aarch64 when CONFIG_ARM_GIC_TCG is unset | expand

Commit Message

Eric Auger Jan. 31, 2022, 3:45 p.m. UTC
In TCG mode, if gic-version=max we always select GICv3 even if
CONFIG_ARM_GIC_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_GIC_TCG unset.

Signed-off-by: Eric Auger <eric.auger@redhat.com>
Fixes: a8a5546798c3 ("hw/intc/arm_gicv3: Introduce CONFIG_ARM_GIC_TCG Kconfig selector")
---
 hw/arm/virt.c | 4 ++++
 1 file changed, 4 insertions(+)

Comments

Andrew Jones Jan. 31, 2022, 3:53 p.m. UTC | #1
On Mon, Jan 31, 2022 at 04:45:30PM +0100, Eric Auger wrote:
> In TCG mode, if gic-version=max we always select GICv3 even if
> CONFIG_ARM_GIC_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_GIC_TCG unset.
> 
> Signed-off-by: Eric Auger <eric.auger@redhat.com>
> Fixes: a8a5546798c3 ("hw/intc/arm_gicv3: Introduce CONFIG_ARM_GIC_TCG Kconfig selector")
> ---
>  hw/arm/virt.c | 4 ++++
>  1 file changed, 4 insertions(+)
> 
> diff --git a/hw/arm/virt.c b/hw/arm/virt.c
> index 141350bf21..2f1d4d0230 100644
> --- a/hw/arm/virt.c
> +++ b/hw/arm/virt.c
> @@ -1852,7 +1852,11 @@ static void finalize_gic_version(VirtMachineState *vms)
>          vms->gic_version = VIRT_GIC_VERSION_2;
>          break;
>      case VIRT_GIC_VERSION_MAX:
> +#ifdef CONFIG_ARM_GIC_TCG
>          vms->gic_version = VIRT_GIC_VERSION_3;
> +#else
> +        vms->gic_version = VIRT_GIC_VERSION_2;
> +#endif
>          break;
>      case VIRT_GIC_VERSION_HOST:
>          error_report("gic-version=host requires KVM");
> -- 
> 2.26.3
>

Why is the config generically named "ARM_GIC_TCG" when it only controls
Arm GICV3 TCG?

Otherwise,

Reviewed-by: Andrew Jones <drjones@redhat.com>

Thanks,
drew
diff mbox series

Patch

diff --git a/hw/arm/virt.c b/hw/arm/virt.c
index 141350bf21..2f1d4d0230 100644
--- a/hw/arm/virt.c
+++ b/hw/arm/virt.c
@@ -1852,7 +1852,11 @@  static void finalize_gic_version(VirtMachineState *vms)
         vms->gic_version = VIRT_GIC_VERSION_2;
         break;
     case VIRT_GIC_VERSION_MAX:
+#ifdef CONFIG_ARM_GIC_TCG
         vms->gic_version = VIRT_GIC_VERSION_3;
+#else
+        vms->gic_version = VIRT_GIC_VERSION_2;
+#endif
         break;
     case VIRT_GIC_VERSION_HOST:
         error_report("gic-version=host requires KVM");