We now use VirtMachineState::tcg_its only in the
finalize_msi_controller() function, and it is always the inverse of
the VirtMachineClass::no_tcg_its class field. We can simplify to use
no_tcg_its and drop the VirtMachineState field entirely.
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
---
hw/arm/virt.c | 6 +++---
include/hw/arm/virt.h | 1 -
2 files changed, 3 insertions(+), 4 deletions(-)
diff --git a/hw/arm/virt.c b/hw/arm/virt.c
index a231aef268..b65f571532 100644
--- a/hw/arm/virt.c
+++ b/hw/arm/virt.c
@@ -2082,8 +2082,10 @@ static void finalize_msi_controller(VirtMachineState *vms)
* the relevant user settings and compat data. Called
* after finalizing the GIC version.
*/
+ VirtMachineClass *vmc = VIRT_MACHINE_GET_CLASS(vms);
+
if (vms->gic_version != VIRT_GIC_VERSION_2 && vms->its) {
- if (!kvm_irqchip_in_kernel() && !vms->tcg_its) {
+ if (!kvm_irqchip_in_kernel() && vmc->no_tcg_its) {
vms->msi_controller = VIRT_MSI_CTRL_NONE;
} else {
vms->msi_controller = VIRT_MSI_CTRL_ITS;
@@ -3511,8 +3513,6 @@ static void virt_instance_init(Object *obj)
/* Default allows ITS instantiation */
vms->its = true;
- /* Allow ITS emulation if the machine version supports it */
- vms->tcg_its = !vmc->no_tcg_its;
/* Default disallows iommu instantiation */
vms->iommu = VIRT_IOMMU_NONE;
diff --git a/include/hw/arm/virt.h b/include/hw/arm/virt.h
index 5907d41dbb..577b4b3362 100644
--- a/include/hw/arm/virt.h
+++ b/include/hw/arm/virt.h
@@ -147,7 +147,6 @@ struct VirtMachineState {
bool highmem_mmio;
bool highmem_redists;
bool its;
- bool tcg_its;
bool virt;
bool ras;
bool mte;
--
2.47.3