From mboxrd@z Thu Jan 1 00:00:00 1970 From: Elena Ufimtseva Subject: Re: [PATCH v6 01/10] xen: vnuma topology and subop hypercalls Date: Wed, 23 Jul 2014 01:33:51 -0400 Message-ID: References: <1405662609-31486-1-git-send-email-ufimtseva@gmail.com> <1405662609-31486-2-git-send-email-ufimtseva@gmail.com> <20140718103034.GA7142@zion.uk.xensource.com> <20140720155918.GB26184@zion.uk.xensource.com> <1406042287.17850.78.camel@Solace> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <1406042287.17850.78.camel@Solace> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Dario Faggioli Cc: Keir Fraser , Ian Campbell , Stefano Stabellini , George Dunlap , Matt Wilson , Li Yechen , Ian Jackson , "xen-devel@lists.xen.org" , Jan Beulich , Wei Liu List-Id: xen-devel@lists.xenproject.org On Tue, Jul 22, 2014 at 11:18 AM, Dario Faggioli wrote: > On dom, 2014-07-20 at 16:59 +0100, Wei Liu wrote: >> On Sun, Jul 20, 2014 at 09:16:11AM -0400, Elena Ufimtseva wrote: > >> > >> +struct vnuma_topology_info { >> > >> + /* IN */ >> > >> + domid_t domid; >> > >> + /* IN/OUT */ >> > >> + unsigned int nr_vnodes; >> > >> + unsigned int nr_vcpus; >> > >> + /* OUT */ >> > >> + union { >> > >> + XEN_GUEST_HANDLE(uint) h; >> > >> + uint64_t pad; >> > >> + } vdistance; >> > >> + union { >> > >> + XEN_GUEST_HANDLE(uint) h; >> > >> + uint64_t pad; >> > >> + } vcpu_to_vnode; >> > >> + union { >> > >> + XEN_GUEST_HANDLE(vmemrange_t) h; >> > >> + uint64_t pad; >> > >> + } vmemrange; >> > > >> > > Why do you need to use union? The other interface you introduce in this >> > > patch doesn't use union. >> > >> > This is one is for making sure on 32 and 64 bits the structures are of >> > the same size. >> > >> >> I can see other similiar occurences of XEN_GUEST_HANDLE don't need >> padding. Did I miss something? >> > I remember this coming up during review of an earlier version of Elena's > series, and I think I also remember the union with padding solution > being suggested, but I don't remember which round it was, and who > suggested it... Elena, up for some digging in your inbox (or xen-devel > archives)? :-P > Yes, sure, I do remember that! David offered to construct this that way, as digging reveals: http://lists.xenproject.org/archives/html/xen-devel/2013-11/msg02065.html > Regards, > Dario > > -- > <> (Raistlin Majere) > ----------------------------------------------------------------- > Dario Faggioli, Ph.D, http://about.me/dario.faggioli > Senior Software Engineer, Citrix Systems R&D Ltd., Cambridge (UK) > -- Elena