From bfacc7d6323c0e258d1b94be058f5047743c32b1 Mon Sep 17 00:00:00 2001 From: "Danilo C. L. de Paula" Date: Thu, 3 Jan 2019 14:45:54 +0000 Subject: [PATCH] * Thu Jan 03 2019 Danilo Cesar Lemes de Paula - 3.1.0-3.el8 - kvm-redhat-define-pseries-rhel8.0.0-machine-type.patch [bz#1656508] - Resolves: bz#1656508 (Machine types for qemu-kvm based on rebase to qemu-3.1 (ppc64le)) --- ...efine-pseries-rhel8.0.0-machine-type.patch | 101 ++++++++++++++++++ qemu-kvm.spec | 9 +- 2 files changed, 109 insertions(+), 1 deletion(-) create mode 100644 kvm-redhat-define-pseries-rhel8.0.0-machine-type.patch diff --git a/kvm-redhat-define-pseries-rhel8.0.0-machine-type.patch b/kvm-redhat-define-pseries-rhel8.0.0-machine-type.patch new file mode 100644 index 0000000..bee8f1d --- /dev/null +++ b/kvm-redhat-define-pseries-rhel8.0.0-machine-type.patch @@ -0,0 +1,101 @@ +From 6eddc4b5d380a5a21b17ca5424a10619ff42ad56 Mon Sep 17 00:00:00 2001 +From: Laurent Vivier +Date: Thu, 20 Dec 2018 14:48:58 +0000 +Subject: [PATCH] redhat: define pseries-rhel8.0.0 machine type + +RH-Author: Laurent Vivier +Message-id: <20181220144858.2598-1-lvivier@redhat.com> +Patchwork-id: 83723 +O-Subject: [RHEL8/rhel qemu-kvm PATCH] redhat: define pseries-rhel8.0.0 machine type +Bugzilla: 1656508 +RH-Acked-by: Thomas Huth +RH-Acked-by: David Gibson +RH-Acked-by: Serhii Popovych + +BZ: https://bugzilla.redhat.com/show_bug.cgi?id=1656508 +BRANCH: rhel8/master-3.1.0 +UPSTREAM: downstream only +BREW: https://brewweb.engineering.redhat.com/brew/taskinfo?taskID=19589897 +BASED-ON: <20181214170211.14267-1-dgilbert@redhat.com> + [RHEL8 qemu-kvm PATCH v3 0/6] 8.0.0 x86 machine types + +Signed-off-by: Laurent Vivier +Signed-off-by: Danilo C. L. de Paula +--- + hw/ppc/spapr.c | 49 +++++++++++++++++++++++++++++++++++++++++++++++-- + 1 file changed, 47 insertions(+), 2 deletions(-) + +diff --git a/hw/ppc/spapr.c b/hw/ppc/spapr.c +index 76a4e83..91d38f9 100644 +--- a/hw/ppc/spapr.c ++++ b/hw/ppc/spapr.c +@@ -4385,19 +4385,64 @@ DEFINE_SPAPR_MACHINE(2_1, "2.1", false); + #endif + + /* ++ * pseries-rhel8.0.0 ++ */ ++ ++static void spapr_machine_rhel800_instance_options(MachineState *machine) ++{ ++} ++ ++static void spapr_machine_rhel800_class_options(MachineClass *mc) ++{ ++ /* Defaults for the latest behaviour inherited from the base class */ ++} ++ ++DEFINE_SPAPR_MACHINE(rhel800, "rhel8.0.0", true); ++ ++/* + * pseries-rhel7.6.0 ++ * like SPAPR_COMPAT_2_12 and SPAPR_COMPAT_3_0 ++ * SPAPR_COMPAT_3_0 is empty + */ ++#define SPAPR_COMPAT_RHEL7_6 \ ++ HW_COMPAT_RHEL7_6 \ ++ { \ ++ .driver = TYPE_POWERPC_CPU, \ ++ .property = "pre-3.0-migration", \ ++ .value = "on", \ ++ }, \ ++ { \ ++ .driver = TYPE_SPAPR_CPU_CORE, \ ++ .property = "pre-3.0-migration", \ ++ .value = "on", \ ++ }, + + static void spapr_machine_rhel760_instance_options(MachineState *machine) + { ++ spapr_machine_rhel800_instance_options(machine); + } + + static void spapr_machine_rhel760_class_options(MachineClass *mc) + { +- /* Defaults for the latest behaviour inherited from the base class */ ++ sPAPRMachineClass *smc = SPAPR_MACHINE_CLASS(mc); ++ ++ spapr_machine_rhel800_class_options(mc); ++ SET_MACHINE_COMPAT(mc, SPAPR_COMPAT_RHEL7_6); ++ ++ /* from spapr_machine_3_0_class_options() */ ++ smc->legacy_irq_allocation = true; ++ smc->irq = &spapr_irq_xics_legacy; ++ ++ /* from spapr_machine_2_12_class_options() */ ++ /* We depend on kvm_enabled() to choose a default value for the ++ * hpt-max-page-size capability. Of course we can't do it here ++ * because this is too early and the HW accelerator isn't initialzed ++ * yet. Postpone this to machine init (see default_caps_with_cpu()). ++ */ ++ smc->default_caps.caps[SPAPR_CAP_HPT_MAXPAGESIZE] = 0; + } + +-DEFINE_SPAPR_MACHINE(rhel760, "rhel7.6.0", true); ++DEFINE_SPAPR_MACHINE(rhel760, "rhel7.6.0", false); + + /* + * pseries-rhel7.6.0-sxxm +-- +1.8.3.1 + diff --git a/qemu-kvm.spec b/qemu-kvm.spec index 7990bc6..0cd861e 100644 --- a/qemu-kvm.spec +++ b/qemu-kvm.spec @@ -68,7 +68,7 @@ Obsoletes: %1-rhev Summary: QEMU is a machine emulator and virtualizer Name: qemu-kvm Version: 3.1.0 -Release: 2%{?dist} +Release: 3%{?dist} # Epoch because we pushed a qemu-1.0 package. AIUI this can't ever be dropped Epoch: 15 License: GPLv2 and GPLv2+ and CC-BY @@ -134,6 +134,8 @@ Patch24: kvm-pc-Add-pc-q35-8.0.0-machine-type.patch Patch25: kvm-pc-Add-x-migrate-smi-count-off-to-PC_RHEL7_6_COMPAT.patch # For bz#1659604 - 8->7 migration failed: qemu-kvm: error: failed to set MSR 0x4b564d02 to 0x27fc13285 Patch26: kvm-clear-out-KVM_ASYNC_PF_DELIVERY_AS_PF_VMEXIT-for.patch +# For bz#1656508 - Machine types for qemu-kvm based on rebase to qemu-3.1 (ppc64le) +Patch27: kvm-redhat-define-pseries-rhel8.0.0-machine-type.patch BuildRequires: zlib-devel BuildRequires: glib2-devel @@ -981,6 +983,11 @@ useradd -r -u 107 -g qemu -G kvm -d / -s /sbin/nologin \ %changelog +* Thu Jan 03 2019 Danilo Cesar Lemes de Paula - 3.1.0-3.el8 +- kvm-redhat-define-pseries-rhel8.0.0-machine-type.patch [bz#1656508] +- Resolves: bz#1656508 + (Machine types for qemu-kvm based on rebase to qemu-3.1 (ppc64le)) + * Fri Dec 21 2018 Danilo Cesar Lemes de Paula - 3.1.0-2.el8 - kvm-pc-7.5-compat-entries.patch [bz#1655820] - kvm-compat-Generic-HW_COMPAT_RHEL7_6.patch [bz#1655820]