diff options
author | jhb <jhb@FreeBSD.org> | 2014-04-17 18:00:07 +0000 |
---|---|---|
committer | jhb <jhb@FreeBSD.org> | 2014-04-17 18:00:07 +0000 |
commit | 2e8b45c43c9443e7c53d72567c86cd2f55834049 (patch) | |
tree | f0bedc2edf80d3e7d31b5cac298c69fb2d3cb74a /sys/amd64/include | |
parent | 9ae7565292746d528e9f6b6443d74b76edd2e5b8 (diff) | |
download | FreeBSD-src-2e8b45c43c9443e7c53d72567c86cd2f55834049.zip FreeBSD-src-2e8b45c43c9443e7c53d72567c86cd2f55834049.tar.gz |
MFC 258860,260167,260238,260397:
- Restructure the VMX code to enter and exit the guest. In large part this
change hides the setjmp/longjmp semantics of VM enter/exit.
vmx_enter_guest() is used to enter guest context and vmx_exit_guest() is
used to transition back into host context.
Fix a longstanding race where a vcpu interrupt notification might be
ignored if it happens after vmx_inject_interrupts() but before host
interrupts are disabled in vmx_resume/vmx_launch. We now call
vmx_inject_interrupts() with host interrupts disabled to prevent this.
- The 'protection' field in the VM exit collateral for the PAGING exit is
not used - get rid of it.
Reviewed by: grehan
Diffstat (limited to 'sys/amd64/include')
-rw-r--r-- | sys/amd64/include/vmm.h | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/sys/amd64/include/vmm.h b/sys/amd64/include/vmm.h index d6f1a5a..92b767f 100644 --- a/sys/amd64/include/vmm.h +++ b/sys/amd64/include/vmm.h @@ -286,7 +286,6 @@ struct vm_exit { struct { uint64_t gpa; int fault_type; - int protection; } paging; struct { uint64_t gpa; @@ -299,9 +298,19 @@ struct vm_exit { * exitcode to represent the VM-exit. */ struct { - int error; /* vmx inst error */ + int status; /* vmx inst status */ + /* + * 'exit_reason' and 'exit_qualification' are valid + * only if 'status' is zero. + */ uint32_t exit_reason; uint64_t exit_qualification; + /* + * 'inst_error' and 'inst_type' are valid + * only if 'status' is non-zero. + */ + int inst_type; + int inst_error; } vmx; struct { uint32_t code; /* ecx value */ |