From: Igor Mammedov <imammedo@redhat.com>
To: qemu-devel@nongnu.org
Cc: david@redhat.com, cohuck@redhat.com, pasic@linux.ibm.com,
borntraeger@de.ibm.com, qemu-s390x@nongnu.org, rth@twiddle.net
Subject: [Qemu-devel] [PATCH v4] s390x: remove direct reference to mem_path global from s390x code
Date: Wed, 30 Jan 2019 08:55:06 +0100 [thread overview]
Message-ID: <1548834906-133241-1-git-send-email-imammedo@redhat.com> (raw)
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>
---
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 <david@redhat.com>
---
target/s390x/kvm.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/target/s390x/kvm.c b/target/s390x/kvm.c
index 2ebf26a..8613e19 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;
}
--
2.7.4
next reply other threads:[~2019-01-30 8:07 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-01-30 7:55 Igor Mammedov [this message]
2019-01-30 9:41 ` [Qemu-devel] [PATCH v4] s390x: remove direct reference to mem_path global from s390x code Cornelia Huck
2019-01-30 11:18 ` David Hildenbrand
2019-01-30 12:21 ` Cornelia Huck
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1548834906-133241-1-git-send-email-imammedo@redhat.com \
--to=imammedo@redhat.com \
--cc=borntraeger@de.ibm.com \
--cc=cohuck@redhat.com \
--cc=david@redhat.com \
--cc=pasic@linux.ibm.com \
--cc=qemu-devel@nongnu.org \
--cc=qemu-s390x@nongnu.org \
--cc=rth@twiddle.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).