s390x: remove direct reference to mem_path global from s390x code
PATCH v4 1/1 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.
---
v4:
* fix typos in commit message
* add include "exec/ram_addr.h" to make sure it compiles on ppc host
v2:
* s/qemu_mempath_getpagesize/qemu_getrampagesiz/ and drop the rest of changes David Hildenbrand <[email protected]>
--- target/s390x/kvm.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-)
target/s390x/kvm.c +3 -2
@@ -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 ; }
Signature · 1 line
2.7.4
Quoted 8 lines · On Wed, 30 Jan 2019 08:55:06 +0100 Igor Mammedov <[email protected]> wrote:
I plan to deprecate -mem-path option and replace it with memory-backend, for that it's necessary to get rid of
mem_pathglobal variable. Do it for s390x case, replacing it with alternative way to enable 1Mb hugepages capability.Todo that replace
qemu_mempath_getpagesize()withqemu_getrampagesize()which also checks for -mem-path provided RAM.
Quoted 8 lines
Signed-off-by Igor Mammedov <[email protected]>---
v4:
* fix typos in commit message
* add include "exec/ram_addr.h" to make sure it compiles on ppc host
v2:
* s/qemu_mempath_getpagesize/qemu_getrampagesiz/ and drop the rest of changes David Hildenbrand <[email protected]>
Something odd happened here -- I presume you did not want to drop David's R-b?
[I can re-add while applying, no need to resend.]
Quoted 3 lines
--- target/s390x/kvm.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-)
David Hildenbrand
Reviewed-byQuoted 20 lines · Cornelia Huck
Quoted 8 lines · On Wed, 30 Jan 2019 08:55:06 +0100 Igor Mammedov <[email protected]> wrote:
I plan to deprecate -mem-path option and replace it with memory-backend, for that it's necessary to get rid of
mem_pathglobal variable. Do it for s390x case, replacing it with alternative way to enable 1Mb hugepages capability.Todo that replace
qemu_mempath_getpagesize()withqemu_getrampagesize()which also checks for -mem-path provided RAM.Quoted 8 lines
Signed-off-by Igor Mammedov <[email protected]>---
v4:
* fix typos in commit message
* add include "exec/ram_addr.h" to make sure it compiles on ppc host
v2:
* s/qemu_mempath_getpagesize/qemu_getrampagesiz/ and drop the rest of changes David Hildenbrand <[email protected]>
Quoted 5 lines
Something odd happened here -- I presume you did not want to drop David's R-b?
[I can re-add while applying, no need to resend.]
Indeed, please add
Quoted 3 lines
Quoted 3 lines
--- target/s390x/kvm.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-)
Signature · 3 lines
Thanks, David / dhildenb
Quoted 24 lines · On Wed, 30 Jan 2019 12:18:44 +0100 David Hildenbrand <[email protected]> wrote:
Quoted 23 lines · Cornelia Huck
Quoted 8 lines · On Wed, 30 Jan 2019 08:55:06 +0100 Igor Mammedov <[email protected]> wrote:
I plan to deprecate -mem-path option and replace it with memory-backend, for that it's necessary to get rid of
mem_pathglobal variable. Do it for s390x case, replacing it with alternative way to enable 1Mb hugepages capability.Todo that replace
qemu_mempath_getpagesize()withqemu_getrampagesize()which also checks for -mem-path provided RAM.Quoted 8 lines
Signed-off-by Igor Mammedov <[email protected]>---
v4:
* fix typos in commit message
* add include "exec/ram_addr.h" to make sure it compiles on ppc host
v2:
* s/qemu_mempath_getpagesize/qemu_getrampagesiz/ and drop the rest of changes David Hildenbrand <[email protected]>Something odd happened here -- I presume you did not want to drop David's R-b?
Quoted 6 lines
Quoted 2 lines
[I can re-add while applying, no need to resend.]
Indeed, please add
Reviewed-by David Hildenbrand <[email protected]>
Done, and applied. Thanks!
Quoted 6 lines
Quoted 4 lines
Quoted 4 lines
--- target/s390x/kvm.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-)