From mboxrd@z Thu Jan 1 00:00:00 1970 From: Gleb Natapov Subject: Re: [PATCH] KVM: nVMX: Advertise IA32_PAT in VM exit control Date: Mon, 5 Aug 2013 14:05:34 +0300 Message-ID: <20130805110533.GB10891@redhat.com> References: <1375693835-10988-1-git-send-email-yzt356@gmail.com> <20130805093349.GI2258@redhat.com> <51FF80A8.5000309@web.de> <20130805105500.GA10891@redhat.com> <51FF86B9.4010303@web.de> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: Arthur Chunqi Li , "kvm@vger.kernel.org" , "pbonzini@redhat.com" To: Jan Kiszka Return-path: Received: from mx1.redhat.com ([209.132.183.28]:52576 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754413Ab3HELFg (ORCPT ); Mon, 5 Aug 2013 07:05:36 -0400 Content-Disposition: inline In-Reply-To: <51FF86B9.4010303@web.de> Sender: kvm-owner@vger.kernel.org List-ID: On Mon, Aug 05, 2013 at 01:04:25PM +0200, Jan Kiszka wrote: > On 2013-08-05 13:00, Arthur Chunqi Li wrote: > > On Mon, Aug 5, 2013 at 6:55 PM, Gleb Natapov wrote: > >> On Mon, Aug 05, 2013 at 12:38:32PM +0200, Jan Kiszka wrote: > >>> On 2013-08-05 11:36, Gmail wrote: > >>>> > >>>> > >>>>> On Mon, Aug 05, 2013 at 05:10:35PM +0800, Arthur Chunqi Li wrote: > >>>>>> Advertise VM_EXIT_SAVE_IA32_PAT and VM_EXIT_LOAD_IA32_PAT. > >>>>>> > >>>>>> Signed-off-by: Arthur Chunqi Li > >>>>>> --- > >>>>>> arch/x86/kvm/vmx.c | 3 ++- > >>>>>> 1 file changed, 2 insertions(+), 1 deletion(-) > >>>>>> > >>>>>> diff --git a/arch/x86/kvm/vmx.c b/arch/x86/kvm/vmx.c > >>>>>> index 45fd70c..240f0db 100644 > >>>>>> --- a/arch/x86/kvm/vmx.c > >>>>>> +++ b/arch/x86/kvm/vmx.c > >>>>>> @@ -2198,7 +2198,8 @@ static __init void nested_vmx_setup_ctls_msrs(void) > >>>>>> #else > >>>>>> nested_vmx_exit_ctls_high = 0; > >>>>>> #endif > >>>>>> - nested_vmx_exit_ctls_high |= VM_EXIT_ALWAYSON_WITHOUT_TRUE_MSR; > >>>>>> + nested_vmx_exit_ctls_high |= VM_EXIT_ALWAYSON_WITHOUT_TRUE_MSR | > >>>>>> + VM_EXIT_LOAD_IA32_PAT | VM_EXIT_SAVE_IA32_PAT; > >>>>>> > >>>>> You should not set those if host does not support them, otherwise > >>>>> GUEST_IA32_PAT may not be available > >>>> To Jan, > >>>> Is this different from IA32_EFER? > >>> > >>> As we use a real VMCS to keep GUEST/HOST_IA32_EFER, we actually do > >>> depend on the existence of the host feature. So my patch requires an > >>> update as you noted. > >>> > >> Your patch didn't add new users of GUEST_IA32_PAT and > >> VM_ENTRY_LOAD_IA32_PAT is enabled by nested only if host has it, so I am > >> not sure why you are saying that patch should be updated. > > I think Jan points [1] and you refer to another. > > > > [1] http://www.mail-archive.com/kvm@vger.kernel.org/msg94188.html > > Yep, that's what I was referring to. > Ah, too many patches :) -- Gleb.