qemu-kvm/0028-hw-arm-Introduce-rhel_...

54 lines
1.7 KiB
Diff

From 46d5a797986373ecc0dfa578cae07a3641847935 Mon Sep 17 00:00:00 2001
From: Gavin Shan <gshan@redhat.com>
Date: Wed, 12 Aug 2020 10:58:04 +0200
Subject: hw/arm: Introduce rhel_virt_instance_init() helper
RH-Author: Gavin Shan <gshan@redhat.com>
Message-id: <20200629022939.76453-3-gshan@redhat.com>
Patchwork-id: 97838
O-Subject: [RHEL-AV 8.3.0 qemu-kvm PATCH v4 2/3] hw/arm: Introduce rhel_virt_instance_init() helper
Bugzilla: 1818843
RH-Acked-by: Auger Eric <eric.auger@redhat.com>
RH-Acked-by: Miroslav Rezanina <mrezanin@redhat.com>
RH-Acked-by: Andrew Jones <drjones@redhat.com>
This introduces rhel_virt_instance_init() helper function so that
it can be shared by rhel820 and rhel830 machine. This shouldn't
cause functional changes.
Signed-off-by: Gavin Shan <gshan@redhat.com>
Signed-off-by: Miroslav Rezanina <mrezanin@redhat.com>
Signed-off-by: Danilo C. L. de Paula <ddepaula@redhat.com>
---
hw/arm/virt.c | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/hw/arm/virt.c b/hw/arm/virt.c
index c22e1e6d5c..650668a8d1 100644
--- a/hw/arm/virt.c
+++ b/hw/arm/virt.c
@@ -2788,7 +2788,7 @@ static void rhel_machine_init(void)
}
type_init(rhel_machine_init);
-static void rhel820_virt_instance_init(Object *obj)
+static void rhel_virt_instance_init(Object *obj)
{
VirtMachineState *vms = VIRT_MACHINE(obj);
VirtMachineClass *vmc = VIRT_MACHINE_GET_CLASS(vms);
@@ -2841,6 +2841,11 @@ static void rhel820_virt_instance_init(Object *obj)
virt_flash_create(vms);
}
+static void rhel820_virt_instance_init(Object *obj)
+{
+ rhel_virt_instance_init(obj);
+}
+
static void rhel820_virt_options(MachineClass *mc)
{
compat_props_add(mc->compat_props, arm_rhel_compat, arm_rhel_compat_len);
--
2.27.0