From mboxrd@z Thu Jan 1 00:00:00 1970 From: Borislav Petkov Subject: Re: [Qemu-devel] [Patch V2 1/2] x86, mce: Basic support to add LMCE support to QEMU Date: Mon, 14 Dec 2015 17:37:38 +0100 Message-ID: <20151214163738.GJ11630@pd.tnic> References: <1449776482-26070-1-git-send-email-ashok.raj@intel.com> <20151214162356.GA5314@thinpad.lan.raisama.net> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: QUOTED-PRINTABLE Cc: Ashok Raj , kvm@vger.kernel.org, Tony Luck , Gong Chen , Gleb Natapov , linux-kernel@vger.kernel.org, qemu-devel@nongnu.org, Andi Kleen , Paolo Bonzini To: Eduardo Habkost Return-path: Content-Disposition: inline In-Reply-To: <20151214162356.GA5314@thinpad.lan.raisama.net> Sender: linux-kernel-owner@vger.kernel.org List-Id: kvm.vger.kernel.org On Mon, Dec 14, 2015 at 02:23:56PM -0200, Eduardo Habkost wrote: > > -#define MCE_CAP_DEF (MCG_CTL_P|MCG_SER_P) > > +#define MCE_CAP_DEF (MCG_CTL_P|MCG_SER_P|MCG_LMCE_P) >=20 > This makes mcg_cap change when upgrading QEMU. >=20 > VMs with MCG_LMCE_P enabled shouldn't be migratable to hosts > running older kernels, or the guest may try to read or write > MSR_IA32_MCG_EXT_CTL after miration and get a #GP. That means: >=20 > 1) Older machine-types (pc-2.5 and older) should keep the > old (MCG_CTL_P|MCG_SER_P) default. > 2) We can't make pc-2.6 enable LMCE by default, either, because > QEMU guarantees that just changing the machine-type shouldn't > introduce new host requirements (see: > http://article.gmane.org/gmane.comp.emulators.qemu/346651) >=20 > It looks like we need a new -cpu option to enable the feature, > then. At least until we raise the minimum kernel version > requirements of QEMU. =2E.. and obviously LMCE is vendor-specific so it cannot be enabled on !Intel guests with a define like that. mce_init() in qemu should check vendor too. The same mistake was done with SER_P but that's much harder to change, as we discussed previously. --=20 Regards/Gruss, Boris. SUSE Linux GmbH, GF: Felix Imend=C3=B6rffer, Jane Smithard, Graham Nort= on, HRB 21284 (AG N=C3=BCrnberg) --=20