[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Xen-devel] [PATCH v6 01/10] xen: vnuma topology and subop hypercalls



On Tue, Jul 22, 2014 at 11:18 AM, Dario Faggioli
<dario.faggioli@xxxxxxxxxx> 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
>
> --
> <<This happens because I choose it to happen!>> (Raistlin Majere)
> -----------------------------------------------------------------
> Dario Faggioli, Ph.D, http://about.me/dario.faggioli
> Senior Software Engineer, Citrix Systems R&D Ltd., Cambridge (UK)
>



-- 
Elena

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.