Skip to content

Commit ebf6aa8

Browse files
Alexandru EliseiMarc Zyngier
authored andcommitted
KVM: arm64: Replace get_raz_id_reg() with get_raz_reg()
Reading a RAZ ID register isn't different from reading any other RAZ register, so get rid of get_raz_id_reg() and replace it with get_raz_reg(), which does the same thing, but does it without going through two layers of indirection. No functional change. Suggested-by: Andrew Jones <[email protected]> Signed-off-by: Alexandru Elisei <[email protected]> Reviewed-by: Andrew Jones <[email protected]> Signed-off-by: Marc Zyngier <[email protected]> Link: https://lore.kernel.org/r/[email protected]
1 parent 5a43097 commit ebf6aa8

File tree

1 file changed

+2
-8
lines changed

1 file changed

+2
-8
lines changed

arch/arm64/kvm/sys_regs.c

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1273,12 +1273,6 @@ static int set_id_reg(struct kvm_vcpu *vcpu, const struct sys_reg_desc *rd,
12731273
return __set_id_reg(vcpu, rd, uaddr, raz);
12741274
}
12751275

1276-
static int get_raz_id_reg(struct kvm_vcpu *vcpu, const struct sys_reg_desc *rd,
1277-
const struct kvm_one_reg *reg, void __user *uaddr)
1278-
{
1279-
return __get_id_reg(vcpu, rd, uaddr, true);
1280-
}
1281-
12821276
static int set_raz_id_reg(struct kvm_vcpu *vcpu, const struct sys_reg_desc *rd,
12831277
const struct kvm_one_reg *reg, void __user *uaddr)
12841278
{
@@ -1402,7 +1396,7 @@ static unsigned int mte_visibility(const struct kvm_vcpu *vcpu,
14021396
#define ID_UNALLOCATED(crm, op2) { \
14031397
Op0(3), Op1(0), CRn(0), CRm(crm), Op2(op2), \
14041398
.access = access_raz_id_reg, \
1405-
.get_user = get_raz_id_reg, \
1399+
.get_user = get_raz_reg, \
14061400
.set_user = set_raz_id_reg, \
14071401
}
14081402

@@ -1414,7 +1408,7 @@ static unsigned int mte_visibility(const struct kvm_vcpu *vcpu,
14141408
#define ID_HIDDEN(name) { \
14151409
SYS_DESC(SYS_##name), \
14161410
.access = access_raz_id_reg, \
1417-
.get_user = get_raz_id_reg, \
1411+
.get_user = get_raz_reg, \
14181412
.set_user = set_raz_id_reg, \
14191413
}
14201414

0 commit comments

Comments
 (0)