From: Jan Kiszka <jan.kiszka@siemens.com>
To: Anthony Liguori <anthony@codemonkey.ws>
Cc: Liu Yu-B13201 <Yu.Liu@freescale.com>,
qemu-devel <qemu-devel@nongnu.org>,
Hollis Blanchard <hollisb@us.ibm.com>
Subject: [Qemu-devel] [PATCH] kvm: Relax aligment check of kvm_set_phys_mem
Date: Thu, 30 Apr 2009 10:17:39 +0200 [thread overview]
Message-ID: <49F95EA3.9020600@siemens.com> (raw)
There is no need to reject an unaligned memory region registration if
the region will be I/O memory and it will not split an existing KVM
slot. This fixes KVM support on PPC.
Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
---
kvm-all.c | 10 +++++++++-
1 files changed, 9 insertions(+), 1 deletions(-)
diff --git a/kvm-all.c b/kvm-all.c
index 32cd636..0da5c7a 100644
--- a/kvm-all.c
+++ b/kvm-all.c
@@ -583,7 +583,15 @@ void kvm_set_phys_mem(target_phys_addr_t start_addr,
int err;
if (start_addr & ~TARGET_PAGE_MASK) {
- fprintf(stderr, "Only page-aligned memory slots supported\n");
+ if (flags >= IO_MEM_UNASSIGNED) {
+ if (!kvm_lookup_overlapping_slot(s, start_addr,
+ start_addr + size)) {
+ return;
+ }
+ fprintf(stderr, "Unaligned split of a KVM memory slot\n");
+ } else {
+ fprintf(stderr, "Only page-aligned memory slots supported\n");
+ }
abort();
}
reply other threads:[~2009-04-30 8:17 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=49F95EA3.9020600@siemens.com \
--to=jan.kiszka@siemens.com \
--cc=Yu.Liu@freescale.com \
--cc=anthony@codemonkey.ws \
--cc=hollisb@us.ibm.com \
--cc=qemu-devel@nongnu.org \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.