Skip to content

Commit 8af1989

Browse files
author
Marc Zyngier
committed
KVM: arm64: Move CNT*_CVAL_EL0 userspace accessors to generic infrastructure
As for the control registers, move the comparator registers to the common infrastructure. Signed-off-by: Marc Zyngier <maz@kernel.org>
1 parent 09424d5 commit 8af1989

File tree

2 files changed

+4
-8
lines changed

2 files changed

+4
-8
lines changed

arch/arm64/kvm/guest.c

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -593,9 +593,7 @@ static unsigned long num_core_regs(const struct kvm_vcpu *vcpu)
593593

594594
static const u64 timer_reg_list[] = {
595595
KVM_REG_ARM_TIMER_CNT,
596-
KVM_REG_ARM_TIMER_CVAL,
597596
KVM_REG_ARM_PTIMER_CNT,
598-
KVM_REG_ARM_PTIMER_CVAL,
599597
};
600598

601599
#define NUM_TIMER_REGS ARRAY_SIZE(timer_reg_list)
@@ -604,9 +602,7 @@ static bool is_timer_reg(u64 index)
604602
{
605603
switch (index) {
606604
case KVM_REG_ARM_TIMER_CNT:
607-
case KVM_REG_ARM_TIMER_CVAL:
608605
case KVM_REG_ARM_PTIMER_CNT:
609-
case KVM_REG_ARM_PTIMER_CVAL:
610606
return true;
611607
}
612608
return false;

arch/arm64/kvm/sys_regs.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3512,11 +3512,11 @@ static const struct sys_reg_desc sys_reg_descs[] = {
35123512
{ SYS_DESC(SYS_CNTVCTSS_EL0), access_arch_timer },
35133513
{ SYS_DESC(SYS_CNTP_TVAL_EL0), access_arch_timer },
35143514
TIMER_REG(CNTP_CTL_EL0, NULL),
3515-
{ SYS_DESC(SYS_CNTP_CVAL_EL0), access_arch_timer },
3515+
TIMER_REG(CNTP_CVAL_EL0, NULL),
35163516

35173517
{ SYS_DESC(SYS_CNTV_TVAL_EL0), access_arch_timer },
35183518
TIMER_REG(CNTV_CTL_EL0, NULL),
3519-
{ SYS_DESC(SYS_CNTV_CVAL_EL0), access_arch_timer },
3519+
TIMER_REG(CNTV_CVAL_EL0, NULL),
35203520

35213521
/* PMEVCNTRn_EL0 */
35223522
PMU_PMEVCNTR_EL0(0),
@@ -3715,11 +3715,11 @@ static const struct sys_reg_desc sys_reg_descs[] = {
37153715
EL2_REG(CNTHCTL_EL2, access_rw, reset_val, 0),
37163716
{ SYS_DESC(SYS_CNTHP_TVAL_EL2), access_arch_timer },
37173717
TIMER_REG(CNTHP_CTL_EL2, el2_visibility),
3718-
EL2_REG(CNTHP_CVAL_EL2, access_arch_timer, reset_val, 0),
3718+
TIMER_REG(CNTHP_CVAL_EL2, el2_visibility),
37193719

37203720
{ SYS_DESC(SYS_CNTHV_TVAL_EL2), access_arch_timer, .visibility = cnthv_visibility },
37213721
TIMER_REG(CNTHV_CTL_EL2, cnthv_visibility),
3722-
EL2_REG_FILTERED(CNTHV_CVAL_EL2, access_arch_timer, reset_val, 0, cnthv_visibility),
3722+
TIMER_REG(CNTHV_CVAL_EL2, cnthv_visibility),
37233723

37243724
{ SYS_DESC(SYS_CNTKCTL_EL12), access_cntkctl_el12 },
37253725

0 commit comments

Comments
 (0)