From mboxrd@z Thu Jan 1 00:00:00 1970 From: Gleb Natapov Subject: Re: [PATCH] KVM: nVMX: Check exit control for VM_EXIT_SAVE_IA32_PAT, not entry controls Date: Sun, 7 Apr 2013 14:06:53 +0300 Message-ID: <20130407110653.GO17919@redhat.com> References: <51600C39.2070709@web.de> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: Marcelo Tosatti , kvm To: Jan Kiszka Return-path: Received: from mx1.redhat.com ([209.132.183.28]:11304 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S933322Ab3DGLGz (ORCPT ); Sun, 7 Apr 2013 07:06:55 -0400 Content-Disposition: inline In-Reply-To: <51600C39.2070709@web.de> Sender: kvm-owner@vger.kernel.org List-ID: On Sat, Apr 06, 2013 at 01:51:21PM +0200, Jan Kiszka wrote: > From: Jan Kiszka > > Obviously a copy&paste mistake: prepare_vmcs12 has to check L1's exit > controls for VM_EXIT_SAVE_IA32_PAT. > > Signed-off-by: Jan Kiszka Applied, thanks. > --- > arch/x86/kvm/vmx.c | 2 +- > 1 files changed, 1 insertions(+), 1 deletions(-) > > diff --git a/arch/x86/kvm/vmx.c b/arch/x86/kvm/vmx.c > index 74c9cc1..a1761e8 100644 > --- a/arch/x86/kvm/vmx.c > +++ b/arch/x86/kvm/vmx.c > @@ -7456,7 +7456,7 @@ static void prepare_vmcs12(struct kvm_vcpu *vcpu, struct vmcs12 *vmcs12) > /* TODO: These cannot have changed unless we have MSR bitmaps and > * the relevant bit asks not to trap the change */ > vmcs12->guest_ia32_debugctl = vmcs_read64(GUEST_IA32_DEBUGCTL); > - if (vmcs12->vm_entry_controls & VM_EXIT_SAVE_IA32_PAT) > + if (vmcs12->vm_exit_controls & VM_EXIT_SAVE_IA32_PAT) > vmcs12->guest_ia32_pat = vmcs_read64(GUEST_IA32_PAT); > vmcs12->guest_sysenter_cs = vmcs_read32(GUEST_SYSENTER_CS); > vmcs12->guest_sysenter_esp = vmcs_readl(GUEST_SYSENTER_ESP); > -- > 1.7.3.4 -- Gleb.