thebeanogamer / rpms / qemu-kvm

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