WARNING - OLD ARCHIVES

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/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-devel

Re: [Xen-devel] NMI Race

To: "Peter Teoh" <tthtlc@xxxxxxxxxxxxxx>,<xen-devel@xxxxxxxxxxxxxxxxxxx>
Subject: Re: [Xen-devel] NMI Race
From: Mats Petersson <mats@xxxxxxxxxxxxxxxxx>
Date: Thu, 02 Aug 2007 15:23:49 +0100
Delivery-date: Thu, 02 Aug 2007 07:21:45 -0700
Dkim-signature: a=rsa-sha1; c=relaxed/relaxed; d=googlemail.com; s=beta; h=domainkey-signature:received:received:x-mailer:date:to:from:subject:in-reply-to:references:mime-version:content-type:sender:message-id; b=M2lJaDkTSBZf3uESZxoDc2Gr6UQa0bcdHv5//nDPToGoO6qBS1PIC2pYP3Wyqul6Il0nyp5jBpBN1yQA5Yc71EImTm86qRcZXbsqTu7LHg6Ng+eZXRWQOcHpaC8obwonp2EJnWGsrEa4pQRkJGhgNqjNhFQQ/CSbxTS5I2uxE1I=
Domainkey-signature: a=rsa-sha1; c=nofws; d=googlemail.com; s=beta; h=received:x-mailer:date:to:from:subject:in-reply-to:references:mime-version:content-type:sender:message-id; b=uLcIPGXflJ6ZBRECEmkzYV/Xjr2KyH8AWegTJ95Axsr0eCk2dh3oiUzucXAJAdOuZd/Dhz9Ynj8AldJOfdAsqdmTEqd8Hq0TeKOfbC2ZjRalKklV8+Zo+CG0r18ahp4EthJj8qKAvjSCIQLpyOJMe8B0WFot6izmqfAqWvLcg5E=
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
In-reply-to: <011501c7d50f$c6af6e40$ad11800a@eeyore>
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/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
References: <011501c7d50f$c6af6e40$ad11800a@eeyore>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
At 15:16 02/08/2007, Peter Teoh wrote:
I saw the following in xen\arch\x86\domain.c:

    /*
     * Map Xen segments into every VCPU's GDT, irrespective of whether every
     * VCPU will actually be used. This avoids an NMI race during context
* switch: if we take an interrupt after switching CR3 but before switching * GDT, and the old VCPU# is invalid in the new domain, we would otherwise
     * try to load CS from an invalid table.
     */
Can someone please elaborate on this "NMI race"? Ie, Between which functions called, for example?

Not sure if there is a "function call" as such - it's more a case of "if someone changes CR3, followed by an NMI", then if not all GDT are in visible on all VCPU's, the NMI will fail because it's trying to read the GDT, and the GDT is unavailable in the memory map pointed to by CR3.

So the race is between setting CR3 and setting GDT and NMI's.

--
Mats


(X-Ref:
<http://osdir.com/ml/emulators.xen.cvs/2005-10/msg00300.html>http://osdir.com/ml/emulators.xen.cvs/2005-10/msg00300.html for more details).

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel


_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel

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