Add vm_set_register() and vm_set_desc() callbacks. These callbacks
translate directly into calls to their namesake API functions in libvmmapi. It is an improvement over the existing setreg(), setmsr(), setcr() setgdt() and exec() callbacks in that the new additions give full control and don't assume we're booting FreeBSD, like exec() and don't assume one only wants to set the value of RSP, like setreg().
This commit is contained in:
parent
b249af7af9
commit
14b43e3daa
@ -33,6 +33,14 @@
|
||||
#define USERBOOT_VERSION_2 2
|
||||
#define USERBOOT_VERSION_3 3
|
||||
|
||||
/*
|
||||
* Version 4 added more generic callbacks for setting up
|
||||
* registers and descriptors. The callback structure is
|
||||
* backward compatible (new callbacks have been added at
|
||||
* the tail end).
|
||||
*/
|
||||
#define USERBOOT_VERSION_4 4
|
||||
|
||||
/*
|
||||
* Exit codes from the loader
|
||||
*/
|
||||
@ -195,4 +203,11 @@ struct loader_callbacks {
|
||||
* each invocation will add 1 to the previous value of 'num'.
|
||||
*/
|
||||
const char * (*getenv)(void *arg, int num);
|
||||
|
||||
/*
|
||||
* Version 4 additions.
|
||||
*/
|
||||
int (*vm_set_register)(void *arg, int vcpu, int reg, uint64_t val);
|
||||
int (*vm_set_desc)(void *arg, int vcpu, int reg, uint64_t base,
|
||||
u_int limit, u_int access);
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user