From: Hollis Blanchard <hollisb@us.ibm.com>
To: Sheng Yang <sheng@linux.intel.com>
Cc: Avi Kivity <avi@redhat.com>, kvm@vger.kernel.org
Subject: Re: [PATCH 1/1] KVM: Fix kernel allocated memory slot
Date: Tue, 11 Nov 2008 08:58:25 -0600 [thread overview]
Message-ID: <1226415505.458.5.camel@localhost.localdomain> (raw)
In-Reply-To: <1226388640-32200-1-git-send-email-sheng@linux.intel.com>
On Tue, 2008-11-11 at 15:30 +0800, Sheng Yang wrote:
> Commit 7fd49de9773fdcb7b75e823b21c1c5dc1e218c14 "KVM: ensure that memslot
> userspace addresses are page-aligned" broke kernel space allocated memory
> slot, for the userspace_addr is invalid.
>
> Signed-off-by: Sheng Yang <sheng@linux.intel.com>
> ---
> virt/kvm/kvm_main.c | 2 +-
> 1 files changed, 1 insertions(+), 1 deletions(-)
>
> diff --git a/virt/kvm/kvm_main.c b/virt/kvm/kvm_main.c
> index 0a0a959..4727c08 100644
> --- a/virt/kvm/kvm_main.c
> +++ b/virt/kvm/kvm_main.c
> @@ -715,7 +715,7 @@ int __kvm_set_memory_region(struct kvm *kvm,
> goto out;
> if (mem->guest_phys_addr & (PAGE_SIZE - 1))
> goto out;
> - if (mem->userspace_addr & (PAGE_SIZE - 1))
> + if (user_alloc && (mem->userspace_addr & (PAGE_SIZE - 1)))
> goto out;
> if (mem->slot >= KVM_MEMORY_SLOTS + KVM_PRIVATE_MEM_SLOTS)
> goto out;
Wow, I didn't realize we still had kernel-allocated guest memory. Why is
that?
Anyways, the above patch seems fine to me.
Acked-by: Hollis Blanchard <hollisb@us.ibm.com>
--
Hollis Blanchard
IBM Linux Technology Center
next prev parent reply other threads:[~2008-11-11 14:58 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-11-11 7:14 [ kvm-Bugs-2260759 ] Can not boot up guest on latest kvm commit a605af SourceForge.net
2008-11-11 7:30 ` [PATCH 1/1] KVM: Fix kernel allocated memory slot Sheng Yang
2008-11-11 14:58 ` Hollis Blanchard [this message]
2008-11-12 1:52 ` Sheng Yang
2008-11-12 1:59 ` Anthony Liguori
2008-11-12 10:09 ` Avi Kivity
2008-11-12 10:07 ` Avi Kivity
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=1226415505.458.5.camel@localhost.localdomain \
--to=hollisb@us.ibm.com \
--cc=avi@redhat.com \
--cc=kvm@vger.kernel.org \
--cc=sheng@linux.intel.com \
/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.