diff options
author | Xiao Guangrong <xiaoguangrong@linux.vnet.ibm.com> | 2011-11-28 07:42:16 -0500 |
---|---|---|
committer | Avi Kivity <avi@redhat.com> | 2011-12-27 04:22:09 -0500 |
commit | e459e3228dc57f7160e564ce0f09edb5bee656d3 (patch) | |
tree | aa3b61d28e69a094f0c7906de40c5fcdca38b3d6 /arch/x86/include/asm/kvm_host.h | |
parent | 9edb17d55f3ea4943f9654f2aad7a99b4c55840a (diff) |
KVM: MMU: move the relevant mmu code to mmu.c
Move the mmu code in kvm_arch_vcpu_init() to kvm_mmu_create()
Signed-off-by: Xiao Guangrong <xiaoguangrong@linux.vnet.ibm.com>
Signed-off-by: Avi Kivity <avi@redhat.com>
Diffstat (limited to 'arch/x86/include/asm/kvm_host.h')
-rw-r--r-- | arch/x86/include/asm/kvm_host.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/arch/x86/include/asm/kvm_host.h b/arch/x86/include/asm/kvm_host.h index 1769f3dde611..020413afb285 100644 --- a/arch/x86/include/asm/kvm_host.h +++ b/arch/x86/include/asm/kvm_host.h | |||
@@ -752,6 +752,7 @@ void __kvm_mmu_free_some_pages(struct kvm_vcpu *vcpu); | |||
752 | int kvm_mmu_load(struct kvm_vcpu *vcpu); | 752 | int kvm_mmu_load(struct kvm_vcpu *vcpu); |
753 | void kvm_mmu_unload(struct kvm_vcpu *vcpu); | 753 | void kvm_mmu_unload(struct kvm_vcpu *vcpu); |
754 | void kvm_mmu_sync_roots(struct kvm_vcpu *vcpu); | 754 | void kvm_mmu_sync_roots(struct kvm_vcpu *vcpu); |
755 | gpa_t translate_nested_gpa(struct kvm_vcpu *vcpu, gpa_t gpa, u32 access); | ||
755 | gpa_t kvm_mmu_gva_to_gpa_read(struct kvm_vcpu *vcpu, gva_t gva, | 756 | gpa_t kvm_mmu_gva_to_gpa_read(struct kvm_vcpu *vcpu, gva_t gva, |
756 | struct x86_exception *exception); | 757 | struct x86_exception *exception); |
757 | gpa_t kvm_mmu_gva_to_gpa_fetch(struct kvm_vcpu *vcpu, gva_t gva, | 758 | gpa_t kvm_mmu_gva_to_gpa_fetch(struct kvm_vcpu *vcpu, gva_t gva, |
@@ -773,6 +774,11 @@ void kvm_disable_tdp(void); | |||
773 | int complete_pio(struct kvm_vcpu *vcpu); | 774 | int complete_pio(struct kvm_vcpu *vcpu); |
774 | bool kvm_check_iopl(struct kvm_vcpu *vcpu); | 775 | bool kvm_check_iopl(struct kvm_vcpu *vcpu); |
775 | 776 | ||
777 | static inline gpa_t translate_gpa(struct kvm_vcpu *vcpu, gpa_t gpa, u32 access) | ||
778 | { | ||
779 | return gpa; | ||
780 | } | ||
781 | |||
776 | static inline struct kvm_mmu_page *page_header(hpa_t shadow_page) | 782 | static inline struct kvm_mmu_page *page_header(hpa_t shadow_page) |
777 | { | 783 | { |
778 | struct page *page = pfn_to_page(shadow_page >> PAGE_SHIFT); | 784 | struct page *page = pfn_to_page(shadow_page >> PAGE_SHIFT); |