From mboxrd@z Thu Jan 1 00:00:00 1970 From: Xiao Guangrong Subject: Re: [edk2] KVM: MTRR: fix memory type handling if MTRR is completely disabled Date: Wed, 14 Oct 2015 11:58:36 +0800 Message-ID: <561DD2EC.5040800@linux.intel.com> References: <55FBDB6D.4040207@gmail.com> <55FBE248.4010809@redhat.com> <55FC4E6F.8030104@gmail.com> <55FF7095.5060106@linux.intel.com> <55FF7C41.7070400@linux.intel.com> <560D3F31.5000703@gmail.com> <560D40C2.5080205@redhat.com> <560E96D8.9080007@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Cc: edk2-devel@ml01.01.org To: Janusz , Paolo Bonzini , Wanpeng Li , Laszlo Ersek , kvm@vger.kernel.org Return-path: Received: from mga14.intel.com ([192.55.52.115]:17024 "EHLO mga14.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750719AbbJNEEr (ORCPT ); Wed, 14 Oct 2015 00:04:47 -0400 In-Reply-To: <560E96D8.9080007@gmail.com> Sender: kvm-owner@vger.kernel.org List-ID: Janusz, Could you please try this: $ git diff diff --git a/arch/x86/kvm/x86.c b/arch/x86/kvm/x86.c index 185fc16..bdd564f 100644 --- a/arch/x86/kvm/x86.c +++ b/arch/x86/kvm/x86.c @@ -4957,12 +4957,14 @@ static int handle_emulation_failure(struct kvm_vcpu *vcpu) ++vcpu->stat.insn_emulation_fail; trace_kvm_emulate_insn_failed(vcpu); +#if 0 if (!is_guest_mode(vcpu) && kvm_x86_ops->get_cpl(vcpu) == 0) { vcpu->run->exit_reason = KVM_EXIT_INTERNAL_ERROR; vcpu->run->internal.suberror = KVM_INTERNAL_ERROR_EMULATION; vcpu->run->internal.ndata = 0; r = EMULATE_FAIL; } +#endif kvm_queue_exception(vcpu, UD_VECTOR); return r; To see if the issue still there? On 10/02/2015 10:38 PM, Janusz wrote: > W dniu 01.10.2015 o 16:18, Paolo Bonzini pisze: >> >> On 01/10/2015 16:12, Janusz wrote: >>> Now, I can also add, that the problem is only when I allow VM to use >>> more than one core, so with option for example: >>> -smp 8,cores=4,threads=2,sockets=1 and other combinations like -smp >>> 4,threads=1 its not working, and without it I am always running VM >>> without problems >>> >>> Any ideas what can it be? or any idea what would help to find out what >>> is causing this? >> I am going to send a revert of the patch tomorrow. >> >> Paolo > Thanks, but revert patch doesn't help, so something else is wrong here >