From dc5735659369f7adbb9f36f5aafdc6e451ea9c62 Mon Sep 17 00:00:00 2001 From: dgibson Date: Mon, 8 Sep 2014 03:41:45 +0200 Subject: [PATCH 06/14] RHEL only: Replace upstream pseries machine types with RHEL versioned types Message-id: <1410147705-12993-6-git-send-email-dgibson@redhat.com> Patchwork-id: 60895 O-Subject: [PATCH qemu-kvm-rhev RHEV7.1 5/5] RHEL only: Replace upstream pseries machine types with RHEL versioned types Bugzilla: RH-Acked-by: Miroslav Rezanina RH-Acked-by: Laszlo Ersek RH-Acked-by: Paolo Bonzini Now that we're moving to support KVM for POWER on RHEL, do the same thing we do for PC machine types: replace the upstream defined versioned machine types with machine types labelled by RHEL version. This allows safe migration between qemu-kvm on different RHEL versions. This also makes the RHEL labelled machine type the default. Signed-off-by: David Gibson --- hw/ppc/spapr.c | 23 +++++++++++++++++++++-- 1 file changed, 21 insertions(+), 2 deletions(-) Signed-off-by: Miroslav Rezanina --- hw/ppc/spapr.c | 23 +++++++++++++++++++++-- 1 files changed, 21 insertions(+), 2 deletions(-) diff --git a/hw/ppc/spapr.c b/hw/ppc/spapr.c index d01978f..d0f4200 100644 --- a/hw/ppc/spapr.c +++ b/hw/ppc/spapr.c @@ -1583,7 +1583,7 @@ static void spapr_machine_class_init(ObjectClass *oc, void *data) mc->name = "pseries"; mc->desc = "pSeries Logical Partition (PAPR compliant)"; - mc->is_default = 1; + mc->is_default = 0; mc->init = ppc_spapr_init; mc->reset = ppc_spapr_reset; mc->block_default_type = IF_SCSI; @@ -1607,6 +1607,7 @@ static const TypeInfo spapr_machine_info = { }, }; +#if 0 /* Disabled for Red Hat Enterprise Linux */ static void spapr_machine_2_1_class_init(ObjectClass *oc, void *data) { MachineClass *mc = MACHINE_CLASS(oc); @@ -1621,11 +1622,29 @@ static const TypeInfo spapr_machine_2_1_info = { .parent = TYPE_SPAPR_MACHINE, .class_init = spapr_machine_2_1_class_init, }; +#endif + +static void spapr_machine_rhel710_class_init(ObjectClass *oc, void *data) +{ + MachineClass *mc = MACHINE_CLASS(oc); + + mc->name = "pseries-rhel7.1.0"; + mc->desc = "RHEL 7.1.0 pSeries Logical Partition (PAPR compliant)"; + mc->is_default = 1; +} + +static const TypeInfo spapr_machine_rhel710_info = { + .name = TYPE_SPAPR_MACHINE "RHEL7.1.0", + .parent = TYPE_SPAPR_MACHINE, + .class_init = spapr_machine_rhel710_class_init, +}; + static void spapr_machine_register_types(void) { type_register_static(&spapr_machine_info); - type_register_static(&spapr_machine_2_1_info); + /* type_register_static(&spapr_machine_2_1_info); */ + type_register_static(&spapr_machine_rhel710_info); } type_init(spapr_machine_register_types) -- 1.7.1