diff mbox series

[PATCH-for-10.0,4/5] hw/arm/virt-acpi: Do not advertise disabled GIC ITS

Message ID 20250331221239.87150-5-philmd@linaro.org
State New
Headers show
Series hw/arm/virt-acpi: Do not advertise disabled GIC ITS in MADT table | expand

Commit Message

Philippe Mathieu-Daudé March 31, 2025, 10:12 p.m. UTC
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.

Reported-by: Udo Steinberg <udo@hypervisor.org>
Resolves: https://gitlab.com/qemu-project/qemu/-/issues/2886
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
---
 hw/arm/virt-acpi-build.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Gustavo Romero April 2, 2025, 6:45 a.m. UTC | #1
Hi Phil,

On 3/31/25 19:12, Philippe Mathieu-Daudé wrote:
> 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.
> 
> Reported-by: Udo Steinberg <udo@hypervisor.org>
> Resolves: https://gitlab.com/qemu-project/qemu/-/issues/2886
> Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
> ---
>   hw/arm/virt-acpi-build.c | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/hw/arm/virt-acpi-build.c b/hw/arm/virt-acpi-build.c
> index fdc08b40883..b26f0ac8585 100644
> --- a/hw/arm/virt-acpi-build.c
> +++ b/hw/arm/virt-acpi-build.c
> @@ -212,7 +212,7 @@ static bool its_enabled(VirtMachineState *vms)
>   {
>       VirtMachineClass *vmc = VIRT_MACHINE_GET_CLASS(vms);
>   
> -    return its_class_name() && !vmc->no_its;
> +    return its_class_name() && !vmc->no_its && vms->its;
>   }

Aside its_class_name() apparently being tautologic (please double check it):

Reviewed-by: Gustavo Romero <gustavo.romero@linaro.org>


Cheers,
Gustavo
diff mbox series

Patch

diff --git a/hw/arm/virt-acpi-build.c b/hw/arm/virt-acpi-build.c
index fdc08b40883..b26f0ac8585 100644
--- a/hw/arm/virt-acpi-build.c
+++ b/hw/arm/virt-acpi-build.c
@@ -212,7 +212,7 @@  static bool its_enabled(VirtMachineState *vms)
 {
     VirtMachineClass *vmc = VIRT_MACHINE_GET_CLASS(vms);
 
-    return its_class_name() && !vmc->no_its;
+    return its_class_name() && !vmc->no_its && vms->its;
 }
 
 /*