Zephyr API Documentation 4.4.99
A Scalable Open Source RTOS
Loading...
Searching...
No Matches
gnttab.h
Go to the documentation of this file.
1/*
2 * Copyright (c) 2021-2024 EPAM Systems
3 *
4 * SPDX-License-Identifier: Apache-2.0
5 */
6
12
13#ifndef __XEN_GNTTAB_H__
14#define __XEN_GNTTAB_H__
15
16#include <stdbool.h>
17#include <stdint.h>
18
20
27
39grant_ref_t gnttab_grant_access(domid_t domid, unsigned long gfn,
40 bool readonly);
41
55
70int32_t gnttab_alloc_and_grant(void **map, bool readonly);
71
84void *gnttab_get_pages(unsigned int npages);
85
96int gnttab_put_pages(void *start_addr, unsigned int npages);
97
115int gnttab_map_refs(struct gnttab_map_grant_ref *map_ops, unsigned int count);
116
136int gnttab_unmap_refs(struct gnttab_unmap_grant_ref *unmap_ops, unsigned int count);
137
147const char *gnttabop_error(int16_t status);
148
150
151#endif /* __XEN_GNTTAB_H__ */
uint32_t grant_ref_t
Definition grant_table.h:116
int gnttab_end_access(grant_ref_t gref)
Release a grant reference created by gnttab_grant_access().
void * gnttab_get_pages(unsigned int npages)
Allocate pages that can host grant mappings.
int gnttab_put_pages(void *start_addr, unsigned int npages)
Release pages allocated by gnttab_get_pages().
int gnttab_map_refs(struct gnttab_map_grant_ref *map_ops, unsigned int count)
Map one or more foreign grant references.
grant_ref_t gnttab_grant_access(domid_t domid, unsigned long gfn, bool readonly)
Grant another domain access to a guest frame.
int gnttab_unmap_refs(struct gnttab_unmap_grant_ref *unmap_ops, unsigned int count)
Unmap one or more foreign grant references.
const char * gnttabop_error(int16_t status)
Convert a Xen grant-table status into readable text.
int32_t gnttab_alloc_and_grant(void **map, bool readonly)
Allocate a page and immediately grant access to it.
__INT32_TYPE__ int32_t
Definition stdint.h:74
__INT16_TYPE__ int16_t
Definition stdint.h:73
Definition grant_table.h:266
Definition grant_table.h:291
uint16_t domid_t
Definition xen.h:217