From mboxrd@z Thu Jan 1 00:00:00 1970 From: Hidetoshi Seto Subject: Re: [Qemu-devel] Re: [PATCH 11/11] kvm, x86: broadcast mce depending on the cpu version Date: Fri, 15 Oct 2010 10:52:05 +0900 Message-ID: <4CB7B3C5.7070102@jp.fujitsu.com> References: <4CB6C580.1090804@np.css.fujitsu.com> <20101015010649.GB32272@amt.cnet> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Cc: Jin Dongming , KVM list , Dean Nelson , "qemu-devel@nongnu.org" , Avi Kivity , Huang Ying To: Marcelo Tosatti Return-path: Received: from fgwmail7.fujitsu.co.jp ([192.51.44.37]:34917 "EHLO fgwmail7.fujitsu.co.jp" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753291Ab0JOBw0 (ORCPT ); Thu, 14 Oct 2010 21:52:26 -0400 Received: from m6.gw.fujitsu.co.jp ([10.0.50.76]) by fgwmail7.fujitsu.co.jp (Fujitsu Gateway) with ESMTP id o9F1qOjH015049 for (envelope-from seto.hidetoshi@jp.fujitsu.com); Fri, 15 Oct 2010 10:52:25 +0900 Received: from smail (m6 [127.0.0.1]) by outgoing.m6.gw.fujitsu.co.jp (Postfix) with ESMTP id AEA4745DE56 for ; Fri, 15 Oct 2010 10:52:24 +0900 (JST) Received: from s6.gw.fujitsu.co.jp (s6.gw.fujitsu.co.jp [10.0.50.96]) by m6.gw.fujitsu.co.jp (Postfix) with ESMTP id D09EC45DE53 for ; Fri, 15 Oct 2010 10:52:22 +0900 (JST) Received: from s6.gw.fujitsu.co.jp (localhost.localdomain [127.0.0.1]) by s6.gw.fujitsu.co.jp (Postfix) with ESMTP id AF7531DB8012 for ; Fri, 15 Oct 2010 10:52:22 +0900 (JST) Received: from ml14.s.css.fujitsu.com (ml14.s.css.fujitsu.com [10.249.87.104]) by s6.gw.fujitsu.co.jp (Postfix) with ESMTP id EB2141DB8018 for ; Fri, 15 Oct 2010 10:52:18 +0900 (JST) In-Reply-To: <20101015010649.GB32272@amt.cnet> Sender: kvm-owner@vger.kernel.org List-ID: (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. - _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." > Please separate bug fixes from cleanups. Very nice, thanks. Maybe this set is considered as 10 cleanups + 1 fix. I think this fix will be complicated one without preceding cleanups. Thanks, H.Seto