public inbox for kvm@vger.kernel.org
 help / color / mirror / Atom feed
From: Sheng Yang <sheng@linux.intel.com>
To: Avi Kivity <avi@redhat.com>
Cc: kvm@vger.kernel.org
Subject: Re: [PATCH 1/1] KVM: VMX: Clean up private memory slot allocation
Date: Fri, 14 Nov 2008 10:27:25 +0800	[thread overview]
Message-ID: <200811141027.25895.sheng@linux.intel.com> (raw)
In-Reply-To: <491C1D21.5090501@redhat.com>

On Thursday 13 November 2008 20:27:13 Avi Kivity wrote:
> Sheng Yang wrote:
> > userspace_addr should be a meaningless value.
>
> Perhaps in __kvm_set_memory_region(), if !user_alloc?
>
> Why is it needed?  Did you observe any problem?

A potential issue is kvm_userspace_mem.userspace_addr don't have value, so for 
the recent case, it won't show stably everytime... So I think it's a potential 
issue, to prevent further confusing on this (if necessary).

-- 
regards
Yang, Sheng

>
> > @@ -2022,6 +2022,8 @@ static int alloc_apic_access_page(struct kvm *kvm)
> >  	kvm_userspace_mem.flags = 0;
> >  	kvm_userspace_mem.guest_phys_addr = 0xfee00000ULL;
> >  	kvm_userspace_mem.memory_size = PAGE_SIZE;
> > +	/* userspace_addr is invalid, make it unaligned */
> > +	kvm_userspace_mem.userspace_addr = PAGE_SIZE - 1;
> >  	r = __kvm_set_memory_region(kvm, &kvm_userspace_mem, 0);
> >  	if (r)
> >  		goto out;
> > @@ -2044,6 +2046,8 @@ static int alloc_identity_pagetable(struct kvm
> > *kvm) kvm_userspace_mem.flags = 0;
> >  	kvm_userspace_mem.guest_phys_addr = VMX_EPT_IDENTITY_PAGETABLE_ADDR;
> >  	kvm_userspace_mem.memory_size = PAGE_SIZE;
> > +	/* userspace_addr is invalid, make it unaligned */
> > +	kvm_userspace_mem.userspace_addr = PAGE_SIZE - 1;
> >  	r = __kvm_set_memory_region(kvm, &kvm_userspace_mem, 0);
> >  	if (r)
> >  		goto out;


      reply	other threads:[~2008-11-14  2:30 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-11-11  7:31 [PATCH 1/1] KVM: VMX: Clean up private memory slot allocation Sheng Yang
2008-11-13 12:27 ` Avi Kivity
2008-11-14  2:27   ` Sheng Yang [this message]

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=200811141027.25895.sheng@linux.intel.com \
    --to=sheng@linux.intel.com \
    --cc=avi@redhat.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox