diff options
author | neel <neel@FreeBSD.org> | 2014-07-19 20:59:08 +0000 |
---|---|---|
committer | neel <neel@FreeBSD.org> | 2014-07-19 20:59:08 +0000 |
commit | 1f15eea2e088718478067efc8df6ecd1fc86dcee (patch) | |
tree | 5276627274ad6c55ba76fce7b924b9a9eef00e3d /lib/libvmmapi/vmmapi.h | |
parent | 79931797441bc166c7381ef7865f139e5cdb47e8 (diff) | |
download | FreeBSD-src-1f15eea2e088718478067efc8df6ecd1fc86dcee.zip FreeBSD-src-1f15eea2e088718478067efc8df6ecd1fc86dcee.tar.gz |
Handle nested exceptions in bhyve.
A nested exception condition arises when a second exception is triggered while
delivering the first exception. Most nested exceptions can be handled serially
but some are converted into a double fault. If an exception is generated during
delivery of a double fault then the virtual machine shuts down as a result of
a triple fault.
vm_exit_intinfo() is used to record that a VM-exit happened while an event was
being delivered through the IDT. If an exception is triggered while handling
the VM-exit it will be treated like a nested exception.
vm_entry_intinfo() is used by processor-specific code to get the event to be
injected into the guest on the next VM-entry. This function is responsible for
deciding the disposition of nested exceptions.
Diffstat (limited to 'lib/libvmmapi/vmmapi.h')
-rw-r--r-- | lib/libvmmapi/vmmapi.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/lib/libvmmapi/vmmapi.h b/lib/libvmmapi/vmmapi.h index 067eaa0..2040c91 100644 --- a/lib/libvmmapi/vmmapi.h +++ b/lib/libvmmapi/vmmapi.h @@ -104,6 +104,9 @@ int vm_setup_pptdev_msix(struct vmctx *ctx, int vcpu, int bus, int slot, int func, int idx, uint64_t addr, uint64_t msg, uint32_t vector_control); +int vm_get_intinfo(struct vmctx *ctx, int vcpu, uint64_t *i1, uint64_t *i2); +int vm_set_intinfo(struct vmctx *ctx, int vcpu, uint64_t exit_intinfo); + /* * Return a pointer to the statistics buffer. Note that this is not MT-safe. */ |