summary refs log tree commit diff stats
path: root/hw/arm/virt.c
diff options
context:
space:
mode:
authorGustavo Romero <gustavo.romero@linaro.org>2025-07-01 15:08:29 +0100
committerPeter Maydell <peter.maydell@linaro.org>2025-07-01 15:08:29 +0100
commit43eb1805437e1c904fcb5d8ce93096301128a4d0 (patch)
tree8ab2bb77642502267024d455382dbf25b8f2d094 /hw/arm/virt.c
parent374d766da75ab89749f59813f7ae55d913c37b58 (diff)
downloadfocaccia-qemu-43eb1805437e1c904fcb5d8ce93096301128a4d0.tar.gz
focaccia-qemu-43eb1805437e1c904fcb5d8ce93096301128a4d0.zip
hw/arm/virt: Simplify logic for setting instance's 'tcg_its' variable
Because 'tcg_its' in the machine instance is set based on the machine
class’s negated variable 'no_tcg_its', 'tcg_its' is the opposite of
'no_tcg_its' and hence the code in question can be simplified as:
tcg_its = !no_tcg_its.

Signed-off-by: Gustavo Romero <gustavo.romero@linaro.org>
Reviewed-by: Eric Auger <eric.auger@redhat.com>
Message-id: 20250628195722.977078-3-gustavo.romero@linaro.org
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Diffstat (limited to 'hw/arm/virt.c')
-rw-r--r--hw/arm/virt.c8
1 files changed, 2 insertions, 6 deletions
diff --git a/hw/arm/virt.c b/hw/arm/virt.c
index 99fde5836c..6d9256a525 100644
--- a/hw/arm/virt.c
+++ b/hw/arm/virt.c
@@ -3342,12 +3342,8 @@ static void virt_instance_init(Object *obj)
 
     /* Default allows ITS instantiation */
     vms->its = true;
-
-    if (vmc->no_tcg_its) {
-        vms->tcg_its = false;
-    } else {
-        vms->tcg_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;