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] regression from c/s 22071:c5aed2e049bc (ept: Put locks a

To: Jan Beulich <JBeulich@xxxxxxxxxx>, George Dunlap <George.Dunlap@xxxxxxxxxxxxx>
Subject: Re: [Xen-devel] regression from c/s 22071:c5aed2e049bc (ept: Put locks around ept_get_entry) ?
From: Keir Fraser <keir@xxxxxxx>
Date: Thu, 16 Dec 2010 16:12:18 +0000
Cc: Christoph Egger <Christoph.Egger@xxxxxxx>, "xen-devel@xxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxx>
Delivery-date: Thu, 16 Dec 2010 08:12:58 -0800
Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:sender:user-agent:date :subject:from:to:cc:message-id:thread-topic:thread-index:in-reply-to :mime-version:content-type:content-transfer-encoding; bh=04uwxbDtg+YwwxZoXsU1zBdHS9qz0yQ1xy7sYAtkZVE=; b=wmSnZJRmeQOA/rqHfHImHYCBvkFELJovg10gwB04hwN1ZbubOJs6O1ShmmR/zlakHy Qq1nCTevritG/nzdNAZrFpRW2fe4QPz8WljKzm4BgL1+rnuImjBvIj3ipyt92EelMtQe a9KKxa29rB3+kvLFJuSPFA1xoxzfAwuNHQ/MM=
Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=sender:user-agent:date:subject:from:to:cc:message-id:thread-topic :thread-index:in-reply-to:mime-version:content-type :content-transfer-encoding; b=wZ0ZJZ0N/260X5U6nNSqQwbB6PVutUhC2ZB1muWEB2tBxOy7A/f758rgol9BW4KXgi sWFe+UkumPmkux3Z1EY89Y39BquJ3BLoOCP2s7UyqdqymbMkl1tZFsvH2KtxbjZ6Oxeh /yyw7b256hPqeRYumdiSbDSwsGI5SRGechOBI=
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <4D0A439802000078000286FC@xxxxxxxxxxxxxxxxxx>
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: AcudPALB5yum4aHtWUOCRg8kvpRyrA==
Thread-topic: [Xen-devel] regression from c/s 22071:c5aed2e049bc (ept: Put locks around ept_get_entry) ?
User-agent: Microsoft-Entourage/12.28.0.101117
On 16/12/2010 15:51, "Jan Beulich" <JBeulich@xxxxxxxxxx> wrote:

>>>> On 14.12.10 at 11:47, George Dunlap <George.Dunlap@xxxxxxxxxxxxx> wrote:
>> Attached is a ported patch that removes locking in ept_get_entry(),
>> and implements access-once semantics for reading and writing.  This
>> solves the original problem (a race between reading and writing the
>> table) without causing deadlocks.  I haven't had a chance to test it
>> -- can you give it a spin?
> 
> I think this is missing some barrier() instances (or volatile
> qualifiers). Without them, I don't think there's a guarantee
> that the single memory access in the source won't be
> converted to multiple ones at the compiler's discretion.

Probably a similar assumption to what we make in x86_64's pte_write_atomic()
implementation? Possibly pte_{read,write}_atomic() should cast the pte
pointer to volatile, and the EPT reads/writes should be similarly wrapped in
macros which do casting. I'm sure we make various other assumptions about
read/write atomicity in Xen, but aiming to fix them as we find them is maybe
not a bad idea.

If that sounds good, I can propose a patch?

 -- Keir

> Jan
> 
> 
> _______________________________________________
> 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>