thebeanogamer / rpms / qemu-kvm

Forked from rpms/qemu-kvm 5 months ago
Clone

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

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