From patchwork Wed Oct 14 03:58:36 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Xiao Guangrong X-Patchwork-Id: 7390301 Return-Path: X-Original-To: patchwork-kvm@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id E89979F302 for ; Wed, 14 Oct 2015 04:04:53 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 170B620786 for ; Wed, 14 Oct 2015 04:04:53 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 13A6D20697 for ; Wed, 14 Oct 2015 04:04:52 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1750782AbbJNEEs (ORCPT ); Wed, 14 Oct 2015 00:04:48 -0400 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 Received: from fmsmga003.fm.intel.com ([10.253.24.29]) by fmsmga103.fm.intel.com with ESMTP; 13 Oct 2015 21:04:47 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.17,681,1437462000"; d="scan'208";a="580307738" Received: from xiao.sh.intel.com ([10.239.159.86]) by FMSMGA003.fm.intel.com with ESMTP; 13 Oct 2015 21:04:46 -0700 Subject: Re: [edk2] KVM: MTRR: fix memory type handling if MTRR is completely disabled To: Janusz , Paolo Bonzini , Wanpeng Li , Laszlo Ersek , kvm@vger.kernel.org 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> Cc: edk2-devel@ml01.01.org From: Xiao Guangrong Message-ID: <561DD2EC.5040800@linux.intel.com> Date: Wed, 14 Oct 2015 11:58:36 +0800 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.3.0 MIME-Version: 1.0 In-Reply-To: <560E96D8.9080007@gmail.com> Sender: kvm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: kvm@vger.kernel.org X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, T_RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Janusz, Could you please try this: $ git diff 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 > --- To unsubscribe from this list: send the line "unsubscribe kvm" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html 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;