aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/kvm/vmx.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/kvm/vmx.c')
-rw-r--r--drivers/kvm/vmx.c32
1 files changed, 0 insertions, 32 deletions
diff --git a/drivers/kvm/vmx.c b/drivers/kvm/vmx.c
index f382956f176a..be0b12e709e5 100644
--- a/drivers/kvm/vmx.c
+++ b/drivers/kvm/vmx.c
@@ -2487,37 +2487,6 @@ static void vmx_vcpu_run(struct kvm_vcpu *vcpu, struct kvm_run *kvm_run)
2487 asm("int $2"); 2487 asm("int $2");
2488} 2488}
2489 2489
2490static void vmx_inject_page_fault(struct kvm_vcpu *vcpu,
2491 unsigned long addr,
2492 u32 err_code)
2493{
2494 struct vcpu_vmx *vmx = to_vmx(vcpu);
2495 u32 vect_info = vmx->idt_vectoring_info;
2496
2497 ++vcpu->stat.pf_guest;
2498
2499 if (is_page_fault(vect_info)) {
2500 printk(KERN_DEBUG "inject_page_fault: "
2501 "double fault 0x%lx @ 0x%lx\n",
2502 addr, vmcs_readl(GUEST_RIP));
2503 vmcs_write32(VM_ENTRY_EXCEPTION_ERROR_CODE, 0);
2504 vmcs_write32(VM_ENTRY_INTR_INFO_FIELD,
2505 DF_VECTOR |
2506 INTR_TYPE_EXCEPTION |
2507 INTR_INFO_DELIEVER_CODE_MASK |
2508 INTR_INFO_VALID_MASK);
2509 return;
2510 }
2511 vcpu->cr2 = addr;
2512 vmcs_write32(VM_ENTRY_EXCEPTION_ERROR_CODE, err_code);
2513 vmcs_write32(VM_ENTRY_INTR_INFO_FIELD,
2514 PF_VECTOR |
2515 INTR_TYPE_EXCEPTION |
2516 INTR_INFO_DELIEVER_CODE_MASK |
2517 INTR_INFO_VALID_MASK);
2518
2519}
2520
2521static void vmx_free_vmcs(struct kvm_vcpu *vcpu) 2490static void vmx_free_vmcs(struct kvm_vcpu *vcpu)
2522{ 2491{
2523 struct vcpu_vmx *vmx = to_vmx(vcpu); 2492 struct vcpu_vmx *vmx = to_vmx(vcpu);
@@ -2649,7 +2618,6 @@ static struct kvm_x86_ops vmx_x86_ops = {
2649 .set_rflags = vmx_set_rflags, 2618 .set_rflags = vmx_set_rflags,
2650 2619
2651 .tlb_flush = vmx_flush_tlb, 2620 .tlb_flush = vmx_flush_tlb,
2652 .inject_page_fault = vmx_inject_page_fault,
2653 2621
2654 .inject_gp = vmx_inject_gp, 2622 .inject_gp = vmx_inject_gp,
2655 2623