From: Ian Campbell Subject: Re: [PATCH 04/13] xen: sync public headers Date: Fri, 8 Feb 2013 19:55:02 +0000 Message-ID: <1360353302.9063.67.camel@dagon.hellion.org.uk> References: <20130205170006.GE2187@konrad-lan.dumpdata.com> <1360085020.7477.167.camel@zion.uk.xensource.com> <20130206165709.GC24458@konrad-lan.dumpdata.com> <291EDFCB1E9E224A99088639C4762022013F457554D9@LONPMAILBOX01.citrite.net> <1360238260.2536.22.camel@zion.uk.xensource.com> <291EDFCB1E9E224A99088639C4762022013F457557B1@LONPMAILBOX01.citrite.net> <1360340574.29432.70.camel@zakaz.uk.xensource.com> <291EDFCB1E9E224A99088639C4762022013F457557C0@LONPMAILBOX01.citrite.net> <20130208164936.GB93591@ocelot.phlegethon.org> <1360342741.29432.85.camel@zakaz.uk.xensource.com> <20130208170630.GE93591@ocelot.phlegethon.org> <1360343378.29432.89.camel@zakaz.uk.xensource.com> <511555D0.5010208@citrix.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <511555D0.5010208@citrix.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: David Vrabel Cc: Wei Liu , Konrad Rzeszutek Wilk , "Tim (Xen.org)" , "xen-devel@lists.xen.org" , Paul Durrant , "jbeulich@suse.com" List-Id: xen-devel@lists.xenproject.org On Fri, 2013-02-08 at 19:45 +0000, David Vrabel wrote: > On 08/02/13 17:09, Ian Campbell wrote: > > > > Actually, Stefano and I were discussing this the other day, the use of > > unsigned long in the evtchn stuff on ARM32 is a 32/64 ABI snafu and > > should be fixed -- using xen_ulong_t would fix this too... > > Keep in mind that it must be possible to do an atomic xchg() on the > vcpu_info's evtchn_pending_sel word. I don't think 64-bit words will > work with a 32-bit ARM guest. ARM (at least the variants we care about) has load/store exclusive, including a double word sized option (ldrexd/strexd), so this is fine. I think the double word variants were introduced along with LPAE, so you can update a PTE atomically. I also suspect it would be fine to treat a 64-bit word as two independent 32-bit halves which must be accessed atomically, at least for the purposes of updating the pending sel word(assumnig h/v and guest agree on this), but thankfully due to the above I don't have to think about it *too* hard to be sure ;-) Ian.