aboutsummaryrefslogtreecommitdiffstats
path: root/arch/x86/include/asm/kvm_host.h
diff options
context:
space:
mode:
authorJunaid Shahid <junaids@google.com>2018-05-04 11:37:11 -0700
committerPaolo Bonzini <pbonzini@redhat.com>2018-05-14 18:14:23 +0200
commit74b566e6cf21f07df385d593a7fcf8bbfc5d3f0f (patch)
tree95bb7e32451e24f87ac2c96027da58894b08e0be /arch/x86/include/asm/kvm_host.h
parentKVM: X86: Fix reserved bits check for MOV to CR3 (diff)
downloadlinux-dev-74b566e6cf21f07df385d593a7fcf8bbfc5d3f0f.tar.xz
linux-dev-74b566e6cf21f07df385d593a7fcf8bbfc5d3f0f.zip
kvm: x86: Refactor mmu_free_roots()
Extract the logic to free a root page in a separate function to avoid code duplication in mmu_free_roots(). Also, change it to an exported function i.e. kvm_mmu_free_roots(). Signed-off-by: Junaid Shahid <junaids@google.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'arch/x86/include/asm/kvm_host.h')
-rw-r--r--arch/x86/include/asm/kvm_host.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/arch/x86/include/asm/kvm_host.h b/arch/x86/include/asm/kvm_host.h
index c25775fad4ed..8cb846162694 100644
--- a/arch/x86/include/asm/kvm_host.h
+++ b/arch/x86/include/asm/kvm_host.h
@@ -1277,6 +1277,7 @@ void __kvm_mmu_free_some_pages(struct kvm_vcpu *vcpu);
int kvm_mmu_load(struct kvm_vcpu *vcpu);
void kvm_mmu_unload(struct kvm_vcpu *vcpu);
void kvm_mmu_sync_roots(struct kvm_vcpu *vcpu);
+void kvm_mmu_free_roots(struct kvm_vcpu *vcpu);
gpa_t translate_nested_gpa(struct kvm_vcpu *vcpu, gpa_t gpa, u32 access,
struct x86_exception *exception);
gpa_t kvm_mmu_gva_to_gpa_read(struct kvm_vcpu *vcpu, gva_t gva,