Skip to content

Commit ec83f39

Browse files
xen0nchenhuacai
authored andcommitted
LoongArch: KVM: Rename _kvm_get_cpucfg() to _kvm_get_cpucfg_mask()
The function is not actually a getter of guest CPUCFG, but rather validation of the input CPUCFG ID plus information about the supported bit flags of that CPUCFG leaf. So rename it to avoid confusion. Reviewed-by: Bibo Mao <maobibo@loongson.cn> Signed-off-by: WANG Xuerui <git@xen0n.name> Signed-off-by: Huacai Chen <chenhuacai@loongson.cn>
1 parent 179af57 commit ec83f39

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

arch/loongarch/kvm/vcpu.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -298,7 +298,7 @@ static int _kvm_setcsr(struct kvm_vcpu *vcpu, unsigned int id, u64 val)
298298
return ret;
299299
}
300300

301-
static int _kvm_get_cpucfg(int id, u64 *v)
301+
static int _kvm_get_cpucfg_mask(int id, u64 *v)
302302
{
303303
if (id < 0 || id >= KVM_MAX_CPUCFG_REGS)
304304
return -EINVAL;
@@ -339,7 +339,7 @@ static int kvm_check_cpucfg(int id, u64 val)
339339
int ret;
340340
u64 mask = 0;
341341

342-
ret = _kvm_get_cpucfg(id, &mask);
342+
ret = _kvm_get_cpucfg_mask(id, &mask);
343343
if (ret)
344344
return ret;
345345

@@ -567,7 +567,7 @@ static int kvm_loongarch_get_cpucfg_attr(struct kvm_vcpu *vcpu,
567567
uint64_t val;
568568
uint64_t __user *uaddr = (uint64_t __user *)attr->addr;
569569

570-
ret = _kvm_get_cpucfg(attr->attr, &val);
570+
ret = _kvm_get_cpucfg_mask(attr->attr, &val);
571571
if (ret)
572572
return ret;
573573

0 commit comments

Comments
 (0)