Zephyr API Documentation  3.6.99
A Scalable Open Source RTOS
Loading...
Searching...
No Matches
memory.h File Reference

Go to the source code of this file.

Functions

int xendom_add_to_physmap (int domid, unsigned long idx, unsigned int space, xen_pfn_t gpfn)
 Add mapping for specified page frame in Xen domain physmap.
 
int xendom_add_to_physmap_batch (int domid, int foreign_domid, unsigned int space, unsigned int size, xen_ulong_t *idxs, xen_pfn_t *gpfns, int *errs)
 Add mapping for specified set of page frames to Xen domain physmap.
 
int xendom_remove_from_physmap (int domid, xen_pfn_t gpfn)
 Removes page frame from Xen domain physmap.
 
int xendom_populate_physmap (int domid, unsigned int extent_order, unsigned int nr_extents, unsigned int mem_flags, xen_pfn_t *extent_start)
 Populate specified Xen domain page frames with memory.
 

Function Documentation

◆ xendom_add_to_physmap()

int xendom_add_to_physmap ( int  domid,
unsigned long  idx,
unsigned int  space,
xen_pfn_t  gpfn 
)

Add mapping for specified page frame in Xen domain physmap.

Parameters
domiddomain id, where mapping will be added. For unprivileged should be DOMID_SELF.
idxindex into space being mapped.
spaceXENMAPSPACE_* mapping space identifier.
gpfnpage frame where the source mapping page should appear.
Returns
zero on success, negative errno on error.

◆ xendom_add_to_physmap_batch()

int xendom_add_to_physmap_batch ( int  domid,
int  foreign_domid,
unsigned int  space,
unsigned int  size,
xen_ulong_t idxs,
xen_pfn_t gpfns,
int *  errs 
)

Add mapping for specified set of page frames to Xen domain physmap.

Parameters
domiddomain id, where mapping will be added. For unprivileged should be DOMID_SELF.
foreign_domidfor gmfn_foreign - domain id, whose pages being mapped, 0 for other.
spaceXENMAPSPACE_* mapping space identifier.
sizenumber of page frames being mapped.
idxsarray of indexes into space being mapped.
gpfnsarray of page frames where the mapping should appear.
errsarray of per-index error codes.
Returns
zero on success, negative errno on error.

◆ xendom_populate_physmap()

int xendom_populate_physmap ( int  domid,
unsigned int  extent_order,
unsigned int  nr_extents,
unsigned int  mem_flags,
xen_pfn_t extent_start 
)

Populate specified Xen domain page frames with memory.

Parameters
domiddomain id, where mapping will be added. For unprivileged should be DOMID_SELF.
extent_ordersize/alignment of each extent (size is 2^extent_order), e.g. 0 for 4K extents, 9 for 2M etc.
nr_extentsnumber of page frames being populated.
mem_flagsN/A, should be 0 for Arm.
extent_startpage frame bases of extents to populate with memory.
Returns
number of populated frames success, negative errno on error.

◆ xendom_remove_from_physmap()

int xendom_remove_from_physmap ( int  domid,
xen_pfn_t  gpfn 
)

Removes page frame from Xen domain physmap.

Parameters
domiddomain id, whose page is going to be removed. For unprivileged should be DOMID_SELF.
gpfnpage frame number, that needs to be removed
Returns
zero on success, negative errno on error.