Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 80813
b: refs/heads/master
c: 7ee5d94
h: refs/heads/master
i:
  80811: b17a856
v: v3
  • Loading branch information
Avi Kivity committed Jan 30, 2008
1 parent 9bdef40 commit a938108
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 21 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: c1a5d4f990ce034bcb19aebbb910c07019e60f6b
refs/heads/master: 7ee5d940f5064a7a4f0e53a8ffe755bc26a8b0f1
12 changes: 2 additions & 10 deletions trunk/drivers/kvm/svm.c
Original file line number Diff line number Diff line change
Expand Up @@ -207,13 +207,6 @@ static bool svm_exception_injected(struct kvm_vcpu *vcpu)
return !(svm->vmcb->control.exit_int_info & SVM_EXITINTINFO_VALID);
}

static void inject_ud(struct kvm_vcpu *vcpu)
{
to_svm(vcpu)->vmcb->control.event_inj = SVM_EVTINJ_VALID |
SVM_EVTINJ_TYPE_EXEPT |
UD_VECTOR;
}

static int is_external_interrupt(u32 info)
{
info &= SVM_EVTINJ_TYPE_MASK | SVM_EVTINJ_VALID;
Expand Down Expand Up @@ -948,8 +941,7 @@ static int ud_interception(struct vcpu_svm *svm, struct kvm_run *kvm_run)

er = emulate_instruction(&svm->vcpu, kvm_run, 0, 0, 0);
if (er != EMULATE_DONE)
inject_ud(&svm->vcpu);

kvm_queue_exception(&svm->vcpu, UD_VECTOR);
return 1;
}

Expand Down Expand Up @@ -1027,7 +1019,7 @@ static int vmmcall_interception(struct vcpu_svm *svm, struct kvm_run *kvm_run)
static int invalid_op_interception(struct vcpu_svm *svm,
struct kvm_run *kvm_run)
{
inject_ud(&svm->vcpu);
kvm_queue_exception(&svm->vcpu, UD_VECTOR);
return 1;
}

Expand Down
11 changes: 1 addition & 10 deletions trunk/drivers/kvm/vmx.c
Original file line number Diff line number Diff line change
Expand Up @@ -613,14 +613,6 @@ static bool vmx_exception_injected(struct kvm_vcpu *vcpu)
return !(vmx->idt_vectoring_info & VECTORING_INFO_VALID_MASK);
}

static void vmx_inject_ud(struct kvm_vcpu *vcpu)
{
vmcs_write32(VM_ENTRY_INTR_INFO_FIELD,
UD_VECTOR |
INTR_TYPE_EXCEPTION |
INTR_INFO_VALID_MASK);
}

/*
* Swap MSR entry in host/guest MSR entry array.
*/
Expand Down Expand Up @@ -1866,8 +1858,7 @@ static int handle_exception(struct kvm_vcpu *vcpu, struct kvm_run *kvm_run)
if (is_invalid_opcode(intr_info)) {
er = emulate_instruction(vcpu, kvm_run, 0, 0, 0);
if (er != EMULATE_DONE)
vmx_inject_ud(vcpu);

kvm_queue_exception(vcpu, UD_VECTOR);
return 1;
}

Expand Down

0 comments on commit a938108

Please sign in to comment.