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] nmi cache weirdness???

To: <mukesh.rathor@xxxxxxxxxx>, <xen-devel@xxxxxxxxxxxxxxxxxxx>
Subject: Re: [Xen-devel] nmi cache weirdness???
From: Keir Fraser <keir.fraser@xxxxxxxxxxxxx>
Date: Fri, 15 Aug 2008 08:52:15 +0100
Delivery-date: Fri, 15 Aug 2008 00:52:40 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <48A4E7EB.2080509@xxxxxxxxxx>
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>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
Thread-index: Acj+q9U1E4ezn2qfEd25tAAWy6hiGQ==
Thread-topic: [Xen-devel] nmi cache weirdness???
User-agent: Microsoft-Entourage/
On 15/8/08 03:20, "Mukesh Rathor" <mukesh.rathor@xxxxxxxxxx> wrote:

> However, in do_nmi(), nmi_callback still points to dummy (receiving cpus).
> What'sinteresting is, if I put two print lines back to back with nothing
> in between right at the beginning, then the first prints dummy but the
> second prints kdb_nmi_receive. I'm at a complete loss. Does NMI change
> cache protocol? I've been looking thru Intel/AMD manuals, but nothing....

What you describe is indeed impossible. My guess is that the NMI executing
on the other CPUs is not the one triggered by smp_send_nmi_allbutself()
immediately after set_nmi_callback(). For example, it could be a watchdog
NMI or something like that.

smp_send_nmi_allbutself() is not safe to call from within NMI context.
send_IPI_mask() is not atomic, and it would be possible for an NMI handler
to interrupt it, reenter it, and corrupt the IPI state being set up by the
context that got interrupted. You can make it safe by saving/restoring the
top half of the APIC ICR register, as that's what would get corrupted.

 -- Keir

Xen-devel mailing list

<Prev in Thread] Current Thread [Next in Thread>