From: David Vrabel <david.vrabel@citrix.com>
To: Elena Ufimtseva <ufimtseva@gmail.com>
Cc: keir@xen.org, stefano.stabellini@eu.citrix.com,
george.dunlap@eu.citrix.com, msw@linux.com,
dario.faggioli@citrix.com, lccycc123@gmail.com,
xen-devel@lists.xen.org, JBeulich@suse.com
Subject: Re: [PATCH v2 1/7] xen: vNUMA support for guests.
Date: Thu, 14 Nov 2013 11:48:02 +0000 [thread overview]
Message-ID: <5284B872.1090808@citrix.com> (raw)
In-Reply-To: <1384399569-23969-1-git-send-email-ufimtseva@gmail.com>
[ 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
next prev parent reply other threads:[~2013-11-14 11:48 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-11-14 3:26 [PATCH v2 1/7] xen: vNUMA support for guests Elena Ufimtseva
2013-11-14 11:18 ` Dario Faggioli
2013-11-14 21:43 ` George Dunlap
2013-11-15 8:28 ` Jan Beulich
2013-11-14 11:48 ` David Vrabel [this message]
2013-11-14 12:11 ` Dario Faggioli
2013-11-14 14:09 ` Elena Ufimtseva
2013-11-14 21:59 ` George Dunlap
2013-11-14 22:51 ` Elena Ufimtseva
2013-11-14 23:51 ` George Dunlap
2013-11-15 8:50 ` Jan Beulich
2013-11-15 14:14 ` Elena Ufimtseva
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=5284B872.1090808@citrix.com \
--to=david.vrabel@citrix.com \
--cc=JBeulich@suse.com \
--cc=dario.faggioli@citrix.com \
--cc=george.dunlap@eu.citrix.com \
--cc=keir@xen.org \
--cc=lccycc123@gmail.com \
--cc=msw@linux.com \
--cc=stefano.stabellini@eu.citrix.com \
--cc=ufimtseva@gmail.com \
--cc=xen-devel@lists.xen.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).