aboutsummaryrefslogtreecommitdiffstats
path: root/arch/x86/kvm/mmu.c
diff options
context:
space:
mode:
authorJoerg Roedel <joerg.roedel@amd.com>2010-09-10 11:30:50 -0400
committerAvi Kivity <avi@redhat.com>2010-10-24 04:52:36 -0400
commit6539e738f65a8f1fc7806295d5d701fba4008343 (patch)
tree7b66b9d2c28eae8a332cdb1da0e602357b0cbeda /arch/x86/kvm/mmu.c
parent14dfe855f978181cd611ec018e5ceba860a98545 (diff)
KVM: MMU: Implement nested gva_to_gpa functions
This patch adds the functions to do a nested l2_gva to l1_gpa page table walk. 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.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/arch/x86/kvm/mmu.c b/arch/x86/kvm/mmu.c
index cb06adac92b1..1e215e8b9377 100644
--- a/arch/x86/kvm/mmu.c
+++ b/arch/x86/kvm/mmu.c
@@ -2466,6 +2466,14 @@ static gpa_t nonpaging_gva_to_gpa(struct kvm_vcpu *vcpu, gva_t vaddr,
2466 return vaddr; 2466 return vaddr;
2467} 2467}
2468 2468
2469static gpa_t nonpaging_gva_to_gpa_nested(struct kvm_vcpu *vcpu, gva_t vaddr,
2470 u32 access, u32 *error)
2471{
2472 if (error)
2473 *error = 0;
2474 return vcpu->arch.nested_mmu.translate_gpa(vcpu, vaddr, access);
2475}
2476
2469static int nonpaging_page_fault(struct kvm_vcpu *vcpu, gva_t gva, 2477static int nonpaging_page_fault(struct kvm_vcpu *vcpu, gva_t gva,
2470 u32 error_code) 2478 u32 error_code)
2471{ 2479{