@@ -1570,9 +1570,10 @@ static u64 read_id_reg(const struct kvm_vcpu *vcpu, const struct sys_reg_desc *r
1570
1570
1571
1571
/*
1572
1572
* Return true if the register's (Op0, Op1, CRn, CRm, Op2) is
1573
- * (3, 0, 0, crm, op2), where 1<=crm<8, 0<=op2<8.
1573
+ * (3, 0, 0, crm, op2), where 1<=crm<8, 0<=op2<8, which is the range of ID
1574
+ * registers KVM maintains on a per-VM basis.
1574
1575
*/
1575
- static inline bool is_id_reg (u32 id )
1576
+ static inline bool is_vm_ftr_id_reg (u32 id )
1576
1577
{
1577
1578
return (sys_reg_Op0 (id ) == 3 && sys_reg_Op1 (id ) == 0 &&
1578
1579
sys_reg_CRn (id ) == 0 && sys_reg_CRm (id ) >= 1 &&
@@ -3521,7 +3522,7 @@ static void kvm_reset_id_regs(struct kvm_vcpu *vcpu)
3521
3522
lockdep_assert_held (& kvm -> arch .config_lock );
3522
3523
3523
3524
/* Initialize all idregs */
3524
- while (is_id_reg (id )) {
3525
+ while (is_vm_ftr_id_reg (id )) {
3525
3526
IDREG (kvm , id ) = idreg -> reset (vcpu , idreg );
3526
3527
3527
3528
idreg ++ ;
@@ -3547,7 +3548,7 @@ void kvm_reset_sys_regs(struct kvm_vcpu *vcpu)
3547
3548
for (i = 0 ; i < ARRAY_SIZE (sys_reg_descs ); i ++ ) {
3548
3549
const struct sys_reg_desc * r = & sys_reg_descs [i ];
3549
3550
3550
- if (is_id_reg (reg_to_encoding (r )))
3551
+ if (is_vm_ftr_id_reg (reg_to_encoding (r )))
3551
3552
continue ;
3552
3553
3553
3554
if (r -> reset )
@@ -4014,7 +4015,7 @@ int kvm_vm_ioctl_get_reg_writable_masks(struct kvm *kvm, struct reg_mask_range *
4014
4015
* compliant with a given revision of the architecture, but the
4015
4016
* RES0/RES1 definitions allow us to do that.
4016
4017
*/
4017
- if (is_id_reg (encoding )) {
4018
+ if (is_vm_ftr_id_reg (encoding )) {
4018
4019
if (!reg -> val ||
4019
4020
(is_aa32_id_reg (encoding ) && !kvm_supports_32bit_el0 ()))
4020
4021
continue ;
0 commit comments