Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

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>

+4 -8
-4
arch/arm64/kvm/guest.c
··· 593 593 594 594 static const u64 timer_reg_list[] = { 595 595 KVM_REG_ARM_TIMER_CNT, 596 - KVM_REG_ARM_TIMER_CVAL, 597 596 KVM_REG_ARM_PTIMER_CNT, 598 - KVM_REG_ARM_PTIMER_CVAL, 599 597 }; 600 598 601 599 #define NUM_TIMER_REGS ARRAY_SIZE(timer_reg_list) ··· 602 604 { 603 605 switch (index) { 604 606 case KVM_REG_ARM_TIMER_CNT: 605 - case KVM_REG_ARM_TIMER_CVAL: 606 607 case KVM_REG_ARM_PTIMER_CNT: 607 - case KVM_REG_ARM_PTIMER_CVAL: 608 608 return true; 609 609 } 610 610 return false;
+4 -4
arch/arm64/kvm/sys_regs.c
··· 3512 3512 { SYS_DESC(SYS_CNTVCTSS_EL0), access_arch_timer }, 3513 3513 { SYS_DESC(SYS_CNTP_TVAL_EL0), access_arch_timer }, 3514 3514 TIMER_REG(CNTP_CTL_EL0, NULL), 3515 - { SYS_DESC(SYS_CNTP_CVAL_EL0), access_arch_timer }, 3515 + TIMER_REG(CNTP_CVAL_EL0, NULL), 3516 3516 3517 3517 { SYS_DESC(SYS_CNTV_TVAL_EL0), access_arch_timer }, 3518 3518 TIMER_REG(CNTV_CTL_EL0, NULL), 3519 - { SYS_DESC(SYS_CNTV_CVAL_EL0), access_arch_timer }, 3519 + TIMER_REG(CNTV_CVAL_EL0, NULL), 3520 3520 3521 3521 /* PMEVCNTRn_EL0 */ 3522 3522 PMU_PMEVCNTR_EL0(0), ··· 3715 3715 EL2_REG(CNTHCTL_EL2, access_rw, reset_val, 0), 3716 3716 { SYS_DESC(SYS_CNTHP_TVAL_EL2), access_arch_timer }, 3717 3717 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), 3719 3719 3720 3720 { SYS_DESC(SYS_CNTHV_TVAL_EL2), access_arch_timer, .visibility = cnthv_visibility }, 3721 3721 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), 3723 3723 3724 3724 { SYS_DESC(SYS_CNTKCTL_EL12), access_cntkctl_el12 }, 3725 3725