diff options
Diffstat (limited to 'arch/x86/kvm/paging_tmpl.h')
-rw-r--r-- | arch/x86/kvm/paging_tmpl.h | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/arch/x86/kvm/paging_tmpl.h b/arch/x86/kvm/paging_tmpl.h index 68ee1b7fa89f..d07f48a06f09 100644 --- a/arch/x86/kvm/paging_tmpl.h +++ b/arch/x86/kvm/paging_tmpl.h | |||
@@ -258,6 +258,10 @@ error: | |||
258 | walker->error_code |= PFERR_FETCH_MASK; | 258 | walker->error_code |= PFERR_FETCH_MASK; |
259 | if (rsvd_fault) | 259 | if (rsvd_fault) |
260 | walker->error_code |= PFERR_RSVD_MASK; | 260 | walker->error_code |= PFERR_RSVD_MASK; |
261 | |||
262 | vcpu->arch.fault.address = addr; | ||
263 | vcpu->arch.fault.error_code = walker->error_code; | ||
264 | |||
261 | trace_kvm_mmu_walker_error(walker->error_code); | 265 | trace_kvm_mmu_walker_error(walker->error_code); |
262 | return 0; | 266 | return 0; |
263 | } | 267 | } |
@@ -521,7 +525,7 @@ static int FNAME(page_fault)(struct kvm_vcpu *vcpu, gva_t addr, | |||
521 | */ | 525 | */ |
522 | if (!r) { | 526 | if (!r) { |
523 | pgprintk("%s: guest page fault\n", __func__); | 527 | pgprintk("%s: guest page fault\n", __func__); |
524 | inject_page_fault(vcpu, addr, walker.error_code); | 528 | inject_page_fault(vcpu); |
525 | vcpu->arch.last_pt_write_count = 0; /* reset fork detector */ | 529 | vcpu->arch.last_pt_write_count = 0; /* reset fork detector */ |
526 | return 0; | 530 | return 0; |
527 | } | 531 | } |