KVM: MMU: Track page fault data in struct vcpu
authorJoerg Roedel <joerg.roedel@amd.com>
Fri, 10 Sep 2010 15:30:46 +0000 (17:30 +0200)
committerAvi Kivity <avi@redhat.com>
Sun, 24 Oct 2010 08:52:33 +0000 (10:52 +0200)
commit8df25a328a6ca3bd0f048278f4d5ae0a1f6fadc1
tree613b4e3c09fa90a7a52b4283cc0687ce547bd5c7
parent3241f22da85d26505b39f525a88f52ebd1235975
KVM: MMU: Track page fault data in struct vcpu

This patch introduces a struct with two new fields in
vcpu_arch for x86:

* fault.address
* fault.error_code

This will be used to correctly propagate page faults back
into the guest when we could have either an ordinary page
fault or a nested page fault. In the case of a nested page
fault the fault-address is different from the original
address that should be walked. So we need to keep track
about the real fault-address.

Signed-off-by: Joerg Roedel <joerg.roedel@amd.com>
Signed-off-by: Avi Kivity <avi@redhat.com>
arch/x86/include/asm/kvm_emulate.h
arch/x86/include/asm/kvm_host.h
arch/x86/kvm/emulate.c
arch/x86/kvm/mmu.c
arch/x86/kvm/paging_tmpl.h
arch/x86/kvm/x86.c