From: Gregory Haskins <gregory.haskins@gmail.com>
To: Kyle Moffett <kyle@moffetthome.net>
Cc: Huang Ying <ying.huang@intel.com>,
Anthony Liguori <anthony@codemonkey.ws>,
Avi Kivity <avi@redhat.com>,
"kvm@vger.kernel.org" <kvm@vger.kernel.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
Andi Kleen <andi@firstfloor.org>
Subject: Re: [PATCH -v2] Add MCE support to KVM
Date: Tue, 21 Apr 2009 22:42:11 -0400 [thread overview]
Message-ID: <49EE8403.3090204@gmail.com> (raw)
In-Reply-To: <f73f7ab80904192057q3d918ceco81c09febb493e1c3@mail.gmail.com>
[-- Attachment #1: Type: text/plain, Size: 2224 bytes --]
Kyle Moffett wrote:
> On Sun, Apr 19, 2009 at 9:19 PM, Huang Ying <ying.huang@intel.com> wrote:
>
>> On Sat, 2009-04-18 at 23:54 +0800, Anthony Liguori wrote:
>>
>>> Huang Ying wrote:
>>>
>>>> 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 are
>>>> not simulated.
>>>>
>>>>
>>> Maybe I'm missing something, but couldn't this be implemented entirely
>>> within userspace? There's nothing VT/SVM specific about this. If the
>>> 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.
>>>
>> 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 them
>> in kernel space is easy to be understood. And the code is pretty short.
>>
>
> 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.
>
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
>
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 266 bytes --]
prev parent reply other threads:[~2009-04-22 2:42 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-04-17 7:29 [PATCH -v2] Add MCE support to KVM Huang Ying
2009-04-18 15:54 ` Anthony Liguori
2009-04-19 8:39 ` Avi Kivity
2009-04-21 16:06 ` Anthony Liguori
2009-04-21 16:19 ` Avi Kivity
2009-04-21 16:12 ` Anthony Liguori
2009-04-21 16:21 ` Avi Kivity
2009-04-21 19:55 ` Anthony Liguori
2009-04-21 20:00 ` Avi Kivity
2009-04-21 20:08 ` Anthony Liguori
2009-04-21 20:45 ` Avi Kivity
2009-04-21 21:16 ` Anthony Liguori
2009-04-22 5:57 ` Avi Kivity
2009-04-22 13:32 ` Anthony Liguori
2009-04-22 13:58 ` Avi Kivity
2009-04-22 2:32 ` Huang Ying
2009-04-20 1:19 ` Huang Ying
2009-04-20 3:57 ` Kyle Moffett
2009-04-20 5:04 ` Huang Ying
2009-04-20 5:30 ` Andi Kleen
2009-04-22 2:42 ` Gregory Haskins [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=49EE8403.3090204@gmail.com \
--to=gregory.haskins@gmail.com \
--cc=andi@firstfloor.org \
--cc=anthony@codemonkey.ws \
--cc=avi@redhat.com \
--cc=kvm@vger.kernel.org \
--cc=kyle@moffetthome.net \
--cc=linux-kernel@vger.kernel.org \
--cc=ying.huang@intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox