public inbox for kvm@vger.kernel.org
 help / color / mirror / Atom feed
From: Changbin Du <changbin.du@gmail.com>
To: Sean Christopherson <sean.j.christopherson@intel.com>
Cc: Changbin Du <changbin.du@gmail.com>,
	pbonzini@redhat.com, rkrcmar@redhat.com, tglx@linutronix.de,
	mingo@redhat.com, x86@kernel.org, kvm@vger.kernel.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH] KVM: VMX: Fix vm entry failure caused by invalid vmexit controls
Date: Wed, 23 Jan 2019 00:49:25 +0000	[thread overview]
Message-ID: <20190123004924.2xprohspc74h5xnf@mail.google.com> (raw)
In-Reply-To: <20190122170045.GD28513@linux.intel.com>

On Tue, Jan 22, 2019 at 09:00:45AM -0800, Sean Christopherson wrote:
> On Tue, Jan 22, 2019 at 11:29:52PM +0800, Changbin Du wrote:
> > The commit c73da3f ("KVM: VMX: Properly handle dynamic VM Entry/Exit
> > controls") has a typo that cause invalid vmexit controls. The
> > VM_ENTRY_LOAD_IA32_PERF_GLOBAL_CTRL is against _vmentry_control.
> > 
> > KVM: entry failed, hardware error 0x7
> > EAX=00000000 EBX=00000000 ECX=00000000 EDX=000206c2
> > ESI=00000000 EDI=00000000 EBP=00000000 ESP=00000000
> > EIP=0000fff0 EFL=00000002 [-------] CPL=0 II=0 A20=1 SMM=0 HLT=0
> > ES =0000 00000000 0000ffff 00009300
> > CS =f000 ffff0000 0000ffff 00009b00
> > SS =0000 00000000 0000ffff 00009300
> > DS =0000 00000000 0000ffff 00009300
> > FS =0000 00000000 0000ffff 00009300
> > GS =0000 00000000 0000ffff 00009300
> > LDT=0000 00000000 0000ffff 00008200
> > TR =0000 00000000 0000ffff 00008b00
> > GDT= 00000000 0000ffff
> > IDT= 00000000 0000ffff
> > CR0=60000010 CR2=00000000 CR3=00000000 CR4=00000000
> > DR0=0000000000000000 DR1=0000000000000000 DR2=0000000000000000
> > DR3=0000000000000000 DR6=00000000ffff0ff0 DR7=0000000000000400
> > EFER=0000000000000000
> > 
> > Fixes: c73da3f ("KVM: VMX: Properly handle dynamic VM Entry/Exit controls")
> > Signed-off-by: Changbin Du <changbin.du@gmail.com>
> 
> Patch already submitted[1].
> 
> Paolo/Radim, the VM-Exit fix needs to be queued asap.  The fix for the
> objtool warning[2] should also go into v5.0.
> 
echo. This bug breaks kvm on some old machines!

> [1] https://patchwork.kernel.org/patch/10763351/
> [2] https://patchwork.kernel.org/patch/10765309/
> 
> 
> 
> > ---
> >  arch/x86/kvm/vmx/vmx.c | 2 +-
> >  1 file changed, 1 insertion(+), 1 deletion(-)
> > 
> > diff --git a/arch/x86/kvm/vmx/vmx.c b/arch/x86/kvm/vmx/vmx.c
> > index f6915f10e584..0762fcab8fc9 100644
> > --- a/arch/x86/kvm/vmx/vmx.c
> > +++ b/arch/x86/kvm/vmx/vmx.c
> > @@ -2344,7 +2344,7 @@ static __init int setup_vmcs_config(struct vmcs_config *vmcs_conf,
> >  		case 37: /* AAT100 */
> >  		case 44: /* BC86,AAY89,BD102 */
> >  		case 46: /* BA97 */
> > -			_vmexit_control &= ~VM_ENTRY_LOAD_IA32_PERF_GLOBAL_CTRL;
> > +			_vmentry_control &= ~VM_ENTRY_LOAD_IA32_PERF_GLOBAL_CTRL;
> >  			_vmexit_control &= ~VM_EXIT_LOAD_IA32_PERF_GLOBAL_CTRL;
> >  			pr_warn_once("kvm: VM_EXIT_LOAD_IA32_PERF_GLOBAL_CTRL "
> >  					"does not work properly. Using workaround\n");
> > -- 
> > 2.19.1
> > 

-- 
Cheers,
Changbin Du

      reply	other threads:[~2019-01-23  0:49 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-01-22 15:29 [PATCH] KVM: VMX: Fix vm entry failure caused by invalid vmexit controls Changbin Du
2019-01-22 17:00 ` Sean Christopherson
2019-01-23  0:49   ` Changbin Du [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=20190123004924.2xprohspc74h5xnf@mail.google.com \
    --to=changbin.du@gmail.com \
    --cc=kvm@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@redhat.com \
    --cc=pbonzini@redhat.com \
    --cc=rkrcmar@redhat.com \
    --cc=sean.j.christopherson@intel.com \
    --cc=tglx@linutronix.de \
    --cc=x86@kernel.org \
    /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