thebeanogamer / rpms / qemu-kvm

Forked from rpms/qemu-kvm 5 months ago
Clone

Blame SOURCES/kvm-target-s390x-kvm-Enable-adapter-interruption-suppres.patch

77c23f
From c4fe37ae6d75ed72e6a3bde01fea053eb508274c Mon Sep 17 00:00:00 2001
77c23f
From: Thomas Huth <thuth@redhat.com>
77c23f
Date: Fri, 5 Jun 2020 07:41:11 -0400
77c23f
Subject: [PATCH 41/42] target/s390x/kvm: Enable adapter interruption
77c23f
 suppression again
77c23f
MIME-Version: 1.0
77c23f
Content-Type: text/plain; charset=UTF-8
77c23f
Content-Transfer-Encoding: 8bit
77c23f
77c23f
RH-Author: Thomas Huth <thuth@redhat.com>
77c23f
Message-id: <20200605074111.2185-4-thuth@redhat.com>
77c23f
Patchwork-id: 97370
77c23f
O-Subject: [RHEL-8.3.0 qemu-kvm PATCH 3/3] target/s390x/kvm: Enable adapter interruption suppression again
77c23f
Bugzilla: 1756946
77c23f
RH-Acked-by: Philippe Mathieu-Daudé <philmd@redhat.com>
77c23f
RH-Acked-by: Cornelia Huck <cohuck@redhat.com>
77c23f
RH-Acked-by: David Hildenbrand <david@redhat.com>
77c23f
77c23f
The AIS feature has been disabled late in the v2.10 development cycle since
77c23f
there were some issues with migration (see commit 3f2d07b3b01ea61126b -
77c23f
"s390x/ais: for 2.10 stable: disable ais facility"). We originally wanted
77c23f
to enable it again for newer machine types, but apparently we forgot to do
77c23f
this so far. Let's do it now for the machines that support proper CPU models.
77c23f
77c23f
Buglink: https://bugzilla.redhat.com/show_bug.cgi?id=1756946
77c23f
Signed-off-by: Thomas Huth <thuth@redhat.com>
77c23f
Message-Id: <20200122101437.5069-1-thuth@redhat.com>
77c23f
Reviewed-by: David Hildenbrand <david@redhat.com>
77c23f
Tested-by: Matthew Rosato <mjrosato@linux.ibm.com>
77c23f
Signed-off-by: Cornelia Huck <cohuck@redhat.com>
77c23f
(cherry picked from commit a5c8617af6919515b84256978452edf07401c45e)
77c23f
Signed-off-by: Danilo C. L. de Paula <ddepaula@redhat.com>
77c23f
---
77c23f
 target/s390x/kvm.c | 9 ++++++---
77c23f
 1 file changed, 6 insertions(+), 3 deletions(-)
77c23f
77c23f
diff --git a/target/s390x/kvm.c b/target/s390x/kvm.c
77c23f
index c589ef9034..0bbf8f81b0 100644
77c23f
--- a/target/s390x/kvm.c
77c23f
+++ b/target/s390x/kvm.c
77c23f
@@ -377,10 +377,13 @@ int kvm_arch_init(MachineState *ms, KVMState *s)
77c23f
     /*
77c23f
      * The migration interface for ais was introduced with kernel 4.13
77c23f
      * but the capability itself had been active since 4.12. As migration
77c23f
-     * support is considered necessary let's disable ais in the 2.10
77c23f
-     * machine.
77c23f
+     * support is considered necessary, we only try to enable this for
77c23f
+     * newer machine types if KVM_CAP_S390_AIS_MIGRATION is available.
77c23f
      */
77c23f
-    /* kvm_vm_enable_cap(s, KVM_CAP_S390_AIS, 0); */
77c23f
+    if (cpu_model_allowed() && kvm_kernel_irqchip_allowed() &&
77c23f
+        kvm_check_extension(s, KVM_CAP_S390_AIS_MIGRATION)) {
77c23f
+        kvm_vm_enable_cap(s, KVM_CAP_S390_AIS, 0);
77c23f
+    }
77c23f
 
77c23f
     kvm_set_max_memslot_size(KVM_SLOT_MAX_BYTES);
77c23f
     return 0;
77c23f
-- 
77c23f
2.27.0
77c23f