aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/kvm/vmx.c
diff options
context:
space:
mode:
authorAvi Kivity <avi@qumranet.com>2007-11-25 08:22:50 -0500
committerAvi Kivity <avi@qumranet.com>2008-01-30 10:53:18 -0500
commit7ee5d940f5064a7a4f0e53a8ffe755bc26a8b0f1 (patch)
treed14454d9254e90f77c5e7dc55b4adc21ae593e2f /drivers/kvm/vmx.c
parentc1a5d4f990ce034bcb19aebbb910c07019e60f6b (diff)
KVM: Use generalized exception queue for injecting #UD
Signed-off-by: Avi Kivity <avi@qumranet.com>
Diffstat (limited to 'drivers/kvm/vmx.c')
-rw-r--r--drivers/kvm/vmx.c11
1 files changed, 1 insertions, 10 deletions
diff --git a/drivers/kvm/vmx.c b/drivers/kvm/vmx.c
index 3b3c5f7d2e7c..3b44573c326e 100644
--- a/drivers/kvm/vmx.c
+++ b/drivers/kvm/vmx.c
@@ -613,14 +613,6 @@ static bool vmx_exception_injected(struct kvm_vcpu *vcpu)
613 return !(vmx->idt_vectoring_info & VECTORING_INFO_VALID_MASK); 613 return !(vmx->idt_vectoring_info & VECTORING_INFO_VALID_MASK);
614} 614}
615 615
616static void vmx_inject_ud(struct kvm_vcpu *vcpu)
617{
618 vmcs_write32(VM_ENTRY_INTR_INFO_FIELD,
619 UD_VECTOR |
620 INTR_TYPE_EXCEPTION |
621 INTR_INFO_VALID_MASK);
622}
623
624/* 616/*
625 * Swap MSR entry in host/guest MSR entry array. 617 * Swap MSR entry in host/guest MSR entry array.
626 */ 618 */
@@ -1866,8 +1858,7 @@ static int handle_exception(struct kvm_vcpu *vcpu, struct kvm_run *kvm_run)
1866 if (is_invalid_opcode(intr_info)) { 1858 if (is_invalid_opcode(intr_info)) {
1867 er = emulate_instruction(vcpu, kvm_run, 0, 0, 0); 1859 er = emulate_instruction(vcpu, kvm_run, 0, 0, 0);
1868 if (er != EMULATE_DONE) 1860 if (er != EMULATE_DONE)
1869 vmx_inject_ud(vcpu); 1861 kvm_queue_exception(vcpu, UD_VECTOR);
1870
1871 return 1; 1862 return 1;
1872 } 1863 }
1873 1864