From: Avi Kivity <avi@redhat.com>
To: Sheng Yang <sheng@linux.intel.com>
Cc: Marcelo Tosatti <mtosatti@redhat.com>, kvm@vger.kernel.org
Subject: Re: [PATCH 3/3] KVM: VMX: Enable EPT 1GB page support
Date: Tue, 05 Jan 2010 12:43:21 +0200 [thread overview]
Message-ID: <4B4317C9.9040900@redhat.com> (raw)
In-Reply-To: <1262686361-11630-4-git-send-email-sheng@linux.intel.com>
On 01/05/2010 12:12 PM, Sheng Yang wrote:
> Signed-off-by: Sheng Yang<sheng@linux.intel.com>
> ---
> arch/x86/include/asm/vmx.h | 1 +
> arch/x86/kvm/mmu.c | 8 +++++---
> arch/x86/kvm/vmx.c | 11 ++++++++++-
> 3 files changed, 16 insertions(+), 4 deletions(-)
>
> diff --git a/arch/x86/include/asm/vmx.h b/arch/x86/include/asm/vmx.h
> index 713ed9a..43f1e9b 100644
> --- a/arch/x86/include/asm/vmx.h
> +++ b/arch/x86/include/asm/vmx.h
> @@ -364,6 +364,7 @@ enum vmcs_field {
> #define VMX_EPTP_UC_BIT (1ull<< 8)
> #define VMX_EPTP_WB_BIT (1ull<< 14)
> #define VMX_EPT_2MB_PAGE_BIT (1ull<< 16)
> +#define VMX_EPT_1GB_PAGE_BIT (1ull<< 17)
>
Can you share when this feature will be available in hardware?
> static int vmx_get_lpage_level(void)
> {
> - return 2; /* PT_DIRECTORY_LEVEL */
> + if (enable_ept&& !cpu_has_vmx_ept_1g_page())
> + return 2; /* PT_DIRECTORY_LEVEL */
> + else
> + /* For shadow and EPT supported 1GB page */
> + return 3; /* PT_PDPE_LEVEL */
> }
>
>
Why not use the defines instead of numbers? It will reduce change when
we change PT_*_LEVEL to be zero based instead of one based.
Patchset looks good; second patch should go into .33 and stable, no?
--
error compiling committee.c: too many arguments to function
next prev parent reply other threads:[~2010-01-05 10:43 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-01-05 10:12 [PATCH 0/3] EPT 1GB page support Sheng Yang
2010-01-05 10:12 ` [PATCH 1/3] KVM: x86: Rename gb_page_enable() to get_lpage_level() in kvm_x86_ops Sheng Yang
2010-01-05 10:12 ` [PATCH 2/3] KVM: x86: Fix host_mapping_level() Sheng Yang
2010-01-05 10:12 ` [PATCH 3/3] KVM: VMX: Enable EPT 1GB page support Sheng Yang
2010-01-05 10:43 ` Avi Kivity [this message]
2010-01-05 10:51 ` 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=4B4317C9.9040900@redhat.com \
--to=avi@redhat.com \
--cc=kvm@vger.kernel.org \
--cc=mtosatti@redhat.com \
--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