[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [PATCH 09/11] tools/xc: Add `node` argument to xc_domain_claim_pages()
On Fri, Mar 14, 2025 at 05:25:00PM +0000, Alejandro Vallejo wrote: > Add a node argument to make an exact-node claim. NUMA_NO_NODE means to > make a regular any-node claim. > > No functional change. > > Signed-off-by: Alejandro Vallejo <alejandro.vallejo@xxxxxxxxx> > --- > tools/include/xenctrl.h | 1 + > tools/libs/ctrl/xc_domain.c | 13 ++++++++++++- > tools/libs/guest/xg_dom_x86.c | 8 +++++--- > 3 files changed, 18 insertions(+), 4 deletions(-) > > diff --git a/tools/include/xenctrl.h b/tools/include/xenctrl.h > index 495598123133..2b63992e1246 100644 > --- a/tools/include/xenctrl.h > +++ b/tools/include/xenctrl.h > @@ -1322,6 +1322,7 @@ int xc_domain_populate_physmap_exact(xc_interface *xch, > > int xc_domain_claim_pages(xc_interface *xch, > uint32_t domid, > + unsigned int node, > unsigned long nr_pages); > > int xc_domain_memory_exchange_pages(xc_interface *xch, > diff --git a/tools/libs/ctrl/xc_domain.c b/tools/libs/ctrl/xc_domain.c > index 2ddc3f4f426d..f2c6eda875dc 100644 > --- a/tools/libs/ctrl/xc_domain.c > +++ b/tools/libs/ctrl/xc_domain.c > @@ -20,6 +20,7 @@ > */ > > #include "xc_private.h" > +#include "xenguest.h" > #include <xen/memory.h> > #include <xen/hvm/hvm_op.h> > > @@ -1072,13 +1073,23 @@ int xc_domain_remove_from_physmap(xc_interface *xch, > > int xc_domain_claim_pages(xc_interface *xch, > uint32_t domid, > + unsigned int node, > unsigned long nr_pages) > { > int err; > + unsigned int mem_flags = 0; > + > + if ( node != XC_NUMA_NO_NODE ) > + { > + if ( node >= 0xFF ) You should have XENMEMF_node_mask available here which is better than open-coding 0xff. Thanks, Roger.
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |