Re: [Xen-devel] [PATCH v5 05/24] libxc: allocate memory with vNUMA information for PV guest

2015-02-16 Thread Wei Liu
On Mon, Feb 16, 2015 at 04:58:11PM +, Dario Faggioli wrote: On Thu, 2015-02-12 at 19:44 +, Wei Liu wrote: @@ -760,7 +760,8 @@ static int x86_shadow(xc_interface *xch, domid_t domid) int arch_setup_meminit(struct xc_dom_image *dom) { int rc; -xen_pfn_t pfn, allocsz,

Re: [Xen-devel] [PATCH v5 05/24] libxc: allocate memory with vNUMA information for PV guest

2015-02-16 Thread Dario Faggioli
On Thu, 2015-02-12 at 19:44 +, Wei Liu wrote: @@ -760,7 +760,8 @@ static int x86_shadow(xc_interface *xch, domid_t domid) int arch_setup_meminit(struct xc_dom_image *dom) { int rc; -xen_pfn_t pfn, allocsz, i, j, mfn; +xen_pfn_t pfn, allocsz, mfn, total, pfn_base; +

Re: [Xen-devel] [PATCH v5 05/24] libxc: allocate memory with vNUMA information for PV guest

2015-02-13 Thread Wei Liu
On Fri, Feb 13, 2015 at 02:30:30PM +, Andrew Cooper wrote: On 12/02/15 19:44, Wei Liu wrote: diff --git a/tools/libxc/xc_private.h b/tools/libxc/xc_private.h index 45b8644..1809674 100644 --- a/tools/libxc/xc_private.h +++ b/tools/libxc/xc_private.h @@ -35,6 +35,8 @@ #include

Re: [Xen-devel] [PATCH v5 05/24] libxc: allocate memory with vNUMA information for PV guest

2015-02-13 Thread Andrew Cooper
On 12/02/15 19:44, Wei Liu wrote: diff --git a/tools/libxc/xc_private.h b/tools/libxc/xc_private.h index 45b8644..1809674 100644 --- a/tools/libxc/xc_private.h +++ b/tools/libxc/xc_private.h @@ -35,6 +35,8 @@ #include xen/sys/privcmd.h +#define XC_VNUMA_NO_NODE (~0U) Shouldn't this

Re: [Xen-devel] [PATCH v5 05/24] libxc: allocate memory with vNUMA information for PV guest

2015-02-13 Thread Andrew Cooper
On 13/02/15 15:05, Wei Liu wrote: On Fri, Feb 13, 2015 at 02:30:30PM +, Andrew Cooper wrote: On 12/02/15 19:44, Wei Liu wrote: diff --git a/tools/libxc/xc_private.h b/tools/libxc/xc_private.h index 45b8644..1809674 100644 --- a/tools/libxc/xc_private.h +++ b/tools/libxc/xc_private.h @@

[Xen-devel] [PATCH v5 05/24] libxc: allocate memory with vNUMA information for PV guest

2015-02-12 Thread Wei Liu
From libxc's point of view, it only needs to know vnode to pnode mapping and size of each vnode to allocate memory accordingly. Add these fields to xc_dom structure. The caller might not pass in vNUMA information. In that case, a dummy layout is generated for the convenience of libxc's allocation