From mboxrd@z Thu Jan 1 00:00:00 1970 From: Patrick Colp Subject: Re: [PATCH] Use fixed-width types in the memory event interface Date: Tue, 29 Jun 2010 07:28:24 -0700 Message-ID: References: <20100629134707.GF31695@whitby.uk.xensource.com> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Return-path: In-Reply-To: <20100629134707.GF31695@whitby.uk.xensource.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: Tim Deegan Cc: xen-devel@lists.xensource.com List-Id: xen-devel@lists.xenproject.org On 29 June 2010 06:47, Tim Deegan wrote: > Set the types in the public memory_event header file to use fixed-sized > and self-aligned fields rather than "unsigned long". =C2=A0AIUI this feat= ure > only works with 64-bit hypervisors but I think this change will be > necessary to use 32-on-64 dom0 tools. > > This breaks compatibility with older builds of the tools, but I can't > see any way to avoid it short of __attribute__((__packed__)). > > I'd like an ack/nack from Patrick on this, please. > > Signed-off-by: Tim Deegan Acked-by: Patrick Colp > diff -r 7b00193bd033 xen/include/public/mem_event.h > --- a/xen/include/public/mem_event.h =C2=A0 =C2=A0Mon Jun 28 17:40:16 201= 0 +0100 > +++ b/xen/include/public/mem_event.h =C2=A0 =C2=A0Tue Jun 29 14:38:06 201= 0 +0100 > @@ -40,14 +40,14 @@ > > > =C2=A0typedef struct mem_event_shared_page { > - =C2=A0 =C2=A0int port; > + =C2=A0 =C2=A0uint32_t port; > =C2=A0} mem_event_shared_page_t; > > =C2=A0typedef struct mem_event_st { > - =C2=A0 =C2=A0unsigned long gfn; > - =C2=A0 =C2=A0unsigned long offset; > - =C2=A0 =C2=A0unsigned long p2mt; > - =C2=A0 =C2=A0int vcpu_id; > + =C2=A0 =C2=A0uint64_t gfn; > + =C2=A0 =C2=A0uint64_t offset; > + =C2=A0 =C2=A0uint32_t p2mt; > + =C2=A0 =C2=A0int32_t vcpu_id; > =C2=A0 =C2=A0 uint64_t flags; > =C2=A0} mem_event_request_t, mem_event_response_t; > > >