From: Sheng Yang <sheng@linux.intel.com>
To: Hollis Blanchard <hollisb@us.ibm.com>
Cc: Avi Kivity <avi@redhat.com>, kvm@vger.kernel.org
Subject: Re: [PATCH 1/1] KVM: Fix kernel allocated memory slot
Date: Wed, 12 Nov 2008 09:52:29 +0800 [thread overview]
Message-ID: <200811120952.30232.sheng@linux.intel.com> (raw)
In-Reply-To: <1226415505.458.5.camel@localhost.localdomain>
On Tuesday 11 November 2008 22:58:25 Hollis Blanchard wrote:
> 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>
it's for VMX EPT and APIC access page, as well as TSS pages. We are planning
to change that in the future, but I think it's a quick fix for now.
Thanks.
--
regards
Yang, Sheng
next prev parent reply other threads:[~2008-11-12 1:55 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
2008-11-12 1:52 ` Sheng Yang [this message]
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=200811120952.30232.sheng@linux.intel.com \
--to=sheng@linux.intel.com \
--cc=avi@redhat.com \
--cc=hollisb@us.ibm.com \
--cc=kvm@vger.kernel.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.