Lines Matching refs:gvsid
32 static u16 kvmppc_sid_hash(struct kvm_vcpu *vcpu, u64 gvsid) in kvmppc_sid_hash() argument
34 return (u16)(((gvsid >> (SID_MAP_BITS * 7)) & SID_MAP_MASK) ^ in kvmppc_sid_hash()
35 ((gvsid >> (SID_MAP_BITS * 6)) & SID_MAP_MASK) ^ in kvmppc_sid_hash()
36 ((gvsid >> (SID_MAP_BITS * 5)) & SID_MAP_MASK) ^ in kvmppc_sid_hash()
37 ((gvsid >> (SID_MAP_BITS * 4)) & SID_MAP_MASK) ^ in kvmppc_sid_hash()
38 ((gvsid >> (SID_MAP_BITS * 3)) & SID_MAP_MASK) ^ in kvmppc_sid_hash()
39 ((gvsid >> (SID_MAP_BITS * 2)) & SID_MAP_MASK) ^ in kvmppc_sid_hash()
40 ((gvsid >> (SID_MAP_BITS * 1)) & SID_MAP_MASK) ^ in kvmppc_sid_hash()
41 ((gvsid >> (SID_MAP_BITS * 0)) & SID_MAP_MASK)); in kvmppc_sid_hash()
45 static struct kvmppc_sid_map *find_sid_vsid(struct kvm_vcpu *vcpu, u64 gvsid) in find_sid_vsid() argument
51 gvsid |= VSID_PR; in find_sid_vsid()
53 sid_map_mask = kvmppc_sid_hash(vcpu, gvsid); in find_sid_vsid()
55 if (map->valid && (map->guest_vsid == gvsid)) { in find_sid_vsid()
56 trace_kvm_book3s_slb_found(gvsid, map->host_vsid); in find_sid_vsid()
61 if (map->valid && (map->guest_vsid == gvsid)) { in find_sid_vsid()
62 trace_kvm_book3s_slb_found(gvsid, map->host_vsid); in find_sid_vsid()
66 trace_kvm_book3s_slb_fail(sid_map_mask, gvsid); in find_sid_vsid()
223 static struct kvmppc_sid_map *create_sid_map(struct kvm_vcpu *vcpu, u64 gvsid) in create_sid_map() argument
232 gvsid |= VSID_PR; in create_sid_map()
237 sid_map_mask = kvmppc_sid_hash(vcpu, gvsid); in create_sid_map()
261 map->guest_vsid = gvsid; in create_sid_map()
264 trace_kvm_book3s_slb_map(sid_map_mask, gvsid, map->host_vsid); in create_sid_map()
316 u64 gvsid; in kvmppc_mmu_map_segment() local
323 if (vcpu->arch.mmu.esid_to_vsid(vcpu, esid, &gvsid)) { in kvmppc_mmu_map_segment()
330 map = find_sid_vsid(vcpu, gvsid); in kvmppc_mmu_map_segment()
332 map = create_sid_map(vcpu, gvsid); in kvmppc_mmu_map_segment()
342 if (gvsid & VSID_64K) in kvmppc_mmu_map_segment()