From 1b2adb97f32594ecc88eebb52624fbe09a759b60 Mon Sep 17 00:00:00 2001 From: "Danilo C. L. de Paula" Date: Fri, 11 Jan 2019 13:46:39 +0000 Subject: [PATCH] * Fri Jan 11 2019 Danilo Cesar Lemes de Paula - 3.1.0-4.el8 - kvm-hw-s390x-s390-virtio-ccw-Add-machine-types-for-RHEL8.patch [bz#1656510] - kvm-spapr-Add-H-Call-H_HOME_NODE_ASSOCIATIVITY.patch [bz#1661967] - kvm-redhat-Fixing-.gitpublish-to-include-AV-information.patch [] - Resolves: bz#1656510 (Machine types for qemu-kvm based on rebase to qemu-3.1 (s390x)) - Resolves: bz#1661967 (Kernel prints the message "VPHN is not supported. Disabling polling...") --- ...rtio-ccw-Add-machine-types-for-RHEL8.patch | 106 +++++++++++++++ ...Add-H-Call-H_HOME_NODE_ASSOCIATIVITY.patch | 124 ++++++++++++++++++ qemu-kvm.spec | 14 +- 3 files changed, 243 insertions(+), 1 deletion(-) create mode 100644 kvm-hw-s390x-s390-virtio-ccw-Add-machine-types-for-RHEL8.patch create mode 100644 kvm-spapr-Add-H-Call-H_HOME_NODE_ASSOCIATIVITY.patch diff --git a/kvm-hw-s390x-s390-virtio-ccw-Add-machine-types-for-RHEL8.patch b/kvm-hw-s390x-s390-virtio-ccw-Add-machine-types-for-RHEL8.patch new file mode 100644 index 0000000..592fe51 --- /dev/null +++ b/kvm-hw-s390x-s390-virtio-ccw-Add-machine-types-for-RHEL8.patch @@ -0,0 +1,106 @@ +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 + diff --git a/kvm-spapr-Add-H-Call-H_HOME_NODE_ASSOCIATIVITY.patch b/kvm-spapr-Add-H-Call-H_HOME_NODE_ASSOCIATIVITY.patch new file mode 100644 index 0000000..48f2d8b --- /dev/null +++ b/kvm-spapr-Add-H-Call-H_HOME_NODE_ASSOCIATIVITY.patch @@ -0,0 +1,124 @@ +From 41c461465fb5b0d23f5826cd4b62a78f25607420 Mon Sep 17 00:00:00 2001 +From: Laurent Vivier +Date: Thu, 3 Jan 2019 12:51:40 +0000 +Subject: [PATCH 2/3] spapr: Add H-Call H_HOME_NODE_ASSOCIATIVITY + +RH-Author: Laurent Vivier +Message-id: <20190103135140.13948-2-lvivier@redhat.com> +Patchwork-id: 83848 +O-Subject: [RHEL8/rhel qemu-kvm PATCH 1/1] spapr: Add H-Call H_HOME_NODE_ASSOCIATIVITY +Bugzilla: 1661967 +RH-Acked-by: Serhii Popovych +RH-Acked-by: Thomas Huth +RH-Acked-by: David Gibson + +BZ: https://bugzilla.redhat.com/show_bug.cgi?id=1661967 + +H_HOME_NODE_ASSOCIATIVITY H-Call returns the associativity domain +designation associated with the identifier input parameter + +This fixes a crash when we try to hotplug a CPU in memory-less and +CPU-less numa node. In this case, the kernel tries to online the +node, but without the information provided by this h-call, the node id, +it cannot and the CPU is started while the node is not onlined. + +It also removes the warning message from the kernel: + VPHN is not supported. Disabling polling.. + +Signed-off-by: Laurent Vivier +Reviewed-by: Greg Kurz +Signed-off-by: David Gibson +(cherry picked from commit c24ba3d0a34f68ad2c6bf1a15bc43770005f6cc0) +Signed-off-by: Laurent Vivier +Signed-off-by: Danilo C. L. de Paula +--- + hw/ppc/spapr.c | 1 + + hw/ppc/spapr_hcall.c | 40 ++++++++++++++++++++++++++++++++++++++++ + include/hw/ppc/spapr.h | 1 + + 3 files changed, 42 insertions(+) + +diff --git a/hw/ppc/spapr.c b/hw/ppc/spapr.c +index 91d38f9..d5d2eb4 100644 +--- a/hw/ppc/spapr.c ++++ b/hw/ppc/spapr.c +@@ -1051,6 +1051,7 @@ static void spapr_dt_rtas(sPAPRMachineState *spapr, void *fdt) + add_str(hypertas, "hcall-sprg0"); + add_str(hypertas, "hcall-copy"); + add_str(hypertas, "hcall-debug"); ++ add_str(hypertas, "hcall-vphn"); + add_str(qemu_hypertas, "hcall-memop1"); + + if (!kvm_enabled() || kvmppc_spapr_use_multitce()) { +diff --git a/hw/ppc/spapr_hcall.c b/hw/ppc/spapr_hcall.c +index ae913d0..f131c7e 100644 +--- a/hw/ppc/spapr_hcall.c ++++ b/hw/ppc/spapr_hcall.c +@@ -1663,6 +1663,42 @@ static target_ulong h_client_architecture_support(PowerPCCPU *cpu, + return H_SUCCESS; + } + ++static target_ulong h_home_node_associativity(PowerPCCPU *cpu, ++ sPAPRMachineState *spapr, ++ target_ulong opcode, ++ target_ulong *args) ++{ ++ target_ulong flags = args[0]; ++ target_ulong procno = args[1]; ++ PowerPCCPU *tcpu; ++ int idx; ++ ++ /* only support procno from H_REGISTER_VPA */ ++ if (flags != 0x1) { ++ return H_FUNCTION; ++ } ++ ++ tcpu = spapr_find_cpu(procno); ++ if (tcpu == NULL) { ++ return H_P2; ++ } ++ ++ /* sequence is the same as in the "ibm,associativity" property */ ++ ++ idx = 0; ++#define ASSOCIATIVITY(a, b) (((uint64_t)(a) << 32) | \ ++ ((uint64_t)(b) & 0xffffffff)) ++ args[idx++] = ASSOCIATIVITY(0, 0); ++ args[idx++] = ASSOCIATIVITY(0, tcpu->node_id); ++ args[idx++] = ASSOCIATIVITY(procno, -1); ++ for ( ; idx < 6; idx++) { ++ args[idx] = -1; ++ } ++#undef ASSOCIATIVITY ++ ++ return H_SUCCESS; ++} ++ + static target_ulong h_get_cpu_characteristics(PowerPCCPU *cpu, + sPAPRMachineState *spapr, + target_ulong opcode, +@@ -1822,6 +1858,10 @@ static void hypercall_register_types(void) + + /* ibm,client-architecture-support support */ + spapr_register_hypercall(KVMPPC_H_CAS, h_client_architecture_support); ++ ++ /* Virtual Processor Home Node */ ++ spapr_register_hypercall(H_HOME_NODE_ASSOCIATIVITY, ++ h_home_node_associativity); + } + + type_init(hypercall_register_types) +diff --git a/include/hw/ppc/spapr.h b/include/hw/ppc/spapr.h +index d2370e5..0cc123e 100644 +--- a/include/hw/ppc/spapr.h ++++ b/include/hw/ppc/spapr.h +@@ -442,6 +442,7 @@ struct sPAPRMachineState { + #define H_GET_EM_PARMS 0x2B8 + #define H_SET_MPP 0x2D0 + #define H_GET_MPP 0x2D4 ++#define H_HOME_NODE_ASSOCIATIVITY 0x2EC + #define H_XIRR_X 0x2FC + #define H_RANDOM 0x300 + #define H_SET_MODE 0x31C +-- +1.8.3.1 + diff --git a/qemu-kvm.spec b/qemu-kvm.spec index 0cd861e..cdc387b 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: 3%{?dist} +Release: 4%{?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 @@ -136,6 +136,10 @@ Patch25: kvm-pc-Add-x-migrate-smi-count-off-to-PC_RHEL7_6_COMPAT.patch 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 +# For bz#1656510 - Machine types for qemu-kvm based on rebase to qemu-3.1 (s390x) +Patch28: kvm-hw-s390x-s390-virtio-ccw-Add-machine-types-for-RHEL8.patch +# For bz#1661967 - Kernel prints the message "VPHN is not supported. Disabling polling..." +Patch29: kvm-spapr-Add-H-Call-H_HOME_NODE_ASSOCIATIVITY.patch BuildRequires: zlib-devel BuildRequires: glib2-devel @@ -983,6 +987,14 @@ useradd -r -u 107 -g qemu -G kvm -d / -s /sbin/nologin \ %changelog +* Fri Jan 11 2019 Danilo Cesar Lemes de Paula - 3.1.0-4.el8 +- kvm-hw-s390x-s390-virtio-ccw-Add-machine-types-for-RHEL8.patch [bz#1656510] +- kvm-spapr-Add-H-Call-H_HOME_NODE_ASSOCIATIVITY.patch [bz#1661967] +- Resolves: bz#1656510 + (Machine types for qemu-kvm based on rebase to qemu-3.1 (s390x)) +- Resolves: bz#1661967 + (Kernel prints the message "VPHN is not supported. Disabling polling...") + * 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