Lines Matching refs:sprn
267 static struct kvmppc_bat *kvmppc_find_bat(struct kvm_vcpu *vcpu, int sprn) in kvmppc_find_bat() argument
272 switch (sprn) { in kvmppc_find_bat()
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()
292 int kvmppc_core_emulate_mtspr(struct kvm_vcpu *vcpu, int sprn, int rs) in kvmppc_core_emulate_mtspr() argument
297 switch (sprn) { in kvmppc_core_emulate_mtspr()
315 struct kvmppc_bat *bat = kvmppc_find_bat(vcpu, sprn); in kvmppc_core_emulate_mtspr()
317 kvmppc_set_bat(vcpu, bat, !(sprn % 2), (u32)spr_val); in kvmppc_core_emulate_mtspr()
376 to_book3s(vcpu)->gqr[sprn - SPRN_GQR0] = spr_val; in kvmppc_core_emulate_mtspr()
394 printk(KERN_INFO "KVM: invalid SPR write: %d\n", sprn); in kvmppc_core_emulate_mtspr()
404 int kvmppc_core_emulate_mfspr(struct kvm_vcpu *vcpu, int sprn, int rt) in kvmppc_core_emulate_mfspr() argument
408 switch (sprn) { in kvmppc_core_emulate_mfspr()
414 struct kvmppc_bat *bat = kvmppc_find_bat(vcpu, sprn); in kvmppc_core_emulate_mfspr()
416 if (sprn % 2) in kvmppc_core_emulate_mfspr()
461 to_book3s(vcpu)->gqr[sprn - SPRN_GQR0]); in kvmppc_core_emulate_mfspr()
479 printk(KERN_INFO "KVM: invalid SPR read: %d\n", sprn); in kvmppc_core_emulate_mfspr()