Lines Matching refs:bat
637 void kvmppc_set_bat(struct kvm_vcpu *vcpu, struct kvmppc_bat *bat, bool upper, in kvmppc_set_bat() argument
643 bat->bepi_mask = (~bl << 17); in kvmppc_set_bat()
644 bat->bepi = val & 0xfffe0000; in kvmppc_set_bat()
645 bat->vs = (val & 2) ? 1 : 0; in kvmppc_set_bat()
646 bat->vp = (val & 1) ? 1 : 0; in kvmppc_set_bat()
647 bat->raw = (bat->raw & 0xffffffff00000000ULL) | val; in kvmppc_set_bat()
650 bat->brpn = val & 0xfffe0000; in kvmppc_set_bat()
651 bat->wimg = (val >> 3) & 0xf; in kvmppc_set_bat()
652 bat->pp = val & 3; in kvmppc_set_bat()
653 bat->raw = (bat->raw & 0x00000000ffffffffULL) | ((u64)val << 32); in kvmppc_set_bat()
660 struct kvmppc_bat *bat; in kvmppc_find_bat() local
664 bat = &vcpu_book3s->ibat[(sprn - SPRN_IBAT0U) / 2]; in kvmppc_find_bat()
667 bat = &vcpu_book3s->ibat[4 + ((sprn - SPRN_IBAT4U) / 2)]; in kvmppc_find_bat()
670 bat = &vcpu_book3s->dbat[(sprn - SPRN_DBAT0U) / 2]; in kvmppc_find_bat()
673 bat = &vcpu_book3s->dbat[4 + ((sprn - SPRN_DBAT4U) / 2)]; in kvmppc_find_bat()
679 return bat; in kvmppc_find_bat()
706 struct kvmppc_bat *bat = kvmppc_find_bat(vcpu, sprn); in kvmppc_core_emulate_mtspr_pr() local
708 kvmppc_set_bat(vcpu, bat, !(sprn % 2), (u32)spr_val); in kvmppc_core_emulate_mtspr_pr()
875 struct kvmppc_bat *bat = kvmppc_find_bat(vcpu, sprn); in kvmppc_core_emulate_mfspr_pr() local
878 *spr_val = bat->raw >> 32; in kvmppc_core_emulate_mfspr_pr()
880 *spr_val = bat->raw; in kvmppc_core_emulate_mfspr_pr()