libs/xg: allow caller to provide extra memflags for populate physmap

Introduce an additional memflags field to the xc_dom_image and
xc_sr_context structures and use it to pass additional memflags to use when
populating the domain physmap.

No meaningful usages of this new field are added as part of the patch.  The
only know usage will be from the XAPI domain builder, which lives in a
different repository.

Signed-off-by: Roger Pau Monné <roger.pau@citrix.com>
Acked-by: Anthony PERARD <anthony.perard@vates.tech>
This commit is contained in:
Roger Pau Monne committed 2026-01-07 18:24:51 +01:00
1 parent b068cafc73
commit a76278016e
6 files changed
+27 -11

No files matched your search

+7 -1
View File
@@ -242,6 +242,9 @@ struct xc_dom_image {
/* Number of vCPUs */
unsigned int max_vcpus;
/* Caller provided memflags to use when populating physmap. */
unsigned int memflags;
};
/* --- arch specific hooks ----------------------------------------- */
@@ -611,6 +614,8 @@ struct restore_callbacks {
* specific data
* @param send_back_fd Only used for XC_STREAM_COLO. Contains backchannel to
* the source side.
* @param memflags Optional memflags to pass in
* xc_domain_populate_physmap{_exact}() calls.
* @return 0 on success, -1 on failure
*/
int xc_domain_restore(xc_interface *xch, int io_fd, uint32_t dom,
@@ -618,7 +623,8 @@ int xc_domain_restore(xc_interface *xch, int io_fd, uint32_t dom,
uint32_t store_domid, unsigned int console_evtchn,
unsigned long *console_mfn, uint32_t console_domid,
xc_stream_type_t stream_type,
struct restore_callbacks *callbacks, int send_back_fd);
struct restore_callbacks *callbacks, int send_back_fd,
unsigned int memflags);
/**
* This function will create a domain for a paravirtualized Linux
Reference in new issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.