Lines Matching refs:bat
247 void kvmppc_set_bat(struct kvm_vcpu *vcpu, struct kvmppc_bat *bat, bool upper, in kvmppc_set_bat() argument
253 bat->bepi_mask = (~bl << 17); in kvmppc_set_bat()
254 bat->bepi = val & 0xfffe0000; in kvmppc_set_bat()
255 bat->vs = (val & 2) ? 1 : 0; in kvmppc_set_bat()
256 bat->vp = (val & 1) ? 1 : 0; in kvmppc_set_bat()
257 bat->raw = (bat->raw & 0xffffffff00000000ULL) | val; in kvmppc_set_bat()
260 bat->brpn = val & 0xfffe0000; in kvmppc_set_bat()
261 bat->wimg = (val >> 3) & 0xf; in kvmppc_set_bat()
262 bat->pp = val & 3; in kvmppc_set_bat()
263 bat->raw = (bat->raw & 0x00000000ffffffffULL) | ((u64)val << 32); in kvmppc_set_bat()
270 struct kvmppc_bat *bat; in kvmppc_find_bat() local
274 bat = &vcpu_book3s->ibat[(sprn - SPRN_IBAT0U) / 2]; in kvmppc_find_bat()
277 bat = &vcpu_book3s->ibat[4 + ((sprn - SPRN_IBAT4U) / 2)]; in kvmppc_find_bat()
280 bat = &vcpu_book3s->dbat[(sprn - SPRN_DBAT0U) / 2]; in kvmppc_find_bat()
283 bat = &vcpu_book3s->dbat[4 + ((sprn - SPRN_DBAT4U) / 2)]; in kvmppc_find_bat()
289 return bat; in kvmppc_find_bat()
315 struct kvmppc_bat *bat = kvmppc_find_bat(vcpu, sprn); in kvmppc_core_emulate_mtspr() local
317 kvmppc_set_bat(vcpu, bat, !(sprn % 2), (u32)spr_val); in kvmppc_core_emulate_mtspr()
414 struct kvmppc_bat *bat = kvmppc_find_bat(vcpu, sprn); in kvmppc_core_emulate_mfspr() local
417 kvmppc_set_gpr(vcpu, rt, bat->raw >> 32); in kvmppc_core_emulate_mfspr()
419 kvmppc_set_gpr(vcpu, rt, bat->raw); in kvmppc_core_emulate_mfspr()