thebeanogamer / rpms / qemu-kvm

Forked from rpms/qemu-kvm 5 months ago
Clone
ed5979
From 51fcf352a97f2e99a6a3fb8ae663b45436304120 Mon Sep 17 00:00:00 2001
ed5979
From: =?UTF-8?q?C=C3=A9dric=20Le=20Goater?= <clg@redhat.com>
ed5979
Date: Tue, 10 Jan 2023 14:25:34 +0100
ed5979
Subject: [PATCH 11/31] s390x/s390-virtio-ccw: Activate zPCI features on
ed5979
 s390-ccw-virtio-rhel8.6.0
ed5979
MIME-Version: 1.0
ed5979
Content-Type: text/plain; charset=UTF-8
ed5979
Content-Transfer-Encoding: 8bit
ed5979
ed5979
RH-Author: Cédric Le Goater <clg@redhat.com>
ed5979
RH-MergeRequest: 133: s390x/s390-virtio-ccw: Activate zPCI features on s390-ccw-virtio-rhel8.6.0
ed5979
RH-Bugzilla: 2159408
ed5979
RH-Acked-by: Thomas Huth <thuth@redhat.com>
ed5979
RH-Acked-by: David Hildenbrand <david@redhat.com>
ed5979
RH-Acked-by: Miroslav Rezanina <mrezanin@redhat.com>
ed5979
RH-Commit: [1/1] 1ed82e56fe74a283a1726c4893dc3387e645072c (clegoate/qemu-kvm-c9s)
ed5979
ed5979
commit c7b14d3af7 ("s390x/s390-virtio-ccw: Switch off zPCI enhancements
ed5979
on older machines") activated zPCI enhancement features (interpretation
ed5979
and forward assist) silently on the s390-ccw-virtio-rhel8.6.0 machine
ed5979
for RHEL8.8. It didn't seem to be a problem since migration is not
ed5979
possible but it broke LEAPP upgrade to RHEL9 when the machine is
ed5979
defined with a passthrough device. Activate the zPCI features also on
ed5979
RHEL9.2 for the machines to be alike in both latest RHEL distros.
ed5979
ed5979
Upstream Status: RHEL-only
ed5979
Bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=2159408
ed5979
ed5979
Signed-off-by: Cédric Le Goater <clg@redhat.com>
ed5979
---
ed5979
 hw/s390x/s390-virtio-ccw.c | 12 ++++++++++++
ed5979
 1 file changed, 12 insertions(+)
ed5979
ed5979
diff --git a/hw/s390x/s390-virtio-ccw.c b/hw/s390x/s390-virtio-ccw.c
ed5979
index aa142a1a4e..4cdd59c394 100644
ed5979
--- a/hw/s390x/s390-virtio-ccw.c
ed5979
+++ b/hw/s390x/s390-virtio-ccw.c
ed5979
@@ -1234,8 +1234,14 @@ static void ccw_machine_rhel860_instance_options(MachineState *machine)
ed5979
 
ed5979
 static void ccw_machine_rhel860_class_options(MachineClass *mc)
ed5979
 {
ed5979
+    static GlobalProperty compat[] = {
ed5979
+        { TYPE_S390_PCI_DEVICE, "interpret", "on", },
ed5979
+        { TYPE_S390_PCI_DEVICE, "forwarding-assist", "on", },
ed5979
+    };
ed5979
+
ed5979
     ccw_machine_rhel900_class_options(mc);
ed5979
     compat_props_add(mc->compat_props, hw_compat_rhel_8_6, hw_compat_rhel_8_6_len);
ed5979
+    compat_props_add(mc->compat_props, compat, G_N_ELEMENTS(compat));
ed5979
 
ed5979
     /* All RHEL machines for prior major releases are deprecated */
ed5979
     mc->deprecation_reason = rhel_old_machine_deprecation;
ed5979
@@ -1259,8 +1265,14 @@ static void ccw_machine_rhel850_instance_options(MachineState *machine)
ed5979
 
ed5979
 static void ccw_machine_rhel850_class_options(MachineClass *mc)
ed5979
 {
ed5979
+    static GlobalProperty compat[] = {
ed5979
+        { TYPE_S390_PCI_DEVICE, "interpret", "off", },
ed5979
+        { TYPE_S390_PCI_DEVICE, "forwarding-assist", "off", },
ed5979
+    };
ed5979
+
ed5979
     ccw_machine_rhel860_class_options(mc);
ed5979
     compat_props_add(mc->compat_props, hw_compat_rhel_8_5, hw_compat_rhel_8_5_len);
ed5979
+    compat_props_add(mc->compat_props, compat, G_N_ELEMENTS(compat));
ed5979
     mc->smp_props.prefer_sockets = true;
ed5979
 }
ed5979
 DEFINE_CCW_MACHINE(rhel850, "rhel8.5.0", false);
ed5979
-- 
ed5979
2.31.1
ed5979