From: David Hildenbrand <david@redhat.com>
To: kvm@vger.kernel.org
Cc: "Paolo Bonzini" <pbonzini@redhat.com>,
"Radim Krčmář" <rkrcmar@redhat.com>,
"Bandan Das" <bsd@redhat.com>
Subject: Re: [PATCH v1 1/2] KVM: VMX: cleanup EPTP definitions
Date: Thu, 10 Aug 2017 22:58:35 +0200 [thread overview]
Message-ID: <e7aad4a4-744a-251c-82db-13b037bb5609@redhat.com> (raw)
In-Reply-To: <20170810133512.13442-2-david@redhat.com>
On 10.08.2017 15:35, David Hildenbrand wrote:
> Don't use shifts, tag them correctly as EPTP and use better matching
> names (PWL vs. GAW).
>
> Signed-off-by: David Hildenbrand <david@redhat.com>
> ---
> arch/x86/include/asm/vmx.h | 11 ++++++-----
> arch/x86/kvm/vmx.c | 25 +++++++++++--------------
> 2 files changed, 17 insertions(+), 19 deletions(-)
>
> diff --git a/arch/x86/include/asm/vmx.h b/arch/x86/include/asm/vmx.h
> index 5f63a2e..929b3fc 100644
> --- a/arch/x86/include/asm/vmx.h
> +++ b/arch/x86/include/asm/vmx.h
> @@ -468,12 +468,13 @@ enum vmcs_field {
> #define VMX_VPID_EXTENT_GLOBAL_CONTEXT_BIT (1ull << 10) /* (42 - 32) */
> #define VMX_VPID_EXTENT_SINGLE_NON_GLOBAL_BIT (1ull << 11) /* (43 - 32) */
>
> -#define VMX_EPT_DEFAULT_GAW 3
> -#define VMX_EPT_MAX_GAW 0x4
> #define VMX_EPT_MT_EPTE_SHIFT 3
> -#define VMX_EPT_GAW_EPTP_SHIFT 3
> -#define VMX_EPT_AD_ENABLE_BIT (1ull << 6)
> -#define VMX_EPT_DEFAULT_MT 0x6ull
> +#define VMX_EPTP_PWL_MASK 0x38ull
> +#define VMX_EPTP_PWL_4 0x38ull
stupid typo, this should be 0x18ull (otherwise you'll get a kernel panic
...)
--
Thanks,
David
next prev parent reply other threads:[~2017-08-10 20:58 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-08-10 13:35 [PATCH v1 0/2] KVM: VMX: require EPTP WB (write-back) support David Hildenbrand
2017-08-10 13:35 ` [PATCH v1 1/2] KVM: VMX: cleanup EPTP definitions David Hildenbrand
2017-08-10 19:38 ` Bandan Das
2017-08-10 19:53 ` David Hildenbrand
2017-08-10 20:58 ` David Hildenbrand [this message]
2017-08-10 13:35 ` [PATCH v1 2/2] KVM: VMX: always require WB memory type for EPT David Hildenbrand
2017-08-10 14:42 ` Paolo Bonzini
2017-08-10 18:30 ` Konrad Rzeszutek Wilk
2017-08-10 20:09 ` David Hildenbrand
2017-08-10 19:40 ` Bandan Das
2017-08-10 19:54 ` David Hildenbrand
2017-08-10 14:23 ` [PATCH v1 0/2] KVM: VMX: require EPTP WB (write-back) support Radim Krčmář
2017-08-10 14:25 ` David Hildenbrand
2017-08-10 16:34 ` Radim Krčmář
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=e7aad4a4-744a-251c-82db-13b037bb5609@redhat.com \
--to=david@redhat.com \
--cc=bsd@redhat.com \
--cc=kvm@vger.kernel.org \
--cc=pbonzini@redhat.com \
--cc=rkrcmar@redhat.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