aboutsummaryrefslogtreecommitdiffstats
path: root/arch/x86/kvm/mmu.c
diff options
context:
space:
mode:
authorJoerg Roedel <joerg.roedel@amd.com>2010-09-10 11:30:46 -0400
committerAvi Kivity <avi@redhat.com>2010-10-24 04:52:33 -0400
commit8df25a328a6ca3bd0f048278f4d5ae0a1f6fadc1 (patch)
tree613b4e3c09fa90a7a52b4283cc0687ce547bd5c7 /arch/x86/kvm/mmu.c
parent3241f22da85d26505b39f525a88f52ebd1235975 (diff)
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>
Diffstat (limited to 'arch/x86/kvm/mmu.c')
-rw-r--r--arch/x86/kvm/mmu.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/arch/x86/kvm/mmu.c b/arch/x86/kvm/mmu.c
index 86f7557cf3fb..99367274b97c 100644
--- a/arch/x86/kvm/mmu.c
+++ b/arch/x86/kvm/mmu.c
@@ -2566,11 +2566,9 @@ static unsigned long get_cr3(struct kvm_vcpu *vcpu)
2566 return vcpu->arch.cr3; 2566 return vcpu->arch.cr3;
2567} 2567}
2568 2568
2569static void inject_page_fault(struct kvm_vcpu *vcpu, 2569static void inject_page_fault(struct kvm_vcpu *vcpu)
2570 u64 addr,
2571 u32 err_code)
2572{ 2570{
2573 vcpu->arch.mmu.inject_page_fault(vcpu, addr, err_code); 2571 vcpu->arch.mmu.inject_page_fault(vcpu);
2574} 2572}
2575 2573
2576static void paging_free(struct kvm_vcpu *vcpu) 2574static void paging_free(struct kvm_vcpu *vcpu)