cryptospore / rpms / qemu-kvm

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