From mboxrd@z Thu Jan 1 00:00:00 1970 From: Luiz Capitulino Subject: Re: [PATCH] KVM: Documentation: document MCE ioctls Date: Thu, 9 Mar 2017 14:03:22 -0500 Message-ID: <20170309140322.09464caa@redhat.com> References: <20170217170849.30b95ddc@redhat.com> <42796742-3992-ed4b-7678-ec6aea1b13a8@redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Cc: kvm@vger.kernel.org, rkrcmar@redhat.com, ashok.raj@intel.com, haozhong.zhang@intel.com, ying.huang@intel.com To: Paolo Bonzini Return-path: Received: from mx1.redhat.com ([209.132.183.28]:42064 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754047AbdCITEA (ORCPT ); Thu, 9 Mar 2017 14:04:00 -0500 In-Reply-To: <42796742-3992-ed4b-7678-ec6aea1b13a8@redhat.com> Sender: kvm-owner@vger.kernel.org List-ID: On Thu, 9 Mar 2017 13:49:06 +0100 Paolo Bonzini wrote: > > +struct kvm_x86_mce { > > + __u64 status; > > + __u64 addr; > > + __u64 misc; > > + __u64 mcg_status; > > + __u8 bank; > > + __u8 pad1[7]; > > + __u64 pad2[3]; > > +}; > > + > > +If the MCE being reported is an uncorrected error, KVM will > > +inject it as a MCE exception into the guest (if an MCE > > +is still in progress, a triple fault is be injected). > > If the guest MCG_STATUS register reports that an MCE is in progress, KVM > causes an KVM_EXIT_SHUTDOWN vmexit. Oh, that's correct. But it only happens for uncorrected errors. So, My new paragraph would be: If the MCE being reported is an uncorrected error, KVM will inject it as an MCE exception into the guest. If the guest MCG_STATUS register reports taht an MCE is in progress, KVM causes an KVM_EXIT_SHUTDOWN vmexit. Otherwise, if the MCE is an corrected error, KVM will just store it in the corresponding bank (provided this bank is not holding a previously reported uncorrected error).