aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/kvm/vmx.h
diff options
context:
space:
mode:
authorAvi Kivity <avi@qumranet.com>2007-11-08 11:19:20 -0500
committerAvi Kivity <avi@qumranet.com>2008-01-30 10:53:00 -0500
commit9c5623e3e42e94927d02a6693875badf15692970 (patch)
tree74ea5711aa9884aa5bee97282c52c32659aca53a /drivers/kvm/vmx.h
parent12264760e46077a65c1240ac0b27dfa34b402158 (diff)
KVM: VMX: Use vmx to inject real-mode interrupts
Instead of injecting real-mode interrupts by writing the interrupt frame into guest memory, abuse vmx by injecting a software interrupt. We need to pretend the software interrupt instruction had a length > 0, so we have to adjust rip backward. This lets us not to mess with writing guest memory, which is complex and also sleeps. Signed-off-by: Avi Kivity <avi@qumranet.com>
Diffstat (limited to 'drivers/kvm/vmx.h')
-rw-r--r--drivers/kvm/vmx.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/kvm/vmx.h b/drivers/kvm/vmx.h
index c84bd373315..d757b36c2fb 100644
--- a/drivers/kvm/vmx.h
+++ b/drivers/kvm/vmx.h
@@ -233,6 +233,7 @@ enum vmcs_field {
233 233
234#define INTR_TYPE_EXT_INTR (0 << 8) /* external interrupt */ 234#define INTR_TYPE_EXT_INTR (0 << 8) /* external interrupt */
235#define INTR_TYPE_EXCEPTION (3 << 8) /* processor exception */ 235#define INTR_TYPE_EXCEPTION (3 << 8) /* processor exception */
236#define INTR_TYPE_SOFT_INTR (4 << 8) /* software interrupt */
236 237
237/* 238/*
238 * Exit Qualifications for MOV for Control Register Access 239 * Exit Qualifications for MOV for Control Register Access