This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
Home Products Support Community News


Re: [Xen-devel] [PATCH] x86/mce: CPU notifiers must not be registered a

To: "Keir Fraser" <keir.xen@xxxxxxxxx>
Subject: Re: [Xen-devel] [PATCH] x86/mce: CPU notifiers must not be registered a second time during resume
From: "Jan Beulich" <JBeulich@xxxxxxxxxx>
Date: Fri, 18 Mar 2011 16:35:54 +0000
Cc: Jinsong Liu <jinsong.liu@xxxxxxxxx>, "xen-devel@xxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxx>
Delivery-date: Fri, 18 Mar 2011 09:35:43 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <C9A92E38.150A6%keir.xen@xxxxxxxxx>
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
References: <4D8383340200007800037412@xxxxxxxxxxxxxxxxxx> <C9A92E38.150A6%keir.xen@xxxxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
>>> On 18.03.11 at 16:43, Keir Fraser <keir.xen@xxxxxxxxx> wrote:
> On 18/03/2011 15:07, "Jan Beulich" <JBeulich@xxxxxxxxxx> wrote:
>> While c/s 22964:f71212f712fd and 23051:93c864c16ab1 fixed issues with
>> CPU onlining, they introduced a problem with resume: mcheck_init() is
>> also being called on that path, and hence checking whether it's running
>> on CPU 0, which is generally not a really good thing, is particularly
>> inappropriate here.
> Just have a 'static bool_t early_init_done' or similar in
> intel_mcheck_init().

And another in mcheck_init(). If the proliferates, an alternative I
would like a little better would be to just have a global variable (e.g.
extending early_boot).

> if ( !early_init_done ) {
>  BUG_ON(smp_processor_id() != 0);
>  ...
>  early_init_done = 1;
> }
> It's clearer anyway -- we're simply protecting one-time-only early-boot-time
> initialisation stuff.

What's wrong with doing the protection by passing down the
necessary information?


Xen-devel mailing list