thebeanogamer / rpms / qemu-kvm

Forked from rpms/qemu-kvm 5 months ago
Clone

Blame SOURCES/kvm-s390x-s390-virtio-ccw-Switch-off-zPCI-enhancements-o.patch

62547e
From c7b14d3af7c73a3bf0c00911b85f202840d9b414 Mon Sep 17 00:00:00 2001
62547e
From: =?UTF-8?q?C=C3=A9dric=20Le=20Goater?= <clg@redhat.com>
62547e
Date: Mon, 7 Nov 2022 17:13:49 +0100
62547e
Subject: [PATCH 12/42] s390x/s390-virtio-ccw: Switch off zPCI enhancements on
62547e
 older machines
62547e
MIME-Version: 1.0
62547e
Content-Type: text/plain; charset=UTF-8
62547e
Content-Transfer-Encoding: 8bit
62547e
62547e
RH-Author: Cédric Le Goater <clg@redhat.com>
62547e
RH-MergeRequest: 226: s390: Enhanced Interpretation for PCI Functions and Secure Execution guest dump
62547e
RH-Bugzilla: 1664378 2043909
62547e
RH-Acked-by: Thomas Huth <thuth@redhat.com>
62547e
RH-Acked-by: Cornelia Huck <cohuck@redhat.com>
62547e
RH-Acked-by: Jon Maloy <jmaloy@redhat.com>
62547e
RH-Commit: [12/41] 61e32bab6d68ee9abd6a0751944af82e002b05b4
62547e
62547e
zPCI enhancement features (interpretation and forward assist) were
62547e
recently introduced to improve performance on PCI passthrough devices.
62547e
To maintain the same behaviour on older Z machines, deactivate the
62547e
features with the associated properties.
62547e
62547e
Signed-off-by: Cédric Le Goater <clg@redhat.com>
62547e
Message-Id: <20221107161349.1032730-3-clg@kaod.org>
62547e
Reviewed-by: Matthew Rosato <mjrosato@linux.ibm.com>
62547e
Signed-off-by: Thomas Huth <thuth@redhat.com>
62547e
(cherry picked from commit d3d1a406127f7da482eafbdc871c120c2770bb91)
62547e
[ clg: applied zPCI restrictions to rhel8.5.0 machine and below ]
62547e
Signed-off-by: Cédric Le Goater <clg@redhat.com>
62547e
---
62547e
 hw/s390x/s390-virtio-ccw.c | 6 ++++++
62547e
 1 file changed, 6 insertions(+)
62547e
62547e
diff --git a/hw/s390x/s390-virtio-ccw.c b/hw/s390x/s390-virtio-ccw.c
62547e
index bec270598b..bd80e72cf8 100644
62547e
--- a/hw/s390x/s390-virtio-ccw.c
62547e
+++ b/hw/s390x/s390-virtio-ccw.c
62547e
@@ -1130,8 +1130,14 @@ static void ccw_machine_rhel850_instance_options(MachineState *machine)
62547e
 
62547e
 static void ccw_machine_rhel850_class_options(MachineClass *mc)
62547e
 {
62547e
+    static GlobalProperty compat[] = {
62547e
+        { TYPE_S390_PCI_DEVICE, "interpret", "off", },
62547e
+        { TYPE_S390_PCI_DEVICE, "forwarding-assist", "off", },
62547e
+    };
62547e
+
62547e
     ccw_machine_rhel860_class_options(mc);
62547e
     compat_props_add(mc->compat_props, hw_compat_rhel_8_5, hw_compat_rhel_8_5_len);
62547e
+    compat_props_add(mc->compat_props, compat, G_N_ELEMENTS(compat));
62547e
     mc->smp_props.prefer_sockets = true;
62547e
 }
62547e
 DEFINE_CCW_MACHINE(rhel850, "rhel8.5.0", false);
62547e
-- 
62547e
2.37.3
62547e