public inbox for kvm@vger.kernel.org
 help / color / mirror / Atom feed
From: Avi Kivity <avi@qumranet.com>
To: "Yang, Sheng" <sheng.yang@intel.com>
Cc: kvm-devel <kvm-devel@lists.sourceforge.net>
Subject: Re: [PATCH 8/8] KVM: VMX: Enable EPT feature for KVM
Date: Sun, 27 Apr 2008 12:37:47 +0300	[thread overview]
Message-ID: <4814496B.2080101@qumranet.com> (raw)
In-Reply-To: <200804251627.38029.sheng.yang@intel.com>

Yang, Sheng wrote:
> From 592b7855a88266fa19505f0d51fe12ec0eadfa62 Mon Sep 17 00:00:00 2001
> From: Sheng Yang <sheng.yang@intel.com>
> Date: Fri, 25 Apr 2008 22:14:06 +0800
> Subject: [PATCH 8/8] KVM: VMX: Enable EPT feature for KVM
>
>
>
>   

Scratch my earlier __direct_map comment.

> diff --git a/arch/x86/kvm/mmu.c b/arch/x86/kvm/mmu.c
> index 3dbedf1..7a8640a 100644
> --- a/arch/x86/kvm/mmu.c
> +++ b/arch/x86/kvm/mmu.c
> @@ -1177,8 +1177,15 @@ static int __direct_map(struct kvm_vcpu *vcpu, gpa_t v, 
> int write,
>  				return -ENOMEM;
>  			}
>
> -			table[index] = __pa(new_table->spt) | PT_PRESENT_MASK
> -				| PT_WRITABLE_MASK | shadow_user_mask;
> +			if (shadow_user_mask)
> +				table[index] = __pa(new_table->spt)
> +					| PT_PRESENT_MASK | PT_WRITABLE_MASK
> +					| shadow_user_mask;
> +			else
> +				table[index] = __pa(new_table->spt)
> +					| PT_PRESENT_MASK | PT_WRITABLE_MASK
> +					| shadow_x_mask;
>   

Why not do, unconditionally:

+			table[index] = __pa(new_table->spt) | PT_PRESENT_MASK
+				| PT_WRITABLE_MASK | shadow_user_mask | shadow_x_mask;


?

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


-------------------------------------------------------------------------
This SF.net email is sponsored by the 2008 JavaOne(SM) Conference 
Don't miss this year's exciting event. There's still time to save $100. 
Use priority code J8TL2D2. 
http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone

  reply	other threads:[~2008-04-27  9:37 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-04-25  8:27 [PATCH 8/8] KVM: VMX: Enable EPT feature for KVM Yang, Sheng
2008-04-27  9:37 ` Avi Kivity [this message]
2008-04-28  4:46   ` Yang, Sheng
2008-04-28  9:19     ` 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=4814496B.2080101@qumranet.com \
    --to=avi@qumranet.com \
    --cc=kvm-devel@lists.sourceforge.net \
    --cc=sheng.yang@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