int kvmppc_mmu_hpte_init(struct kvm_vcpu *vcpu) { /* init hpte lookup hashes */ kvmppc_mmu_hpte_init_hash(vcpu->arch.hpte_hash_pte, ARRAY_SIZE(vcpu->arch.hpte_hash_pte)); kvmppc_mmu_hpte_init_hash(vcpu->arch.hpte_hash_vpte, ARRAY_SIZE(vcpu->arch.hpte_hash_vpte)); kvmppc_mmu_hpte_init_hash(vcpu->arch.hpte_hash_vpte_long, ARRAY_SIZE(vcpu->arch.hpte_hash_vpte_long)); return 0; }
int kvmppc_mmu_hpte_init(struct kvm_vcpu *vcpu) { struct kvmppc_vcpu_book3s *vcpu3s = to_book3s(vcpu); /* init hpte lookup hashes */ kvmppc_mmu_hpte_init_hash(vcpu3s->hpte_hash_pte, ARRAY_SIZE(vcpu3s->hpte_hash_pte)); kvmppc_mmu_hpte_init_hash(vcpu3s->hpte_hash_pte_long, ARRAY_SIZE(vcpu3s->hpte_hash_pte_long)); kvmppc_mmu_hpte_init_hash(vcpu3s->hpte_hash_vpte, ARRAY_SIZE(vcpu3s->hpte_hash_vpte)); kvmppc_mmu_hpte_init_hash(vcpu3s->hpte_hash_vpte_long, ARRAY_SIZE(vcpu3s->hpte_hash_vpte_long)); spin_lock_init(&vcpu3s->mmu_lock); return 0; }