gasp.h

Definitions and functions for working in guest address spaces

  • Use the gasp_*() functions during startup or after startup has completed (i.e., during the running phase). Create a new thread from which to call these functions so that they don't get called from the vCPU thread.

  • Use the gram_*() functions only during the startup phase. They aren't thread safe, so you can't use them after the guest has started.

Function safety

Function When used Thread safe? Notes
gasp_find_free() Startup (typically), running (see notes) During startup phase only In running phase, requires gasp_lock() to be called first
gasp_find_free_range() Startup (typically), running (see notes) During startup phase only In running phase, requires gasp_lock() to be called first
gasp_lock() Startup, running Yes
gasp_map_contig() Startup, running Yes
gasp_map_sys() Startup, running Yes
gasp_map_vdma() Startup, running Yes
gasp_region_info() Startup, running Yes
gasp_region_set() Startup Yes Automatically calls gasp_lock() and gasp_unlock()
gasp_region_set_soft() Running No This function must be protected with gasp_lock() and gasp_unlock()
gasp_unlock() Startup, running Yes
gasp_unmap() Startup, running Yes
gasp_walk_count() Startup, running Yes
gasp_walk_init() Startup, running Yes
gasp_walk_next() Startup, running Yes
gram_find_free() Startup No
gram_find_free_range() Startup No
gram_reserve() Startup No
Page updated: