KVM: Replace #GP injection by the generalized exception queue
Signed-off-by: Avi Kivity <avi@qumranet.com>
diff --git a/drivers/kvm/x86.h b/drivers/kvm/x86.h
index d3ac4e2..78396d6 100644
--- a/drivers/kvm/x86.h
+++ b/drivers/kvm/x86.h
@@ -220,8 +220,6 @@
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 @@
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"