6
* Xen memory operations
10
FILE_LICENCE ( GPL2_OR_LATER_OR_UBDL );
13
#include <xen/memory.h>
16
* Add page to physical address space
18
* @v xen Xen hypervisor
19
* @v add Page mapping descriptor
20
* @ret xenrc Xen status code
22
static inline __attribute__ (( always_inline )) int
23
xenmem_add_to_physmap ( struct xen_hypervisor *xen,
24
struct xen_add_to_physmap *add ) {
26
return xen_hypercall_2 ( xen, __HYPERVISOR_memory_op,
27
XENMEM_add_to_physmap, virt_to_phys ( add ) );
31
* Remove page from physical address space
33
* @v xen Xen hypervisor
34
* @v remove Page mapping descriptor
35
* @ret xenrc Xen status code
37
static inline __attribute__ (( always_inline )) int
38
xenmem_remove_from_physmap ( struct xen_hypervisor *xen,
39
struct xen_remove_from_physmap *remove ) {
41
return xen_hypercall_2 ( xen, __HYPERVISOR_memory_op,
42
XENMEM_remove_from_physmap,
43
virt_to_phys ( remove ) );
46
#endif /* _IPXE_XENMEM_H */