#ifndef _VMX_ASSIST_H_
#define _VMX_ASSIST_H_
+#ifdef __V3VEE__
+
#include <palacios/vm_guest.h>
#define VMXASSIST_BASE 0xD0000
#define VMXASSIST_MAGIC 0x17101966
-#define VMXASSIST_MAGIC_OFFSET (VMXASSIST_BASE+8)
-#define VMXASSIST_NEW_CONTEXT (VMXASSIST_BASE + 12)
-#define VMXASSIST_OLD_CONTEXT (VMXASSIST_NEW_CONTEXT + 4)
-#ifndef __ASSEMBLY__
+struct vmx_assist_header {
+ uint64_t rsvd; // 8 bytes of nothing
+ uint32_t magic;
+ uint32_t new_ctx_gpa;
+ uint32_t old_ctx_gpa;
+} __attribute__((packed));
-#define NR_EXCEPTION_HANDLER 32
-#define NR_INTERRUPT_HANDLERS 16
-#define NR_TRAPS (NR_EXCEPTION_HANDLER+NR_INTERRUPT_HANDLERS)
union vmcs_arbytes {
struct arbyte_fields {
unsigned char rm_irqbase[2];
};
+
typedef struct vmx_assist_context vmx_assist_context_t;
int v3_vmxassist_ctx_switch(struct guest_info * info);
-#endif /* __ASSEMBLY__ */
+
+#endif
#endif /* _VMX_ASSIST_H_ */