Map a guest physical address range into the qvm process address space for virtual hardware access
Synopsis:
#include <qvm/gasp.h>
void* gasp_map_contig(const vdev_t *vdev,
int prot,
uint64_t *ppaddr,
size_t *plength)
Arguments:
- vdev
- A pointer to a vdev structure for a vdev that will make DMA-like transactions.
- prot
- PROT_* protection bits for the mappings, optionally GMF_MAP_ANY.
- ppaddr
- A pointer to the guest-physical address to map on entry; when the function exits, this location holds the corresponding host-physical address.
- plength
- The maximum number of bytes to be mapped in on entry; when the function exits, this location is holds the actual number of bytes that were mapped.
Library:
Provided by qvm; no external library is required.
Description:
Use this function instead of gasp_map_vdma() when you must obtain information about the host-physical addresses.
Call gasp_unmap() to unmap the address range.
Returns:
A qvm process pointer that maps the guest physical address, or NULL if unsuccessful.