Lines Matching refs:rd

46 static int set_id_reg(struct kvm_vcpu *vcpu, const struct sys_reg_desc *rd,
551 static int set_oslsr_el1(struct kvm_vcpu *vcpu, const struct sys_reg_desc *rd,
558 if ((val ^ rd->val) & ~OSLSR_EL1_OSLK)
561 __vcpu_sys_reg(vcpu, rd->reg) = val;
628 const struct sys_reg_desc *rd,
633 get_access_mask(rd, &mask, &shift);
645 const struct sys_reg_desc *rd,
650 get_access_mask(rd, &mask, &shift);
656 const struct sys_reg_desc *rd)
658 u64 *dbg_reg = &vcpu->arch.vcpu_debug_state.dbg_bvr[rd->CRm];
661 reg_to_dbg(vcpu, p, rd, dbg_reg);
663 dbg_to_reg(vcpu, p, rd, dbg_reg);
665 trace_trap_reg(__func__, rd->CRm, p->is_write, *dbg_reg);
670 static int set_bvr(struct kvm_vcpu *vcpu, const struct sys_reg_desc *rd,
673 vcpu->arch.vcpu_debug_state.dbg_bvr[rd->CRm] = val;
677 static int get_bvr(struct kvm_vcpu *vcpu, const struct sys_reg_desc *rd,
680 *val = vcpu->arch.vcpu_debug_state.dbg_bvr[rd->CRm];
685 const struct sys_reg_desc *rd)
687 vcpu->arch.vcpu_debug_state.dbg_bvr[rd->CRm] = rd->val;
688 return rd->val;
693 const struct sys_reg_desc *rd)
695 u64 *dbg_reg = &vcpu->arch.vcpu_debug_state.dbg_bcr[rd->CRm];
698 reg_to_dbg(vcpu, p, rd, dbg_reg);
700 dbg_to_reg(vcpu, p, rd, dbg_reg);
702 trace_trap_reg(__func__, rd->CRm, p->is_write, *dbg_reg);
707 static int set_bcr(struct kvm_vcpu *vcpu, const struct sys_reg_desc *rd,
710 vcpu->arch.vcpu_debug_state.dbg_bcr[rd->CRm] = val;
714 static int get_bcr(struct kvm_vcpu *vcpu, const struct sys_reg_desc *rd,
717 *val = vcpu->arch.vcpu_debug_state.dbg_bcr[rd->CRm];
722 const struct sys_reg_desc *rd)
724 vcpu->arch.vcpu_debug_state.dbg_bcr[rd->CRm] = rd->val;
725 return rd->val;
730 const struct sys_reg_desc *rd)
732 u64 *dbg_reg = &vcpu->arch.vcpu_debug_state.dbg_wvr[rd->CRm];
735 reg_to_dbg(vcpu, p, rd, dbg_reg);
737 dbg_to_reg(vcpu, p, rd, dbg_reg);
739 trace_trap_reg(__func__, rd->CRm, p->is_write,
740 vcpu->arch.vcpu_debug_state.dbg_wvr[rd->CRm]);
745 static int set_wvr(struct kvm_vcpu *vcpu, const struct sys_reg_desc *rd,
748 vcpu->arch.vcpu_debug_state.dbg_wvr[rd->CRm] = val;
752 static int get_wvr(struct kvm_vcpu *vcpu, const struct sys_reg_desc *rd,
755 *val = vcpu->arch.vcpu_debug_state.dbg_wvr[rd->CRm];
760 const struct sys_reg_desc *rd)
762 vcpu->arch.vcpu_debug_state.dbg_wvr[rd->CRm] = rd->val;
763 return rd->val;
768 const struct sys_reg_desc *rd)
770 u64 *dbg_reg = &vcpu->arch.vcpu_debug_state.dbg_wcr[rd->CRm];
773 reg_to_dbg(vcpu, p, rd, dbg_reg);
775 dbg_to_reg(vcpu, p, rd, dbg_reg);
777 trace_trap_reg(__func__, rd->CRm, p->is_write, *dbg_reg);
782 static int set_wcr(struct kvm_vcpu *vcpu, const struct sys_reg_desc *rd,
785 vcpu->arch.vcpu_debug_state.dbg_wcr[rd->CRm] = val;
789 static int get_wcr(struct kvm_vcpu *vcpu, const struct sys_reg_desc *rd,
792 *val = vcpu->arch.vcpu_debug_state.dbg_wcr[rd->CRm];
797 const struct sys_reg_desc *rd)
799 vcpu->arch.vcpu_debug_state.dbg_wcr[rd->CRm] = rd->val;
800 return rd->val;
1349 const struct sys_reg_desc *rd)
1451 const struct sys_reg_desc *rd,
1456 u32 id = reg_to_encoding(rd);
1457 u64 writable_mask = rd->val;
1458 u64 limit = rd->reset(vcpu, rd);
1466 if (sysreg_visible_as_raz(vcpu, rd))
1640 const struct sys_reg_desc *rd)
1649 const struct sys_reg_desc *rd)
1694 const struct sys_reg_desc *rd)
1715 const struct sys_reg_desc *rd,
1745 return set_id_reg(vcpu, rd, val);
1749 const struct sys_reg_desc *rd)
1764 const struct sys_reg_desc *rd,
1787 return set_id_reg(vcpu, rd, val);
1797 static int get_id_reg(struct kvm_vcpu *vcpu, const struct sys_reg_desc *rd,
1805 *val = read_id_reg(vcpu, rd);
1810 *val = read_id_reg(vcpu, rd);
1816 static int set_id_reg(struct kvm_vcpu *vcpu, const struct sys_reg_desc *rd,
1819 u32 id = reg_to_encoding(rd);
1829 if (val != read_id_reg(vcpu, rd))
1838 ret = arm64_check_features(vcpu, rd, val);
1856 static int get_raz_reg(struct kvm_vcpu *vcpu, const struct sys_reg_desc *rd,
1863 static int set_wi_reg(struct kvm_vcpu *vcpu, const struct sys_reg_desc *rd,
1945 static int set_clidr(struct kvm_vcpu *vcpu, const struct sys_reg_desc *rd,
1954 __vcpu_sys_reg(vcpu, rd->reg) = val;
1988 const struct sys_reg_desc *rd)
2005 const struct sys_reg_desc *rd)
2057 const struct sys_reg_desc *rd)
3908 const struct sys_reg_desc *rd,
3916 if (!(rd->reg || rd->get_user))
3919 if (sysreg_hidden_user(vcpu, rd))
3922 if (!copy_reg_to_user(rd, uind))