summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorIgor Mammedov <imammedo@redhat.com>2019-01-30 08:55:06 +0100
committerCornelia Huck <cohuck@redhat.com>2019-02-04 13:47:50 +0100
commitf6b51efa198d69a9b624a4ccaf8574e892aab78f (patch)
tree1ad1eb21cafb7ea198e721bc2a5603bc8fa16896
parent843caef2ef1fd524de66a035b88a9153350ad392 (diff)
downloadfocaccia-qemu-f6b51efa198d69a9b624a4ccaf8574e892aab78f.tar.gz
focaccia-qemu-f6b51efa198d69a9b624a4ccaf8574e892aab78f.zip
s390x: remove direct reference to mem_path global from s390x code
I plan to deprecate -mem-path option and replace it with memory-backend,
for that it's necessary to get rid of mem_path global variable.
Do it for s390x case, replacing it with alternative way to enable
1Mb hugepages capability.

Todo that replace qemu_mempath_getpagesize() with qemu_getrampagesize()
which also checks for -mem-path provided RAM.

Signed-off-by: Igor Mammedov <imammedo@redhat.com>
Reviewed-by: David Hildenbrand <david@redhat.com>
Message-Id: <1548834906-133241-1-git-send-email-imammedo@redhat.com>
Signed-off-by: Cornelia Huck <cohuck@redhat.com>
-rw-r--r--target/s390x/kvm.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/target/s390x/kvm.c b/target/s390x/kvm.c
index 2ebf26adfe..8613e19d11 100644
--- a/target/s390x/kvm.c
+++ b/target/s390x/kvm.c
@@ -42,6 +42,7 @@
 #include "hw/hw.h"
 #include "sysemu/device_tree.h"
 #include "exec/gdbstub.h"
+#include "exec/ram_addr.h"
 #include "trace.h"
 #include "hw/s390x/s390-pci-inst.h"
 #include "hw/s390x/s390-pci-bus.h"
@@ -287,7 +288,7 @@ void kvm_s390_crypto_reset(void)
 
 static int kvm_s390_configure_mempath_backing(KVMState *s)
 {
-    size_t path_psize = qemu_mempath_getpagesize(mem_path);
+    size_t path_psize = qemu_getrampagesize();
 
     if (path_psize == 4 * KiB) {
         return 0;
@@ -319,7 +320,7 @@ int kvm_arch_init(MachineState *ms, KVMState *s)
 {
     MachineClass *mc = MACHINE_GET_CLASS(ms);
 
-    if (mem_path && kvm_s390_configure_mempath_backing(s)) {
+    if (kvm_s390_configure_mempath_backing(s)) {
         return -EINVAL;
     }