From: Wei Liu Subject: Re: [PATCH 04/13] xen: sync public headers Date: Thu, 7 Feb 2013 11:57:40 +0000 Message-ID: <1360238260.2536.22.camel@zion.uk.xensource.com> References: <1359643627-29486-1-git-send-email-wei.liu2@citrix.com> <1359643627-29486-5-git-send-email-wei.liu2@citrix.com> <20130205170006.GE2187@konrad-lan.dumpdata.com> <1360085020.7477.167.camel@zion.uk.xensource.com> <20130206165709.GC24458@konrad-lan.dumpdata.com> <291EDFCB1E9E224A99088639C4762022013F457554D9@LONPMAILBOX01.citrite.net> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <291EDFCB1E9E224A99088639C4762022013F457554D9@LONPMAILBOX01.citrite.net> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Paul Durrant Cc: wei.liu2@citrix.com, Ian Campbell , Konrad Rzeszutek Wilk , "xen-devel@lists.xen.org" , David Vrabel , "jbeulich@suse.com" List-Id: xen-devel@lists.xenproject.org On Thu, 2013-02-07 at 09:22 +0000, Paul Durrant wrote: > > -----Original Message----- > [snip] > > > > > -#define NR_EVENT_CHANNELS (sizeof(unsigned long) * > > > > > sizeof(unsigned long) * 64) > > > > > +#define NR_EVENT_CHANNELS_L2 (sizeof(unsigned long) * > > > > > +sizeof(unsigned long) * 64) > > > > > > > > We did a bit of header change to make the ARM code always use > > > > 'unsinged long long' on 32-bit (so it is a nice 8-bytes) and > > > > 'unsigned long' on 64-bit. This was all done using the xen_pfn_t and > > xen_mfn_t typdefs. > > > > > > > > Any chance you can do that here? That way on ARM - irregardless if > > > > it is 32-bit or 64-bit it is always of the 64-bit size? > > > > > > > > > > I don't think so. The reason to use unsigned long here is to guarantee > > > each selector (in 2-level case there is only L1 selector) fits into a > > > word. > > > > That's still going to be a problem with Windows drivers. Unfortunately MSVC uses a 64-bit model where longs are still 32-bit. The only thing that is word size is a pointer. Any chance we can use uintptr_t rather than an unsigned long? (At the moment I have to sed all the public headers to replace long with LONG_PTR and it's a PITA). > TBH I don't know much about Windows. But are you suggesting replace all the relevant bit in the header or just the specific event channel interface? Wei. > Paul