Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

KVM: PPC: Book3S PR: Move kvmppc_mmu_init() into PR KVM

This is only relevant to PR KVM. Make it obvious by moving the
function declaration to the Book3s header and rename it with
a _pr suffix.

Signed-off-by: Greg Kurz <groug@kaod.org>
Signed-off-by: Paul Mackerras <paulus@ozlabs.org>

authored by

Greg Kurz and committed by
Paul Mackerras
3f1268dd b2fa4f90

+4 -4
-1
arch/powerpc/include/asm/kvm_ppc.h
··· 108 108 extern void kvmppc_mmu_priv_switch(struct kvm_vcpu *vcpu, int usermode); 109 109 extern void kvmppc_mmu_switch_pid(struct kvm_vcpu *vcpu, u32 pid); 110 110 extern void kvmppc_mmu_destroy(struct kvm_vcpu *vcpu); 111 - extern int kvmppc_mmu_init(struct kvm_vcpu *vcpu); 112 111 extern int kvmppc_mmu_dtlb_index(struct kvm_vcpu *vcpu, gva_t eaddr); 113 112 extern int kvmppc_mmu_itlb_index(struct kvm_vcpu *vcpu, gva_t eaddr); 114 113 extern gpa_t kvmppc_mmu_xlate(struct kvm_vcpu *vcpu, unsigned int gtlb_index,
+1
arch/powerpc/kvm/book3s.h
··· 16 16 extern int kvm_test_age_hva_hv(struct kvm *kvm, unsigned long hva); 17 17 extern void kvm_set_spte_hva_hv(struct kvm *kvm, unsigned long hva, pte_t pte); 18 18 19 + extern int kvmppc_mmu_init_pr(struct kvm_vcpu *vcpu); 19 20 extern void kvmppc_mmu_destroy_pr(struct kvm_vcpu *vcpu); 20 21 extern int kvmppc_core_emulate_op_pr(struct kvm_run *run, struct kvm_vcpu *vcpu, 21 22 unsigned int inst, int *advance);
+1 -1
arch/powerpc/kvm/book3s_32_mmu_host.c
··· 356 356 /* From mm/mmu_context_hash32.c */ 357 357 #define CTX_TO_VSID(c, id) ((((c) * (897 * 16)) + (id * 0x111)) & 0xffffff) 358 358 359 - int kvmppc_mmu_init(struct kvm_vcpu *vcpu) 359 + int kvmppc_mmu_init_pr(struct kvm_vcpu *vcpu) 360 360 { 361 361 struct kvmppc_vcpu_book3s *vcpu3s = to_book3s(vcpu); 362 362 int err;
+1 -1
arch/powerpc/kvm/book3s_64_mmu_host.c
··· 384 384 __destroy_context(to_book3s(vcpu)->context_id[0]); 385 385 } 386 386 387 - int kvmppc_mmu_init(struct kvm_vcpu *vcpu) 387 + int kvmppc_mmu_init_pr(struct kvm_vcpu *vcpu) 388 388 { 389 389 struct kvmppc_vcpu_book3s *vcpu3s = to_book3s(vcpu); 390 390 int err;
+1 -1
arch/powerpc/kvm/book3s_pr.c
··· 1795 1795 1796 1796 vcpu->arch.shadow_msr = MSR_USER64 & ~MSR_LE; 1797 1797 1798 - err = kvmppc_mmu_init(vcpu); 1798 + err = kvmppc_mmu_init_pr(vcpu); 1799 1799 if (err < 0) 1800 1800 goto free_shared_page; 1801 1801