[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [XenPPC] [rfc] [patch] 64-bitize guest handles
On Wed, 2006-06-28 at 15:02 -0400, Jimi Xenidis wrote: > On Jun 28, 2006, at 1:10 PM, Hollis Blanchard wrote: > > > On Wed, 2006-06-28 at 06:34 -0400, Jimi Xenidis wrote: > >> > >> #define set_xen_guest_handle(hnd, val) \ > >> do { \ > >> if (sizeof ((hnd).__pad)) \ > >> (hnd).__pad = 0; \ > >> (hnd).p = val; \ > >> } while (0) > > > > I like the union better than a struct with carefully-constructed > > non-overlapping members. > > hmm, really! Ok, then you will have to also fix: > #define get_xen_guest_handle(val, hnd) do { val = (hnd).p; } > while (0) > > or the 32bit caller will only get the high-order 32bit into val. Oh, yeah. I remember getting that wrong last time this came up, too. > > Also, the separate assignment to 0 would be avoided. > > In 32 bits the store in of a long long is still 2 stw instructions, > and the conditional will get optimized away so the instruction > sequence is equivalent. > > I'll leave it to you. OK, I guess I'll just go with the struct hackery (though I think it's ugly as hell :) . Of course, before committing I was hoping to find out from you if it helps with the memory_reservation problem you were having. Does it? -- Hollis Blanchard IBM Linux Technology Center _______________________________________________ Xen-ppc-devel mailing list Xen-ppc-devel@xxxxxxxxxxxxxxxxxxx http://lists.xensource.com/xen-ppc-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |