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 16:24:01 +0800 Message-ID: <561E1121.7030502@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> <561DD2EC.5040800@linux.intel.com> <561E0655.8080508@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]:33309 "EHLO mga14.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752057AbbJNIaP (ORCPT ); Wed, 14 Oct 2015 04:30:15 -0400 In-Reply-To: <561E0655.8080508@gmail.com> Sender: kvm-owner@vger.kernel.org List-ID: On 10/14/2015 03:37 PM, Janusz wrote: > I was able to run my virtual machine with this, but had very high cpu > usage when something happen in it like booting system. once, my virtual > machine hang and I couln't even get my mouse / keyboard back from qemu. > When I did vga passthrough, I didn't get any video output, and cpu usage > was also high. Tried it on 4.3 Which tree are you using? Is it kvm tree? Could you please work on queue brancn on current kvm tree based on top commit 73917739334c6509: KVM: x86: fix SMI to halted VCPU. Hmm... interesting, this diff works on my box... > > W dniu 14.10.2015 o 05:58, Xiao Guangrong pisze: >> >> 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 >>> > >