From mboxrd@z Thu Jan 1 00:00:00 1970 From: Paolo Bonzini Subject: Re: [PATCH v4 1/3] target-i386: KVM: add basic Intel LMCE support Date: Thu, 16 Jun 2016 20:17:06 +0200 Message-ID: <792ca770-a6c6-02c7-6bdb-ed1a8593bf2e@redhat.com> References: <20160616060621.30422-1-haozhong.zhang@intel.com> <20160616060621.30422-2-haozhong.zhang@intel.com> <91a4203b-ceaa-3a0f-2a36-b7ae5b96fc42@redhat.com> <20160616101617.klur3zluin27vyyn@hz-desktop> <50bbc1ba-dcff-7022-fe3b-56318d119ae1@redhat.com> <20160616103413.qqtdihdto545y7hb@hz-desktop> <20160616180541.GQ18662@thinpad.lan.raisama.net> Mime-Version: 1.0 Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit Cc: qemu-devel@nongnu.org, Richard Henderson , "Michael S . Tsirkin" , Marcelo Tosatti , kvm@vger.kernel.org, Boris Petkov , Tony Luck , Andi Kleen , rkrcmar@redhat.com, Ashok Raj To: Eduardo Habkost Return-path: Received: from mx1.redhat.com ([209.132.183.28]:51001 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751563AbcFPSRW (ORCPT ); Thu, 16 Jun 2016 14:17:22 -0400 In-Reply-To: <20160616180541.GQ18662@thinpad.lan.raisama.net> Sender: kvm-owner@vger.kernel.org List-ID: On 16/06/2016 20:05, Eduardo Habkost wrote: > On Thu, Jun 16, 2016 at 12:42:19PM +0200, Paolo Bonzini wrote: >> >> >> On 16/06/2016 12:34, Haozhong Zhang wrote: >>> On 06/16/16 12:23, Paolo Bonzini wrote: >>>> >>>> >>>> On 16/06/2016 12:16, Haozhong Zhang wrote: >>>>>> >>>>>>> + has_msr_mcg_ext_ctl = true; >>>>>>> } >>>>>>> >>>>>>> c = cpuid_find_entry(&cpuid_data.cpuid, 0x80000007, 0); >>>>>> >>>>>> Which silicon has LMCE? We may want to enable the property for some CPU >>>>>> models. Apart from this, the patch is pretty much okay. >>>>> >>>>> Skylake-EX >>>> >>>> ... However, all virtual CPUs can use LMCE because the rendez-vous is >>>> done in the host. Is this correct? >>>> >>> >>> Yes, if it does not confuse the guest which sees LMCE available on >>> lower end or earlier CPUs (though I think someone would feel >>> happy). >> >> Yes, that's what I expect too. No confusion, and some happiness. :) >> >>> Or do we add it only to qemu64 and kvm64? >> >> I'm not sure where to add it, actually. :( Let's wait for Eduardo's >> opinion. > > Unfortunately we can't enable it by default to any existing CPU > model, or we break the machine-type-runnability rule > (machine-type version changes in an existing runnable VM > configuration should never make the VM not runnable in the same > host). > > If one day we decide that QEMU as a whole can require a newer > kernel, then we can enable it by default on all CPU models. > > What's the first kernel release where LMCE is enabled in > KVM_X86_GET_MCE_CAP_SUPPORTED, BTW? It will presumably be 4.8. Paolo From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:57737) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bDbr4-0008N9-Ja for qemu-devel@nongnu.org; Thu, 16 Jun 2016 14:17:27 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bDbr0-0005i5-C8 for qemu-devel@nongnu.org; Thu, 16 Jun 2016 14:17:26 -0400 Received: from mx1.redhat.com ([209.132.183.28]:54180) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bDbr0-0005i1-5t for qemu-devel@nongnu.org; Thu, 16 Jun 2016 14:17:22 -0400 References: <20160616060621.30422-1-haozhong.zhang@intel.com> <20160616060621.30422-2-haozhong.zhang@intel.com> <91a4203b-ceaa-3a0f-2a36-b7ae5b96fc42@redhat.com> <20160616101617.klur3zluin27vyyn@hz-desktop> <50bbc1ba-dcff-7022-fe3b-56318d119ae1@redhat.com> <20160616103413.qqtdihdto545y7hb@hz-desktop> <20160616180541.GQ18662@thinpad.lan.raisama.net> From: Paolo Bonzini Message-ID: <792ca770-a6c6-02c7-6bdb-ed1a8593bf2e@redhat.com> Date: Thu, 16 Jun 2016 20:17:06 +0200 MIME-Version: 1.0 In-Reply-To: <20160616180541.GQ18662@thinpad.lan.raisama.net> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH v4 1/3] target-i386: KVM: add basic Intel LMCE support List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Eduardo Habkost Cc: qemu-devel@nongnu.org, Richard Henderson , "Michael S . Tsirkin" , Marcelo Tosatti , kvm@vger.kernel.org, Boris Petkov , Tony Luck , Andi Kleen , rkrcmar@redhat.com, Ashok Raj On 16/06/2016 20:05, Eduardo Habkost wrote: > On Thu, Jun 16, 2016 at 12:42:19PM +0200, Paolo Bonzini wrote: >> >> >> On 16/06/2016 12:34, Haozhong Zhang wrote: >>> On 06/16/16 12:23, Paolo Bonzini wrote: >>>> >>>> >>>> On 16/06/2016 12:16, Haozhong Zhang wrote: >>>>>> >>>>>>> + has_msr_mcg_ext_ctl = true; >>>>>>> } >>>>>>> >>>>>>> c = cpuid_find_entry(&cpuid_data.cpuid, 0x80000007, 0); >>>>>> >>>>>> Which silicon has LMCE? We may want to enable the property for some CPU >>>>>> models. Apart from this, the patch is pretty much okay. >>>>> >>>>> Skylake-EX >>>> >>>> ... However, all virtual CPUs can use LMCE because the rendez-vous is >>>> done in the host. Is this correct? >>>> >>> >>> Yes, if it does not confuse the guest which sees LMCE available on >>> lower end or earlier CPUs (though I think someone would feel >>> happy). >> >> Yes, that's what I expect too. No confusion, and some happiness. :) >> >>> Or do we add it only to qemu64 and kvm64? >> >> I'm not sure where to add it, actually. :( Let's wait for Eduardo's >> opinion. > > Unfortunately we can't enable it by default to any existing CPU > model, or we break the machine-type-runnability rule > (machine-type version changes in an existing runnable VM > configuration should never make the VM not runnable in the same > host). > > If one day we decide that QEMU as a whole can require a newer > kernel, then we can enable it by default on all CPU models. > > What's the first kernel release where LMCE is enabled in > KVM_X86_GET_MCE_CAP_SUPPORTED, BTW? It will presumably be 4.8. Paolo