From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from [140.186.70.92] (port=38682 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1P6cLa-0000DJ-R6 for qemu-devel@nongnu.org; Fri, 15 Oct 2010 00:56:52 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1P6cLZ-0003f0-Mr for qemu-devel@nongnu.org; Fri, 15 Oct 2010 00:56:50 -0400 Received: from mga01.intel.com ([192.55.52.88]:27590) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1P6cLZ-0003em-IO for qemu-devel@nongnu.org; Fri, 15 Oct 2010 00:56:49 -0400 Subject: Re: [Qemu-devel] Re: [PATCH 11/11] kvm, x86: broadcast mce depending on the cpu version From: Huang Ying In-Reply-To: <4CB7B3C5.7070102@jp.fujitsu.com> References: <4CB6C580.1090804@np.css.fujitsu.com> <20101015010649.GB32272@amt.cnet> <4CB7B3C5.7070102@jp.fujitsu.com> Content-Type: text/plain; charset="UTF-8" Date: Fri, 15 Oct 2010 12:56:43 +0800 Message-ID: <1287118603.31526.19.camel@yhuang-dev> Mime-Version: 1.0 Content-Transfer-Encoding: 7bit List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Hidetoshi Seto Cc: Dean@gnu.org, KVM list , Nelson , Marcelo Tosatti , "qemu-devel@nongnu.org" , Avi Kivity , Jin Dongming On Fri, 2010-10-15 at 09:52 +0800, Hidetoshi Seto wrote: > (2010/10/15 10:06), Marcelo Tosatti wrote: > > On Thu, Oct 14, 2010 at 05:55:28PM +0900, Jin Dongming wrote: > >> There is no reason why SRAO event received by the main thread > >> is the only one that being broadcasted. > >> > >> According to the x86 ASDM vol.3A 15.10.4.1, > >> MCE signal is broadcast on processor version 06H_EH or later. > >> > >> This change is required to handle SRAR in the guest. > >> > >> Signed-off-by: Hidetoshi Seto > >> Tested-by: Jin Dongming > >> --- > >> qemu-kvm.c | 63 +++++++++++++++++++++++++++++------------------------------ > >> 1 files changed, 31 insertions(+), 32 deletions(-) > > > > Why is this necessary? _AO SIGBUS should be sent to all vcpu threads and > > main thread. > > Humm? If you are right, vcpu threads will receive same SRAO event twice, > one is that received by itself and another is that received by main thread > and forwarded by the broadcast. > > My understanding is (Jin, please correct me if something wrong): > - _AO SIGBUS is sent to main thread only, and then SRAO event is > broadcasted to all vcpu threads. Yes. It is. > - _AR SIGBUS is sent to a vcpu thread that tried to touch the > unmapped poisoned page, and SRAR event is posted to the vcpu. > > One problem here is that SRAR is not broadcasted. > The guest might observe the event differently, like "some cpus > don't enter machine check." Yes. SRAR "Broadcast" follows spec better. Best Regards, Huang Ying