|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] [PATCH v2 1/7] xen: vNUMA support for guests.
[ This series hasn't been threaded correctly, please ensure you use the
--compose option to git send-email to write the cover letter. ]
On 14/11/13 03:26, Elena Ufimtseva wrote:
> --- /dev/null
> +++ b/xen/include/public/vnuma.h
> @@ -0,0 +1,44 @@
> +#ifndef _XEN_PUBLIC_VNUMA_H
> +#define _XEN_PUBLIC_VNUMA_H
> +#include "memory.h"
> +#include "xen.h"
> +
> +/*
> + * Following structures are used to represent vNUMA
> + * topology to guest if requested.
> + */
> +
> +/*
> + * Memory ranges can be used to define
> + * vNUMA memory node boundaries by the
> + * linked list. As of now, only one range
> + * per domain is suported.
> + */
> +
> +struct vmemrange {
> + uint64_t start, end;
> + struct vmemrange *next;
I think this probably wants to be an index into the vmemrange array in
struct vnuma_topology_info. It certainly cannot be a bare pointer like
this.
> +};
> +typedef struct vmemrange vmemrange_t;
> +DEFINE_XEN_GUEST_HANDLE(vmemrange_t);
> +
> +/*
> + * vNUMA topology specifies vNUMA node
> + * number, distance table, memory ranges and
> + * vcpu mapping provided for guests.
> + */
> +
> +struct vnuma_topology_info {
> + /* IN */
> + domid_t domid;
> + uint32_t _pad;
> + /* OUT */
> + XEN_GUEST_HANDLE(uint) nr_vnodes;
> + XEN_GUEST_HANDLE(uint) vdistance;
> + XEN_GUEST_HANDLE(uint) vcpu_to_vnode;
> + XEN_GUEST_HANDLE(vmemrange_t) vmemrange;
> +};
XEN_GUEST_HANDLE() has different size in 32-bit and 64-bit x86 but you
have no compat code to translate the structure.
Using:
union {
XEN_GUEST_HANDLE(uint) h;
uint64_t _pad;
} nr_vnodes;
for each field would produce a struct with a uniform ABI. See the
recently added struct xen_kexec_segment for an example.
David
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |