aboutsummaryrefslogtreecommitdiff
path: root/drivers/kvm/x86.h
diff options
context:
space:
mode:
authorAvi Kivity <avi@qumranet.com>2007-11-25 14:12:03 +0200
committerAvi Kivity <avi@qumranet.com>2008-01-30 17:53:18 +0200
commitc1a5d4f990ce034bcb19aebbb910c07019e60f6b (patch)
tree23aeb993f99c0b9523486c0dcbedb61247352a45 /drivers/kvm/x86.h
parentc3c91fee5195ba5176a6da5ddc2a2822243eb79f (diff)
KVM: Replace #GP injection by the generalized exception queue
Signed-off-by: Avi Kivity <avi@qumranet.com>
Diffstat (limited to 'drivers/kvm/x86.h')
-rw-r--r--drivers/kvm/x86.h7
1 files changed, 5 insertions, 2 deletions
diff --git a/drivers/kvm/x86.h b/drivers/kvm/x86.h
index d3ac4e2b3a4..78396d627be 100644
--- a/drivers/kvm/x86.h
+++ b/drivers/kvm/x86.h
@@ -220,8 +220,6 @@ struct kvm_x86_ops {
void (*tlb_flush)(struct kvm_vcpu *vcpu);
- void (*inject_gp)(struct kvm_vcpu *vcpu, unsigned err_code);
-
void (*run)(struct kvm_vcpu *vcpu, struct kvm_run *run);
int (*handle_exit)(struct kvm_run *run, struct kvm_vcpu *vcpu);
void (*skip_emulated_instruction)(struct kvm_vcpu *vcpu);
@@ -467,6 +465,11 @@ static inline u32 get_rdx_init_val(void)
return 0x600; /* P6 family */
}
+static inline void kvm_inject_gp(struct kvm_vcpu *vcpu, u32 error_code)
+{
+ kvm_queue_exception_e(vcpu, GP_VECTOR, error_code);
+}
+
#define ASM_VMX_VMCLEAR_RAX ".byte 0x66, 0x0f, 0xc7, 0x30"
#define ASM_VMX_VMLAUNCH ".byte 0x0f, 0x01, 0xc2"
#define ASM_VMX_VMRESUME ".byte 0x0f, 0x01, 0xc3"