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

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?

> @@ -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;
>   


-- 
error compiling committee.c: too many arguments to function


  reply	other threads:[~2008-11-13 12:27 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 [this message]
2008-11-14  2:27   ` Sheng Yang

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=491C1D21.5090501@redhat.com \
    --to=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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox