gasp_region_set_soft()
Add, modify, or delete address-space regions in the guest system
Synopsis:
#include <qvm/gasp.h>unsigned gasp_region_set_soft(unsigned num_regions,
const struct gasp_region *rgn)Arguments:
- num_regions
- The number of region structures passed by the rgn argument.
- rgn
- A pointer to an array of gasp_region structures. Each structure describes a particular region and the field settings determine whether this region will be added, modified, or deleted. Specifically, if the region already exists and the flags field is set to GRF_NONE, then the region is deleted. If flags is set to something else, then the existing region is modified based on this setting. If the region doesn't exist, it gets added and configured based on the flags value.
Description:
This function is primarily used to:
- add, modify, or delete your own regions in the guest address space
- modify guest RAM page permissions
Note:
This function must be protected with gasp_lock() and
gasp_unlock(). This ensures that another vdev cannot
interfere while you are manipulating the address space.
For more information, see the Virtual Device Developer's Guide.
Returns:
On success, a number indicating how many regions were set successfully; this number is the same as the num_regions passed in. If an error occurred, errno is set and the index to the location of the first failure is returned.
Page updated:
