aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/kvm/paging_tmpl.h
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/kvm/paging_tmpl.h')
-rw-r--r--drivers/kvm/paging_tmpl.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/kvm/paging_tmpl.h b/drivers/kvm/paging_tmpl.h
index 32b385188454..c894b51ba3f8 100644
--- a/drivers/kvm/paging_tmpl.h
+++ b/drivers/kvm/paging_tmpl.h
@@ -355,6 +355,7 @@ static int FNAME(page_fault)(struct kvm_vcpu *vcpu, gva_t addr,
355 int r; 355 int r;
356 356
357 pgprintk("%s: addr %lx err %x\n", __FUNCTION__, addr, error_code); 357 pgprintk("%s: addr %lx err %x\n", __FUNCTION__, addr, error_code);
358 kvm_mmu_audit(vcpu, "pre page fault");
358 359
359 r = mmu_topup_memory_caches(vcpu); 360 r = mmu_topup_memory_caches(vcpu);
360 if (r) 361 if (r)
@@ -402,6 +403,7 @@ static int FNAME(page_fault)(struct kvm_vcpu *vcpu, gva_t addr,
402 pgprintk("%s: io work, no access\n", __FUNCTION__); 403 pgprintk("%s: io work, no access\n", __FUNCTION__);
403 inject_page_fault(vcpu, addr, 404 inject_page_fault(vcpu, addr,
404 error_code | PFERR_PRESENT_MASK); 405 error_code | PFERR_PRESENT_MASK);
406 kvm_mmu_audit(vcpu, "post page fault (io)");
405 return 0; 407 return 0;
406 } 408 }
407 409
@@ -410,10 +412,12 @@ static int FNAME(page_fault)(struct kvm_vcpu *vcpu, gva_t addr,
410 */ 412 */
411 if (pte_present && !fixed && !write_pt) { 413 if (pte_present && !fixed && !write_pt) {
412 inject_page_fault(vcpu, addr, error_code); 414 inject_page_fault(vcpu, addr, error_code);
415 kvm_mmu_audit(vcpu, "post page fault (guest)");
413 return 0; 416 return 0;
414 } 417 }
415 418
416 ++kvm_stat.pf_fixed; 419 ++kvm_stat.pf_fixed;
420 kvm_mmu_audit(vcpu, "post page fault (fixed)");
417 421
418 return write_pt; 422 return write_pt;
419} 423}