From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752702AbdEDKiN (ORCPT ); Thu, 4 May 2017 06:38:13 -0400 Received: from mx1.redhat.com ([209.132.183.28]:41516 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751598AbdEDKh5 (ORCPT ); Thu, 4 May 2017 06:37:57 -0400 DMARC-Filter: OpenDMARC Filter v1.3.2 mx1.redhat.com C5AFC83F45 Authentication-Results: ext-mx03.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=redhat.com Authentication-Results: ext-mx03.extmail.prod.ext.phx2.redhat.com; spf=pass smtp.mailfrom=pbonzini@redhat.com DKIM-Filter: OpenDKIM Filter v2.11.0 mx1.redhat.com C5AFC83F45 Subject: Re: [PATCH] KVM: nVMX: fix MWAIT emulation for guests To: Wanpeng Li , linux-kernel@vger.kernel.org, kvm@vger.kernel.org References: <1493890648-9277-1-git-send-email-wanpeng.li@hotmail.com> Cc: =?UTF-8?B?UmFkaW0gS3LEjW3DocWZ?= , Wanpeng Li , "Michael S . Tsirkin" , Alexander Graf , "Gabriel L. Somlo" From: Paolo Bonzini Message-ID: Date: Thu, 4 May 2017 12:37:51 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.8.0 MIME-Version: 1.0 In-Reply-To: <1493890648-9277-1-git-send-email-wanpeng.li@hotmail.com> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.27]); Thu, 04 May 2017 10:37:57 +0000 (UTC) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 04/05/2017 11:37, Wanpeng Li wrote: > > The kvm-unit-tests/vmx.flat fails against instruction(mwait) intercept test. > > Test suite: instruction intercept > Unhandled exception 13 #GP at ip 0000000000402397 > error_code=0000 rflags=00010012 cs=00000008 > rax=0000000000000000 rcx=0000000004006172 rdx=0000000000402397 rbx=000000000041427d > rbp=0000000007ff8fdf rsi=0000000000000000 rdi=0000000000000004 > r8=000000000000000a r9=00000000000003f8 r10=0000000000000000 r11=0000000000000000 > r12=0000000000000000 r13=0000000000000000 r14=0000000000000000 r15=0000000000000000 > cr0=0000000080010031 cr2=0000000000000000 cr3=0000000007fff000 cr4=0000000000002020 > cr8=0000000000000000 > STACK: @402397 401102 400459 The problem is simply that the tests were not clearing eax/ecx/edx. Update kvm-unit-tests.git, it includes the "[PATCH] vmx: correctly set up MONITOR and MWAIT" from April 27 (message id 1493309532-14398-1-git-send-email-pbonzini@redhat.com). Thanks, Paolo