Hi Philippe,
On 4/3/25 10:40 PM, Philippe Mathieu-Daudé wrote:
> VirtMachineState::tcg_its has the negated logic value of
> VirtMachineClass::no_tcg_its. Directly use the latter,
> removing the former.
>
> Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Reviewed-by: Eric Auger <eric.auger@redhat.com>
Eric
> ---
> include/hw/arm/virt.h | 1 -
> hw/arm/virt.c | 13 +++++--------
> 2 files changed, 5 insertions(+), 9 deletions(-)
>
> diff --git a/include/hw/arm/virt.h b/include/hw/arm/virt.h
> index c8e94e6aedc..17c160429ea 100644
> --- a/include/hw/arm/virt.h
> +++ b/include/hw/arm/virt.h
> @@ -150,7 +150,6 @@ struct VirtMachineState {
> bool highmem_mmio;
> bool highmem_redists;
> bool its;
> - bool tcg_its;
> bool virt;
> bool ras;
> bool mte;
> diff --git a/hw/arm/virt.c b/hw/arm/virt.c
> index a96452f17a4..177e9e0eadb 100644
> --- a/hw/arm/virt.c
> +++ b/hw/arm/virt.c
> @@ -710,11 +710,12 @@ static inline DeviceState *create_acpi_ged(VirtMachineState *vms)
>
> static void create_its(VirtMachineState *vms)
> {
> + VirtMachineClass *vmc = VIRT_MACHINE_GET_CLASS(vms);
> const char *itsclass = its_class_name();
> DeviceState *dev;
>
> if (!strcmp(itsclass, "arm-gicv3-its")) {
> - if (!vms->tcg_its) {
> + if (vmc->no_tcg_its) {
> itsclass = NULL;
> }
> }
> @@ -831,7 +832,9 @@ static void create_gic(VirtMachineState *vms, MemoryRegion *mem)
> redist_region_count);
>
> if (!kvm_irqchip_in_kernel()) {
> - if (vms->tcg_its) {
> + VirtMachineClass *vmc = VIRT_MACHINE_GET_CLASS(vms);
> +
> + if (!vmc->no_tcg_its) {
> object_property_set_link(OBJECT(vms->gic), "sysmem",
> OBJECT(mem), &error_fatal);
> qdev_prop_set_bit(vms->gic, "has-lpi", true);
> @@ -3357,12 +3360,6 @@ static void virt_instance_init(Object *obj)
> } else {
> /* Default allows ITS instantiation */
> vms->its = true;
> -
> - if (vmc->no_tcg_its) {
> - vms->tcg_its = false;
> - } else {
> - vms->tcg_its = true;
> - }
> }
>
> /* Default disallows iommu instantiation */