thebeanogamer / rpms / qemu-kvm

Forked from rpms/qemu-kvm 5 months ago
Clone

Blame SOURCES/kvm-s390x-pv-Fix-KVM_PV_PREP_RESET-command-wrapper-name.patch

ddf19c
From f3594f3d84a7442c194b1b9fd288e7414540ec0f Mon Sep 17 00:00:00 2001
ddf19c
From: Thomas Huth <thuth@redhat.com>
ddf19c
Date: Fri, 29 May 2020 05:54:20 -0400
ddf19c
Subject: [PATCH 38/42] s390x: pv: Fix KVM_PV_PREP_RESET command wrapper name
ddf19c
MIME-Version: 1.0
ddf19c
Content-Type: text/plain; charset=UTF-8
ddf19c
Content-Transfer-Encoding: 8bit
ddf19c
ddf19c
RH-Author: Thomas Huth <thuth@redhat.com>
ddf19c
Message-id: <20200529055420.16855-39-thuth@redhat.com>
ddf19c
Patchwork-id: 97051
ddf19c
O-Subject: [RHEL-8.3.0 qemu-kvm PATCH v2 38/38] s390x: pv: Fix KVM_PV_PREP_RESET command wrapper name
ddf19c
Bugzilla: 1828317
ddf19c
RH-Acked-by: Claudio Imbrenda <cimbrend@redhat.com>
ddf19c
RH-Acked-by: Philippe Mathieu-Daudé <philmd@redhat.com>
ddf19c
RH-Acked-by: Cornelia Huck <cohuck@redhat.com>
ddf19c
RH-Acked-by: David Hildenbrand <david@redhat.com>
ddf19c
ddf19c
From: Janosch Frank <frankja@linux.ibm.com>
ddf19c
ddf19c
Upstream: Merged in https://github.com/cohuck/qemu/tree/s390-next
ddf19c
ddf19c
s390_pv_perf_clear_reset() is not a very helpful name since that
ddf19c
function needs to be called for a normal and a clear reset via
ddf19c
diag308.
ddf19c
ddf19c
Let's instead name it s390_pv_prep_reset() which reflects the purpose
ddf19c
of the function a bit better.
ddf19c
ddf19c
Signed-off-by: Janosch Frank <frankja@linux.ibm.com>
ddf19c
Reviewed-by: David Hildenbrand <david@redhat.com>
ddf19c
Message-Id: <20200505124159.24099-1-frankja@linux.ibm.com>
ddf19c
Signed-off-by: Cornelia Huck <cohuck@redhat.com>
ddf19c
(cherry picked from commit f9628f3f6db341751002dac3be18610fa77c01ad)
ddf19c
Signed-off-by: Danilo C. L. de Paula <ddepaula@redhat.com>
ddf19c
---
ddf19c
 hw/s390x/pv.c              | 2 +-
ddf19c
 hw/s390x/s390-virtio-ccw.c | 2 +-
ddf19c
 include/hw/s390x/pv.h      | 4 ++--
ddf19c
 3 files changed, 4 insertions(+), 4 deletions(-)
ddf19c
ddf19c
diff --git a/hw/s390x/pv.c b/hw/s390x/pv.c
ddf19c
index f11868e865..ab3a2482aa 100644
ddf19c
--- a/hw/s390x/pv.c
ddf19c
+++ b/hw/s390x/pv.c
ddf19c
@@ -88,7 +88,7 @@ int s390_pv_unpack(uint64_t addr, uint64_t size, uint64_t tweak)
ddf19c
     return s390_pv_cmd(KVM_PV_UNPACK, &args);
ddf19c
 }
ddf19c
 
ddf19c
-void s390_pv_perf_clear_reset(void)
ddf19c
+void s390_pv_prep_reset(void)
ddf19c
 {
ddf19c
     s390_pv_cmd_exit(KVM_PV_PREP_RESET, NULL);
ddf19c
 }
ddf19c
diff --git a/hw/s390x/s390-virtio-ccw.c b/hw/s390x/s390-virtio-ccw.c
ddf19c
index 07773a12b2..e6ed13b649 100644
ddf19c
--- a/hw/s390x/s390-virtio-ccw.c
ddf19c
+++ b/hw/s390x/s390-virtio-ccw.c
ddf19c
@@ -402,7 +402,7 @@ static void s390_pv_prepare_reset(S390CcwMachineState *ms)
ddf19c
         s390_cpu_set_state(S390_CPU_STATE_STOPPED, S390_CPU(cs));
ddf19c
     }
ddf19c
     s390_pv_unshare();
ddf19c
-    s390_pv_perf_clear_reset();
ddf19c
+    s390_pv_prep_reset();
ddf19c
 }
ddf19c
 
ddf19c
 static void s390_machine_reset(MachineState *machine)
ddf19c
diff --git a/include/hw/s390x/pv.h b/include/hw/s390x/pv.h
ddf19c
index 522ca6a04e..aee758bc2d 100644
ddf19c
--- a/include/hw/s390x/pv.h
ddf19c
+++ b/include/hw/s390x/pv.h
ddf19c
@@ -39,7 +39,7 @@ int s390_pv_vm_enable(void);
ddf19c
 void s390_pv_vm_disable(void);
ddf19c
 int s390_pv_set_sec_parms(uint64_t origin, uint64_t length);
ddf19c
 int s390_pv_unpack(uint64_t addr, uint64_t size, uint64_t tweak);
ddf19c
-void s390_pv_perf_clear_reset(void);
ddf19c
+void s390_pv_prep_reset(void);
ddf19c
 int s390_pv_verify(void);
ddf19c
 void s390_pv_unshare(void);
ddf19c
 void s390_pv_inject_reset_error(CPUState *cs);
ddf19c
@@ -49,7 +49,7 @@ static inline int s390_pv_vm_enable(void) { return 0; }
ddf19c
 static inline void s390_pv_vm_disable(void) {}
ddf19c
 static inline int s390_pv_set_sec_parms(uint64_t origin, uint64_t length) { return 0; }
ddf19c
 static inline int s390_pv_unpack(uint64_t addr, uint64_t size, uint64_t tweak) { return 0; }
ddf19c
-static inline void s390_pv_perf_clear_reset(void) {}
ddf19c
+static inline void s390_pv_prep_reset(void) {}
ddf19c
 static inline int s390_pv_verify(void) { return 0; }
ddf19c
 static inline void s390_pv_unshare(void) {}
ddf19c
 static inline void s390_pv_inject_reset_error(CPUState *cs) {};
ddf19c
-- 
ddf19c
2.27.0
ddf19c