From: Gleb Natapov <gleb@redhat.com>
To: Paolo Bonzini <pbonzini@redhat.com>
Cc: Arthur Chunqi Li <yzt356@gmail.com>,
kvm@vger.kernel.org, jan kiszka <jan.kiszka@web.de>
Subject: Re: [PATCH v2] KVM: nVMX: Advertise IA32_PAT in VM exit control
Date: Mon, 5 Aug 2013 15:19:06 +0300 [thread overview]
Message-ID: <20130805121905.GG10891@redhat.com> (raw)
In-Reply-To: <1838544614.9556853.1375704211934.JavaMail.root@redhat.com>
On Mon, Aug 05, 2013 at 08:03:31AM -0400, Paolo Bonzini wrote:
>
>
> ----- Original Message -----
> > From: "Arthur Chunqi Li" <yzt356@gmail.com>
> > To: kvm@vger.kernel.org
> > Cc: "jan kiszka" <jan.kiszka@web.de>, gleb@redhat.com, pbonzini@redhat.com, "Arthur Chunqi Li" <yzt356@gmail.com>
> > Sent: Monday, August 5, 2013 1:18:13 PM
> > Subject: [PATCH v2] KVM: nVMX: Advertise IA32_PAT in VM exit control
> >
> > Advertise VM_EXIT_SAVE_IA32_PAT and VM_EXIT_LOAD_IA32_PAT.
> >
> > Signed-off-by: Arthur Chunqi Li <yzt356@gmail.com>
> > ---
> >
> > ChangeLog to v1:
> > Add host features check. Format is the same as "entry controls".
> >
> > arch/x86/kvm/vmx.c | 10 ++++++----
> > 1 file changed, 6 insertions(+), 4 deletions(-)
> >
> > diff --git a/arch/x86/kvm/vmx.c b/arch/x86/kvm/vmx.c
> > index 396572d..fd451c1 100644
> > --- a/arch/x86/kvm/vmx.c
> > +++ b/arch/x86/kvm/vmx.c
> > @@ -2191,14 +2191,16 @@ static __init void nested_vmx_setup_ctls_msrs(void)
> > * If bit 55 of VMX_BASIC is off, bits 0-8 and 10, 11, 13, 14, 16 and
> > * 17 must be 1.
> > */
> > + rdmsr(MSR_IA32_VMX_EXIT_CTLS,
> > + nested_vmx_exit_ctls_low, nested_vmx_exit_ctls_high);
> > nested_vmx_exit_ctls_low = VM_EXIT_ALWAYSON_WITHOUT_TRUE_MSR;
> > + nested_vmx_exit_ctls_high &=
> > + VM_EXIT_LOAD_IA32_PAT | VM_EXIT_SAVE_IA32_PAT;
> > + nested_vmx_exit_ctls_high |= VM_EXIT_ALWAYSON_WITHOUT_TRUE_MSR;
> > /* Note that guest use of VM_EXIT_ACK_INTR_ON_EXIT is not supported. */
> > #ifdef CONFIG_X86_64
> > - nested_vmx_exit_ctls_high = VM_EXIT_HOST_ADDR_SPACE_SIZE;
> > -#else
> > - nested_vmx_exit_ctls_high = 0;
> > + nested_vmx_exit_ctls_high |= VM_EXIT_HOST_ADDR_SPACE_SIZE;
>
> I think you should clear the bit if !X86_64 (and not do anything if
> X86_64, the bit should be already set in MSR_IA32_VMX_EXIT_CTLS).
>
Yes, we do not support 64 bit guests on 32bit host. It means that 32 bit
host is essentially "processors that do not support Intel 64 architecture",
so the control should be zero.
--
Gleb.
prev parent reply other threads:[~2013-08-05 12:19 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-08-05 11:18 [PATCH v2] KVM: nVMX: Advertise IA32_PAT in VM exit control Arthur Chunqi Li
2013-08-05 12:03 ` Paolo Bonzini
2013-08-05 12:19 ` Gleb Natapov [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=20130805121905.GG10891@redhat.com \
--to=gleb@redhat.com \
--cc=jan.kiszka@web.de \
--cc=kvm@vger.kernel.org \
--cc=pbonzini@redhat.com \
--cc=yzt356@gmail.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.