yeahuh / rpms / qemu-kvm

Forked from rpms/qemu-kvm 2 years ago
Clone

Blame SOURCES/kvm-arm-virt-Register-highmem-and-gic-version-as-class-p.patch

a83cc2
From e808acaa50effe471c56a48b80d5e0d2d196b495 Mon Sep 17 00:00:00 2001
a83cc2
From: Eric Auger <eric.auger@redhat.com>
a83cc2
Date: Tue, 25 May 2021 09:22:23 +0200
a83cc2
Subject: [PATCH 01/15] arm/virt: Register highmem and gic-version as class
a83cc2
 properties
a83cc2
a83cc2
RH-Author: Eric Auger <eric.auger@redhat.com>
a83cc2
RH-MergeRequest: 1: Add 9.0.0 and 8.5.0 arm-virt machine types
a83cc2
RH-Commit: [1/2] 1ff3970773e09f2efb194430511928ae852c02ba (eauger1/centos-qemu-kvm)
a83cc2
RH-Bugzilla: 1952449
a83cc2
RH-Acked-by: Miroslav Rezanina <mrezanin@redhat.com>
a83cc2
RH-Acked-by: Gavin Shan <gshan@redhat.com>
a83cc2
RH-Acked-by: Andrew Jones <drjones@redhat.com>
a83cc2
a83cc2
This mirrors changes made in commit
a83cc2
b91def7b8382 ("rm/virt: Register most properties as class properties")
a83cc2
for the highmem and gic-version properties. This makes the
a83cc2
code easier to diff against upstream.
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 | 23 ++++++++++++-----------
a83cc2
 1 file changed, 12 insertions(+), 11 deletions(-)
a83cc2
a83cc2
diff --git a/hw/arm/virt.c b/hw/arm/virt.c
a83cc2
index 080cf54ef1..51a415570c 100644
a83cc2
--- a/hw/arm/virt.c
a83cc2
+++ b/hw/arm/virt.c
a83cc2
@@ -2996,6 +2996,18 @@ static void rhel_machine_class_init(ObjectClass *oc, void *data)
a83cc2
     object_class_property_set_description(oc, "acpi",
a83cc2
         "Enable ACPI");
a83cc2
 
a83cc2
+    object_class_property_add_bool(oc, "highmem", virt_get_highmem,
a83cc2
+                                   virt_set_highmem);
a83cc2
+    object_class_property_set_description(oc, "highmem",
a83cc2
+                                          "Set on/off to enable/disable using "
a83cc2
+                                          "physical address space above 32 bits");
a83cc2
+
a83cc2
+    object_class_property_add_str(oc, "gic-version", virt_get_gic_version,
a83cc2
+                                  virt_set_gic_version);
a83cc2
+    object_class_property_set_description(oc, "gic-version",
a83cc2
+                                          "Set GIC version. "
a83cc2
+                                          "Valid values are 2, 3, host and max");
a83cc2
+
a83cc2
     object_class_property_add_str(oc, "x-oem-id",
a83cc2
                                   virt_get_oem_id,
a83cc2
                                   virt_set_oem_id);
a83cc2
@@ -3004,7 +3016,6 @@ static void rhel_machine_class_init(ObjectClass *oc, void *data)
a83cc2
                                           "in ACPI table header."
a83cc2
                                           "The string may be up to 6 bytes in size");
a83cc2
 
a83cc2
-
a83cc2
     object_class_property_add_str(oc, "x-oem-table-id",
a83cc2
                                   virt_get_oem_table_id,
a83cc2
                                   virt_set_oem_table_id);
a83cc2
@@ -3027,17 +3038,7 @@ static void rhel_virt_instance_init(Object *obj)
a83cc2
 
a83cc2
     /* High memory is enabled by default */
a83cc2
     vms->highmem = true;
a83cc2
-    object_property_add_bool(obj, "highmem", virt_get_highmem,
a83cc2
-                             virt_set_highmem);
a83cc2
-    object_property_set_description(obj, "highmem",
a83cc2
-                                    "Set on/off to enable/disable using "
a83cc2
-                                    "physical address space above 32 bits");
a83cc2
     vms->gic_version = VIRT_GIC_VERSION_NOSEL;
a83cc2
-    object_property_add_str(obj, "gic-version", virt_get_gic_version,
a83cc2
-                        virt_set_gic_version);
a83cc2
-    object_property_set_description(obj, "gic-version",
a83cc2
-                                    "Set GIC version. "
a83cc2
-                                    "Valid values are 2, 3, host and max");
a83cc2
 
a83cc2
     vms->highmem_ecam = !vmc->no_highmem_ecam;
a83cc2
 
a83cc2
-- 
a83cc2
2.27.0
a83cc2