From: Borislav Petkov <bp@alien8.de>
To: Paolo Bonzini <pbonzini@redhat.com>,
Eduardo Habkost <ehabkost@redhat.com>
Cc: "Tony Luck" <tony.luck@intel.com>, KVM <kvm@vger.kernel.org>,
"Marcelo Tosatti" <mtosatti@redhat.com>,
qemu-devel <qemu-devel@nongnu.org>,
"Huang Ying" <ying.huang@intel.com>,
"Andreas Färber" <afaerber@suse.de>,
"Richard Henderson" <rth@twiddle.net>
Subject: Re: [Qemu-devel] [PATCH] target-i386: Do not set MCG_SER_P by default
Date: Mon, 23 Nov 2015 16:03:55 +0100 [thread overview]
Message-ID: <20151123150355.GE5134@pd.tnic> (raw)
In-Reply-To: <56532710.8030607@redhat.com>
+ Tony.
On Mon, Nov 23, 2015 at 03:47:44PM +0100, Paolo Bonzini wrote:
> On 23/11/2015 14:22, Eduardo Habkost wrote:
> > > Software Error Recovery, i.e. SER, is purely an Intel feature and it
> > > shouldn't be set by default. Enable it only on Intel.
> >
> > What happens when SER is enabled on an AMD CPU? If it really
> > should't be enabled, why is KVM returning it on
> > KVM_X86_GET_MCE_CAP_SUPPORTED?
>
> Indeed... is it a problem if our frankenstein AMD CPU can recover from
> memory errors?
The problem stems from the fact that the guest kernel looks at SER and
does different handling depending on that bit:
machine_check_poll:
...
if (!(flags & MCP_UC) &&
(m.status & (mca_cfg.ser ? MCI_STATUS_S : MCI_STATUS_UC)))
continue;
so when the guest kernel gets a correctable error (injected..., for
example) it sees that bit set. Even though kvm/qemu emulates an AMD
CPU. So on AMD with that bit set, it would puzzle the whole error
handling/reporting in the guest kernel.
Oh, btw, I'm using a kvm guest to inject MCEs. In case you were
wondering why is he even doing that. :-)
And I'm not sure it makes sense to set that bit for an Intel guest too.
For the simple reason that I don't know how much of the Software Error
Recovery stuff is actually implemented there. If stuff is missing, you
probably don't want to advertize it there too. And by "stuff" I mean
all that fun in section "15.6 RECOVERY OF UNCORRECTED RECOVERABLE (UCR)
ERRORS" of the SDM.
It's a whole another question how/whether to do UCR error handling in
the guest or maybe leave it to the host...
--
Regards/Gruss,
Boris.
ECO tip #101: Trim your mails when you reply.
next prev parent reply other threads:[~2015-11-23 15:04 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <1448060471-14128-1-git-send-email-bp@alien8.de>
2015-11-20 23:11 ` [Qemu-devel] [PATCH] target-i386: Do not set MCG_SER_P by default Andreas Färber
2015-11-21 1:09 ` Borislav Petkov
2015-11-23 13:22 ` Eduardo Habkost
2015-11-23 14:47 ` Paolo Bonzini
2015-11-23 15:03 ` Borislav Petkov [this message]
2015-11-23 15:11 ` [Qemu-devel] MCG_CAP ABI breakage (was Re: [PATCH] target-i386: Do not set MCG_SER_P by default) Eduardo Habkost
2015-11-23 16:43 ` Borislav Petkov
2015-11-23 19:42 ` Eduardo Habkost
2015-11-23 20:46 ` Borislav Petkov
2015-11-24 16:36 ` Eduardo Habkost
2015-11-24 18:44 ` Borislav Petkov
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=20151123150355.GE5134@pd.tnic \
--to=bp@alien8.de \
--cc=afaerber@suse.de \
--cc=ehabkost@redhat.com \
--cc=kvm@vger.kernel.org \
--cc=mtosatti@redhat.com \
--cc=pbonzini@redhat.com \
--cc=qemu-devel@nongnu.org \
--cc=rth@twiddle.net \
--cc=tony.luck@intel.com \
--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;
as well as URLs for NNTP newsgroup(s).