> On 20. Jan 2026, at 19:03, Peter Maydell <[email protected]> wrote:
> 
> The create_gic() function needs to know whether the GIC
> has a TCG ITS attached, as it should set the "sysmem" and
> "has-lpi" properties of the GICv3 only in that case.
> Currently it does this with
> (!kvm_irqchip_in_kernel() && vms->tcg_its)
> which implicitly relies on knowing that the only case
> where we aren't using a KVM GIC and we don't have an ITS
> is where we suppressed the TCG ITS because of the
> board-version-compatibility no_tcg_its setting.
> 
> We can avoid direct use of vms->tcg_its now that we
> can identify what MSI controller we are using from the
> vms->msi_controller field.
> 
> This means that the only use of vms->tcg_its is in
> the logic in finalize_msi_controller().
> 
> Signed-off-by: Peter Maydell <[email protected]>
> ---
> hw/arm/virt.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/hw/arm/virt.c b/hw/arm/virt.c
> index b55297455f..a231aef268 100644
> --- a/hw/arm/virt.c
> +++ b/hw/arm/virt.c
> @@ -851,7 +851,7 @@ static void create_gic(VirtMachineState *vms, 
> MemoryRegion *mem)
>                             redist_region_count);
> 
>         if (!kvm_irqchip_in_kernel()) {
> -            if (vms->tcg_its) {
> +            if (vms->msi_controller == VIRT_MSI_CTRL_ITS) {
>                 object_property_set_link(OBJECT(vms->gic), "sysmem",
>                                          OBJECT(mem), &error_fatal);
>                 qdev_prop_set_bit(vms->gic, "has-lpi", true);
> -- 
> 2.47.3
> 
> 
Reviewed-by: Mohamed Mediouni <[email protected]>



Reply via email to