Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754713AbZDVCm2 (ORCPT ); Tue, 21 Apr 2009 22:42:28 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1751874AbZDVCmR (ORCPT ); Tue, 21 Apr 2009 22:42:17 -0400 Received: from qw-out-2122.google.com ([74.125.92.27]:65371 "EHLO qw-out-2122.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751260AbZDVCmQ (ORCPT ); Tue, 21 Apr 2009 22:42:16 -0400 DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:user-agent:mime-version:to:cc:subject :references:in-reply-to:x-enigmail-version:content-type; b=uo5aNQlESrMnaeySkTynLvUQ9QnhLGq1/Co2qh5qZIsRGrM9LkID8X9K4/q0YalyCR znEOAGoohN0L8NGk/OjRF82uncXyPqLJjLVN+oe5oGtrY59Amy/Ees+ENN70g0hkElQJ wscHffOw/Ad2aOkkSuTaSqJmCNWCxHOnc6hhs= Message-ID: <49EE8403.3090204@gmail.com> Date: Tue, 21 Apr 2009 22:42:11 -0400 From: Gregory Haskins User-Agent: Thunderbird 2.0.0.21 (Macintosh/20090302) MIME-Version: 1.0 To: Kyle Moffett CC: Huang Ying , Anthony Liguori , Avi Kivity , "kvm@vger.kernel.org" , "linux-kernel@vger.kernel.org" , Andi Kleen Subject: Re: [PATCH -v2] Add MCE support to KVM References: <1239953345.6842.3.camel@yhuang-dev.sh.intel.com> <49E9F7BE.4090904@codemonkey.ws> <1240190385.6842.45.camel@yhuang-dev.sh.intel.com> In-Reply-To: X-Enigmail-Version: 0.95.7 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="------------enigE3F91AB170688CE1FCB5C669" Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 3161 Lines: 87 This is an OpenPGP/MIME signed message (RFC 2440 and 3156) --------------enigE3F91AB170688CE1FCB5C669 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Kyle Moffett wrote: > On Sun, Apr 19, 2009 at 9:19 PM, Huang Ying wrot= e: > =20 >> On Sat, 2009-04-18 at 23:54 +0800, Anthony Liguori wrote: >> =20 >>> Huang Ying wrote: >>> =20 >>>> The related MSRs are emulated. MCE capability is exported via >>>> extension KVM_CAP_MCE and ioctl KVM_X86_GET_MCE_CAP_SUPPORTED. A new= >>>> vcpu ioctl command KVM_X86_SETUP_MCE is used to setup MCE emulation >>>> such as the mcg_cap. MCE is injected via vcpu ioctl command >>>> KVM_X86_SET_MCE. Extended machine-check state (MCG_EXT_P) and CMCI a= re >>>> not simulated. >>>> >>>> =20 >>> Maybe I'm missing something, but couldn't this be implemented entirel= y >>> within userspace? There's nothing VT/SVM specific about this. If th= e >>> issue is setting these MSRs from userspace via KVM_SET_MSRS isn't >>> enough, perhaps we should add userspace MSR handling. >>> >>> Also, if you implement the MSR logic in userspace, it's pretty simple= to >>> make it work in the non-TCG case which will be a requirement for >>> upstream merging. >>> =20 >> There is more logic than just KVM_SET_MSRS, such as BANK reporting >> disabling, overwriting rules, triple fault for UC MCE during MCIP. >> Although these logic can be implemented in user space, I think put the= m >> in kernel space is easy to be understood. And the code is pretty short= =2E >> =20 > > IMO the main reason to put this in kernel-space would be to make it > possible to automatically forward some MCE errors generated by the > real hardware (RAM ECC errors for example) down into the VM. Right > now I suppose you could do that with the patches to forward RAM-based > hard MCEs to userspace using SIGSEGV and handling the SIGSEGV in > userspace, but that seems more fragile to me. > =20 FWIW: I would be looking for a way to generate MCE to report async vbus faults via my SHM_SIGNAL_FAULT() mechanism, so I am very much in favor of this support being in-kernel. -Greg > Cheers, > Kyle Moffett > -- > 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 > =20 --------------enigE3F91AB170688CE1FCB5C669 Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG/MacGPG2 v2.0.11 (Darwin) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iEYEARECAAYFAknuhAMACgkQP5K2CMvXmqHKRwCfSda2nACyG6sW8NahZsCu/JnE wggAnj6Cw1PFQVhAK2B5ozweSb7lLaNh =fi0E -----END PGP SIGNATURE----- --------------enigE3F91AB170688CE1FCB5C669-- -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/