summaryrefslogtreecommitdiffstats
path: root/sys/amd64/vmm/intel/vmx.c
diff options
context:
space:
mode:
authorneel <neel@FreeBSD.org>2014-06-10 01:38:02 +0000
committerneel <neel@FreeBSD.org>2014-06-10 01:38:02 +0000
commit32f7809be145a9eb36623fb4f57107f711a58186 (patch)
treed86fa66eef20f3c5646c6f2cc7b34ebb053667c2 /sys/amd64/vmm/intel/vmx.c
parent0900c8475c634e8389068ffc29f3ee7dd6e1d618 (diff)
downloadFreeBSD-src-32f7809be145a9eb36623fb4f57107f711a58186.zip
FreeBSD-src-32f7809be145a9eb36623fb4f57107f711a58186.tar.gz
Turn on interrupt window exiting unconditionally when an ExtINT is being
injected into the guest. This allows the hypervisor to inject another ExtINT or APIC vector as soon as the guest is able to process interrupts. This change is not to address any correctness issue but to guarantee that any pending APIC vector that was preempted by the ExtINT will be injected as soon as possible. Prior to this change such pending interrupts could be delayed until the next VM exit.
Diffstat (limited to 'sys/amd64/vmm/intel/vmx.c')
-rw-r--r--sys/amd64/vmm/intel/vmx.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/sys/amd64/vmm/intel/vmx.c b/sys/amd64/vmm/intel/vmx.c
index ddda13a..91e8274 100644
--- a/sys/amd64/vmm/intel/vmx.c
+++ b/sys/amd64/vmm/intel/vmx.c
@@ -1311,9 +1311,13 @@ vmx_inject_interrupts(struct vmx *vmx, int vcpu, struct vlapic *vlapic)
* have posted another one. If that is the case, set
* the Interrupt Window Exiting execution control so
* we can inject that one too.
+ *
+ * Also, interrupt window exiting allows us to inject any
+ * pending APIC vector that was preempted by the ExtINT
+ * as soon as possible. This applies both for the software
+ * emulated vlapic and the hardware assisted virtual APIC.
*/
- if (vm_extint_pending(vmx->vm, vcpu))
- vmx_set_int_window_exiting(vmx, vcpu);
+ vmx_set_int_window_exiting(vmx, vcpu);
}
VCPU_CTR1(vmx->vm, vcpu, "Injecting hwintr at vector %d", vector);
OpenPOWER on IntegriCloud