495e37
From 789933e2598f9a525c2a638feca974ca1730a859 Mon Sep 17 00:00:00 2001
495e37
From: Eric Auger <eric.auger@redhat.com>
495e37
Date: Mon, 20 Dec 2021 16:04:59 +0100
495e37
Subject: [PATCH 2/6] hw/arm/virt: Register "its" as a class property
495e37
495e37
RH-Author: Eric Auger <eric.auger@redhat.com>
495e37
RH-MergeRequest: 57: hw/arm/virt: Add 9.0 machine type and remove 8.5 one
495e37
RH-Commit: [2/6] dbd3e994553f00cd19842824f6bd763863a4e484 (eauger1/centos-qemu-kvm)
495e37
RH-Bugzilla: 2031044
495e37
RH-Acked-by: Gavin Shan <gshan@redhat.com>
495e37
RH-Acked-by: Andrew Jones <drjones@redhat.com>
495e37
RH-Acked-by: Miroslav Rezanina <mrezanin@redhat.com>
495e37
495e37
branch: c9s
495e37
Brew: 42213566
495e37
Upstream: no
495e37
495e37
Register "its" as a class property.  This mirrors what was done
495e37
in commit 27edeeaafe43 ("virt: Register "its" as class property").
495e37
495e37
Signed-off-by: Eric Auger <eric.auger@redhat.com>
495e37
---
495e37
 hw/arm/virt.c | 11 ++++++-----
495e37
 1 file changed, 6 insertions(+), 5 deletions(-)
495e37
495e37
diff --git a/hw/arm/virt.c b/hw/arm/virt.c
495e37
index 7e227b1fa4..984151b7dd 100644
495e37
--- a/hw/arm/virt.c
495e37
+++ b/hw/arm/virt.c
495e37
@@ -3143,6 +3143,12 @@ static void rhel_machine_class_init(ObjectClass *oc, void *data)
495e37
                                           "Set on/off to enable/disable "
495e37
                                           "bypass_iommu for default root bus");
495e37
 
495e37
+    object_class_property_add_bool(oc, "its", virt_get_its,
495e37
+                                   virt_set_its);
495e37
+    object_class_property_set_description(oc, "its",
495e37
+                                          "Set on/off to enable/disable "
495e37
+                                          "ITS instantiation");
495e37
+
495e37
     object_class_property_add_str(oc, "x-oem-id",
495e37
                                   virt_get_oem_id,
495e37
                                   virt_set_oem_id);
495e37
@@ -3182,11 +3188,6 @@ static void rhel_virt_instance_init(Object *obj)
495e37
     } else {
495e37
         /* Default allows ITS instantiation */
495e37
         vms->its = true;
495e37
-        object_property_add_bool(obj, "its", virt_get_its,
495e37
-                                 virt_set_its);
495e37
-        object_property_set_description(obj, "its",
495e37
-                                        "Set on/off to enable/disable "
495e37
-                                        "ITS instantiation");
495e37
     }
495e37
 
495e37
     /* Default disallows iommu instantiation */
495e37
-- 
495e37
2.27.0
495e37