From: Paolo Bonzini <pbonzini@redhat.com>
To: Peter Feiner <pfeiner@google.com>,
kvm@vger.kernel.org, drjones@redhat.com
Subject: Re: [kvm-unit-tests PATCH] x86: vmx: fix definition of X86_CR4_VMXE
Date: Tue, 23 Feb 2016 13:14:54 +0100 [thread overview]
Message-ID: <56CC4D3E.906@redhat.com> (raw)
In-Reply-To: <1456184436-31168-1-git-send-email-pfeiner@google.com>
On 23/02/2016 00:40, Peter Feiner wrote:
> Was defined as 0x1 when it should have been 0x2000 (13th bit of CR4).
> See Intel manual 23.7. 0x1 is the VME 'Virtual-8086 Mode Extensions'
> bit, which the vmx tests don't exercise.
>
> The correct bit was being set thanks to IA32_VMX_CR4_FIXED{0,1} MSRs
> forcing it.
>
> I hacked the test setup to forcibly un-set the bit and observed the
> correct #UD VMXON behavior. Adding a test to verify the #UD behavior
> is follow-up work.
>
> Signed-off-by: Peter Feiner <pfeiner@google.com>
> ---
> lib/x86/processor.h | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/lib/x86/processor.h b/lib/x86/processor.h
> index 95cea1a..dff1689 100644
> --- a/lib/x86/processor.h
> +++ b/lib/x86/processor.h
> @@ -21,7 +21,7 @@
> #define X86_CR0_WP 0x00010000
> #define X86_CR0_AM 0x00040000
> #define X86_CR0_PG 0x80000000
> -#define X86_CR4_VMXE 0x00000001
> +#define X86_CR4_VMXE 0x00002000
> #define X86_CR4_TSD 0x00000004
> #define X86_CR4_DE 0x00000008
> #define X86_CR4_PSE 0x00000010
>
Thanks, applying both patches.
Paolo
prev parent reply other threads:[~2016-02-23 12:14 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-02-22 23:40 [kvm-unit-tests PATCH] x86: vmx: fix definition of X86_CR4_VMXE Peter Feiner
2016-02-23 12:14 ` Paolo Bonzini [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=56CC4D3E.906@redhat.com \
--to=pbonzini@redhat.com \
--cc=drjones@redhat.com \
--cc=kvm@vger.kernel.org \
--cc=pfeiner@google.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.