thebeanogamer / rpms / qemu-kvm

Forked from rpms/qemu-kvm 5 months ago
Clone
a83cc2
From 42e530c513914b83273ec8c6a29100eb3c737604 Mon Sep 17 00:00:00 2001
a83cc2
From: Eric Auger <eric.auger@redhat.com>
a83cc2
Date: Wed, 30 Jun 2021 07:28:38 -0400
a83cc2
Subject: [PATCH 01/13] arm/virt: Register iommu as a class property
a83cc2
a83cc2
RH-Author: Eric Auger <eric.auger@redhat.com>
a83cc2
RH-MergeRequest: 19: arm/virt: Support RAS
a83cc2
RH-Commit: [1/3] 48428de4deb5af94891aa5552fb9f4ea6d69acef (eauger1/centos-qemu-kvm)
a83cc2
RH-Bugzilla: 1838608
a83cc2
RH-Acked-by: Gavin Shan <gshan@redhat.com>
a83cc2
RH-Acked-by: Andrew Jones <drjones@redhat.com>
a83cc2
RH-Acked-by: Igor Mammedov <imammedo@redhat.com>
a83cc2
a83cc2
As done for highmem and gic-version, let's register the iommu property
a83cc2
as a class property. This is closer to the upstream code. This
a83cc2
change was originally made by upstream commit:
a83cc2
b91def7b8382 ("arm/virt: Register most properties as class properties")
a83cc2
a83cc2
Signed-off-by: Eric Auger <eric.auger@redhat.com>
a83cc2
Signed-off-by: Miroslav Rezanina <mrezanin@redhat.com>
a83cc2
---
a83cc2
 hw/arm/virt.c | 9 +++++----
a83cc2
 1 file changed, 5 insertions(+), 4 deletions(-)
a83cc2
a83cc2
diff --git a/hw/arm/virt.c b/hw/arm/virt.c
a83cc2
index e4aa794f83..bdae24a753 100644
a83cc2
--- a/hw/arm/virt.c
a83cc2
+++ b/hw/arm/virt.c
a83cc2
@@ -3008,6 +3008,11 @@ static void rhel_machine_class_init(ObjectClass *oc, void *data)
a83cc2
                                           "Set GIC version. "
a83cc2
                                           "Valid values are 2, 3, host and max");
a83cc2
 
a83cc2
+    object_class_property_add_str(oc, "iommu", virt_get_iommu, virt_set_iommu);
a83cc2
+    object_class_property_set_description(oc, "iommu",
a83cc2
+                                          "Set the IOMMU type. "
a83cc2
+                                          "Valid values are none and smmuv3");
a83cc2
+
a83cc2
     object_class_property_add_str(oc, "x-oem-id",
a83cc2
                                   virt_get_oem_id,
a83cc2
                                   virt_set_oem_id);
a83cc2
@@ -3056,10 +3061,6 @@ static void rhel_virt_instance_init(Object *obj)
a83cc2
 
a83cc2
     /* Default disallows iommu instantiation */
a83cc2
     vms->iommu = VIRT_IOMMU_NONE;
a83cc2
-    object_property_add_str(obj, "iommu", virt_get_iommu, virt_set_iommu);
a83cc2
-    object_property_set_description(obj, "iommu",
a83cc2
-                                    "Set the IOMMU type. "
a83cc2
-                                    "Valid values are none and smmuv3");
a83cc2
 
a83cc2
     /* Default disallows RAS instantiation and is non-configurable for RHEL */
a83cc2
     vms->ras = false;
a83cc2
-- 
a83cc2
2.27.0
a83cc2