From mboxrd@z Thu Jan 1 00:00:00 1970 From: Janusz Subject: Re: [edk2] KVM: MTRR: fix memory type handling if MTRR is completely disabled Date: Wed, 14 Oct 2015 09:37:57 +0200 Message-ID: <561E0655.8080508@gmail.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> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Cc: edk2-devel@ml01.01.org To: Xiao Guangrong , Paolo Bonzini , Wanpeng Li , Laszlo Ersek , kvm@vger.kernel.org Return-path: Received: from mail-lf0-f44.google.com ([209.85.215.44]:33896 "EHLO mail-lf0-f44.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750840AbbJNHiA (ORCPT ); Wed, 14 Oct 2015 03:38:00 -0400 Received: by lfaz124 with SMTP id z124so7020663lfa.1 for ; Wed, 14 Oct 2015 00:37:59 -0700 (PDT) In-Reply-To: <561DD2EC.5040800@linux.intel.com> Sender: kvm-owner@vger.kernel.org List-ID: 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 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 >>