diff options
author | Joerg Roedel <joerg.roedel@amd.com> | 2010-09-10 11:30:49 -0400 |
---|---|---|
committer | Avi Kivity <avi@redhat.com> | 2010-10-24 04:52:35 -0400 |
commit | 14dfe855f978181cd611ec018e5ceba860a98545 (patch) | |
tree | e81ec5a9162a2588f12c21de415ab8778c655c1f /arch/x86/kvm/mmu.c | |
parent | c30a358d33e0e111f06e54a4a4125371e6b6693c (diff) |
KVM: X86: Introduce pointer to mmu context used for gva_to_gpa
This patch introduces the walk_mmu pointer which points to
the mmu-context currently used for gva_to_gpa translations.
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.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/arch/x86/kvm/mmu.c b/arch/x86/kvm/mmu.c index 99367274b97c..cb06adac92b1 100644 --- a/arch/x86/kvm/mmu.c +++ b/arch/x86/kvm/mmu.c | |||
@@ -2708,7 +2708,7 @@ static int paging32E_init_context(struct kvm_vcpu *vcpu, | |||
2708 | 2708 | ||
2709 | static int init_kvm_tdp_mmu(struct kvm_vcpu *vcpu) | 2709 | static int init_kvm_tdp_mmu(struct kvm_vcpu *vcpu) |
2710 | { | 2710 | { |
2711 | struct kvm_mmu *context = &vcpu->arch.mmu; | 2711 | struct kvm_mmu *context = vcpu->arch.walk_mmu; |
2712 | 2712 | ||
2713 | context->new_cr3 = nonpaging_new_cr3; | 2713 | context->new_cr3 = nonpaging_new_cr3; |
2714 | context->page_fault = tdp_page_fault; | 2714 | context->page_fault = tdp_page_fault; |
@@ -2767,11 +2767,11 @@ EXPORT_SYMBOL_GPL(kvm_init_shadow_mmu); | |||
2767 | 2767 | ||
2768 | static int init_kvm_softmmu(struct kvm_vcpu *vcpu) | 2768 | static int init_kvm_softmmu(struct kvm_vcpu *vcpu) |
2769 | { | 2769 | { |
2770 | int r = kvm_init_shadow_mmu(vcpu, &vcpu->arch.mmu); | 2770 | int r = kvm_init_shadow_mmu(vcpu, vcpu->arch.walk_mmu); |
2771 | 2771 | ||
2772 | vcpu->arch.mmu.set_cr3 = kvm_x86_ops->set_cr3; | 2772 | vcpu->arch.walk_mmu->set_cr3 = kvm_x86_ops->set_cr3; |
2773 | vcpu->arch.mmu.get_cr3 = get_cr3; | 2773 | vcpu->arch.walk_mmu->get_cr3 = get_cr3; |
2774 | vcpu->arch.mmu.inject_page_fault = kvm_inject_page_fault; | 2774 | vcpu->arch.walk_mmu->inject_page_fault = kvm_inject_page_fault; |
2775 | 2775 | ||
2776 | return r; | 2776 | return r; |
2777 | } | 2777 | } |