On Mon, Jun 10, 2024 at 05:10:42PM +0000, Petr Beneš wrote: > From: Petr Beneš <w1be...@gmail.com> > > Introduce a new altp2m_count parameter to control the maximum number of altp2m > views a domain can use. By default, if altp2m_count is unspecified and altp2m > is enabled, the value is set to 10, reflecting the legacy behavior. > > This change is preparatory; it establishes the groundwork for the feature but > does not activate it. > > Signed-off-by: Petr Beneš <w1be...@gmail.com> > --- > tools/golang/xenlight/helpers.gen.go | 2 ++ > tools/golang/xenlight/types.gen.go | 1 + > tools/include/libxl.h | 8 ++++++++ > tools/libs/light/libxl_create.c | 9 +++++++++ > tools/libs/light/libxl_types.idl | 1 + > tools/xl/xl_parse.c | 9 +++++++++ > 6 files changed, 30 insertions(+) > > diff --git a/tools/include/libxl.h b/tools/include/libxl.h > index f5c7167742..bfa06caad2 100644 > --- a/tools/include/libxl.h > +++ b/tools/include/libxl.h > @@ -1250,6 +1250,14 @@ typedef struct libxl__ctx libxl_ctx; > */ > #define LIBXL_HAVE_ALTP2M 1 > > +/* > + * LIBXL_HAVE_ALTP2M_COUNT > + * If this is defined, then libxl supports setting the maximum number of > + * alternate p2m tables. > + */ > +#define LIBXL_HAVE_ALTP2M_COUNT 1 > +#define LIBXL_ALTP2M_COUNT_DEFAULT (~(uint32_t)0)
Can you move this define (LIBXL_ALTP2M_COUNT_DEFAULT) out of the public header? I don't think this needs to be known to application using libxl (like xl). You can move it to "libxl_internal.h", I don't think there's a better place and there's already a few "default" (more like initial value) define there. Beside that, the patch looks fine, so with that change: Reviewed-by: Anthony PERARD <anthony.per...@vates.tech> Thanks, -- Anthony Perard | Vates XCP-ng Developer XCP-ng & Xen Orchestra - Vates solutions web: https://vates.tech