From 6c200d665b8730ea86104e7aea2d59035b1398e5 Mon Sep 17 00:00:00 2001 From: David Hildenbrand Date: Fri, 21 Dec 2018 14:08:56 +0000 Subject: [PATCH 1/3] hw/s390x/s390-virtio-ccw: Add machine types for RHEL8.0.0 RH-Author: David Hildenbrand Message-id: <20181221150856.26324-3-david@redhat.com> Patchwork-id: 83740 O-Subject: [RHEL8 qemu-kvm PATCH v3 2/2] hw/s390x/s390-virtio-ccw: Add machine types for RHEL8.0.0 Bugzilla: 1656510 RH-Acked-by: Cornelia Huck RH-Acked-by: Thomas Huth RH-Acked-by: Dr. David Alan Gilbert BZ: https://bugzilla.redhat.com/show_bug.cgi?id=1656510 Upstream: n/a (downstream only) Branch: rhel8/master-3.1.0 Downstream s390x machine types for the Advanced Virtualization module. s390mc->hpage_1m_allowed has to stay enabled for the rhel7.6.0 machine, because RHEL 8 supports huge pages. For RHEL 7.6-alt, this is fenced using a different mechanism (bail out if huge pages are used right from the start). Signed-off-by: Thomas Huth Signed-off-by: David Hildenbrand Signed-off-by: Danilo C. L. de Paula --- hw/s390x/s390-virtio-ccw.c | 26 +++++++++++++++++++++++--- 1 file changed, 23 insertions(+), 3 deletions(-) diff --git a/hw/s390x/s390-virtio-ccw.c b/hw/s390x/s390-virtio-ccw.c index 04f4c1a..776a6d6 100644 --- a/hw/s390x/s390-virtio-ccw.c +++ b/hw/s390x/s390-virtio-ccw.c @@ -651,14 +651,14 @@ bool css_migration_enabled(void) } \ type_init(ccw_machine_register_##suffix) +#if 0 /* Disabled for Red Hat Enterprise Linux */ + #define CCW_COMPAT_3_0 \ HW_COMPAT_3_0 #define CCW_COMPAT_2_12 \ HW_COMPAT_2_12 -#if 0 /* Disabled for Red Hat Enterprise Linux */ - #define CCW_COMPAT_2_11 \ HW_COMPAT_2_11 \ {\ @@ -899,6 +899,13 @@ DEFINE_CCW_MACHINE(2_4, "2.4", false); #else /* + * like CCW_COMPAT_2_12 + CCW_COMPAT_3_0 (which are empty), but includes + * HW_COMPAT_RHEL7_6 instead of HW_COMPAT_2_11 and HW_COMPAT_3_0 + */ +#define CCW_COMPAT_RHEL7_6 \ + HW_COMPAT_RHEL7_6 + +/* * like CCW_COMPAT_2_11, but includes HW_COMPAT_RHEL7_5 (derived from * HW_COMPAT_2_11 and HW_COMPAT_2_10) instead of HW_COMPAT_2_11 */ @@ -910,14 +917,26 @@ DEFINE_CCW_MACHINE(2_4, "2.4", false); .value = "off",\ }, +static void ccw_machine_rhel800_instance_options(MachineState *machine) +{ +} + +static void ccw_machine_rhel800_class_options(MachineClass *mc) +{ +} +DEFINE_CCW_MACHINE(rhel800, "rhel8.0.0", true); + static void ccw_machine_rhel760_instance_options(MachineState *machine) { + ccw_machine_rhel800_instance_options(machine); } static void ccw_machine_rhel760_class_options(MachineClass *mc) { + ccw_machine_rhel800_class_options(mc); + SET_MACHINE_COMPAT(mc, CCW_COMPAT_RHEL7_6); } -DEFINE_CCW_MACHINE(rhel760, "rhel7.6.0", true); +DEFINE_CCW_MACHINE(rhel760, "rhel7.6.0", false); static void ccw_machine_rhel750_instance_options(MachineState *machine) { @@ -937,6 +956,7 @@ static void ccw_machine_rhel750_class_options(MachineClass *mc) { ccw_machine_rhel760_class_options(mc); SET_MACHINE_COMPAT(mc, CCW_COMPAT_RHEL7_5); + S390_MACHINE_CLASS(mc)->hpage_1m_allowed = false; } DEFINE_CCW_MACHINE(rhel750, "rhel7.5.0", false); -- 1.8.3.1