51 lines
1.6 KiB
Diff
51 lines
1.6 KiB
Diff
|
From 75c705bcd0e6adb903889dd031c6f867a1ca7a63 Mon Sep 17 00:00:00 2001
|
||
|
From: Gavin Shan <gshan@redhat.com>
|
||
|
Date: Wed, 1 Jul 2020 12:24:02 +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: 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>
|
||
|
---
|
||
|
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 07c5c14..c1bc866 100644
|
||
|
--- a/hw/arm/virt.c
|
||
|
+++ b/hw/arm/virt.c
|
||
|
@@ -2713,7 +2713,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);
|
||
|
@@ -2764,6 +2764,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);
|
||
|
--
|
||
|
1.8.3.1
|
||
|
|