|
Zephyr API Documentation 4.4.99
A Scalable Open Source RTOS
|
Manage domain physmaps and Xen-owned resources. More...
Files | |
| file | memory.h |
| Xen memory management operations. | |
Functions | |
| int | xendom_add_to_physmap (int domid, unsigned long idx, unsigned int space, xen_pfn_t gpfn) |
| Add a single mapping to a 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 multiple mappings to a domain physmap. | |
| int | xendom_remove_from_physmap (int domid, xen_pfn_t gpfn) |
| Remove a mapping from a 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 guest frames with memory. | |
| int | xendom_acquire_resource (domid_t domid, uint16_t type, uint32_t id, uint64_t frame, uint32_t *nr_frames, xen_pfn_t *frame_list) |
| Acquire a Xen-managed resource mapping for a domain. | |
Manage domain physmaps and Xen-owned resources.
| int xendom_acquire_resource | ( | domid_t | domid, |
| uint16_t | type, | ||
| uint32_t | id, | ||
| uint64_t | frame, | ||
| uint32_t * | nr_frames, | ||
| xen_pfn_t * | frame_list ) |
#include <zephyr/xen/memory.h>
Acquire a Xen-managed resource mapping for a domain.
| domid | Target domain identifier. | |
| type | Xen resource type, for example XENMEM_resource_ioreq_server. | |
| id | Resource instance identifier interpreted according to type. | |
| frame | Starting frame within the Xen resource. Ignored when *nr_frames is 0 (size query). | |
| [in,out] | nr_frames | On entry, number of frames to acquire. On return, the number of frames that Xen reports for the request. |
| [out] | frame_list | Guest frame list buffer: input GFNs for HVM guests, output MFNs for PV guests. |
#include <zephyr/xen/memory.h>
Add a single mapping to a domain physmap.
| domid | Domain whose physmap is updated. Unprivileged callers must use DOMID_SELF. |
| idx | Index within the Xen mapping space identified by space. |
| space | Mapping space selector, typically one of the XENMAPSPACE_* constants. |
| gpfn | Guest frame number where the mapping becomes visible. |
| 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 ) |
#include <zephyr/xen/memory.h>
Add multiple mappings to a domain physmap.
| domid | Domain whose physmap is updated. Unprivileged callers must use DOMID_SELF. | |
| foreign_domid | Foreign domain identifier used with XENMAPSPACE_gmfn_foreign. Pass 0 for the other mapping spaces. | |
| space | Mapping space selector, typically one of the XENMAPSPACE_* constants. | |
| size | Number of mappings described by the arrays. | |
| idxs | Array of mapping-space indexes. | |
| gpfns | Array of guest frame numbers that receive the mappings. | |
| [out] | errs | Array that receives a per-entry Xen status code. |
| int xendom_populate_physmap | ( | int | domid, |
| unsigned int | extent_order, | ||
| unsigned int | nr_extents, | ||
| unsigned int | mem_flags, | ||
| xen_pfn_t * | extent_start ) |
#include <zephyr/xen/memory.h>
Populate guest frames with memory.
| domid | Domain whose physmap is populated. Unprivileged callers must use DOMID_SELF. |
| extent_order | Extent order used by Xen, where each extent covers 2^extent_order pages. |
| nr_extents | Number of entries in extent_start. |
| mem_flags | Xen memory flags. Arm guests currently pass 0. |
| extent_start | Array of guest frame numbers that receive the populated extents. |
| int xendom_remove_from_physmap | ( | int | domid, |
| xen_pfn_t | gpfn ) |
#include <zephyr/xen/memory.h>
Remove a mapping from a domain physmap.
| domid | Domain whose physmap is updated. Unprivileged callers must use DOMID_SELF. |
| gpfn | Guest frame number to remove. |