From 2278fec1d1064ec1622098153b20a773fb688e78 Mon Sep 17 00:00:00 2001 From: Andreas Sandberg Date: Sat, 23 May 2015 13:46:53 +0100 Subject: dev, arm: Add virtual timers to the generic timer model The generic timer model currently does not support virtual counters. Virtual and physical counters both tick with the same frequency. However, virtual timers allow a hypervisor to set an offset that is subtracted from the counter when it is read. This enables the hypervisor to present a time base that ticks with virtual time in the VM (i.e., doesn't tick when the VM isn't running). Modern Linux kernels generally assume that virtual counters exist and try to use them by default. --- src/arch/arm/miscregs.cc | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'src/arch/arm') diff --git a/src/arch/arm/miscregs.cc b/src/arch/arm/miscregs.cc index 07d938f6a..729cb4e8b 100644 --- a/src/arch/arm/miscregs.cc +++ b/src/arch/arm/miscregs.cc @@ -715,9 +715,9 @@ bitset miscRegInfo[NUM_MISCREGS] = { // MISCREG_CNTP_CTL_S bitset(string("00110011001111100000")), // MISCREG_CNTV_TVAL - bitset(string("01111000000000000000")), + bitset(string("11111111111111000001")), // MISCREG_CNTV_CTL - bitset(string("01111000000000000000")), + bitset(string("11111111111111000001")), // MISCREG_CNTHCTL bitset(string("01001000000000000000")), // MISCREG_CNTHP_TVAL @@ -763,7 +763,7 @@ bitset miscRegInfo[NUM_MISCREGS] = { // MISCREG_CNTP_CVAL_S bitset(string("00110011001111100000")), // MISCREG_CNTV_CVAL - bitset(string("01111000000000000000")), + bitset(string("11111111111111000001")), // MISCREG_CNTVOFF bitset(string("11001100000000000001")), // MISCREG_CNTHP_CVAL @@ -1259,11 +1259,11 @@ bitset miscRegInfo[NUM_MISCREGS] = { // MISCREG_CNTP_CVAL_EL0 bitset(string("11111111111111000001")), // MISCREG_CNTV_TVAL_EL0 - bitset(string("01111000000000000000")), + bitset(string("11111111111111000001")), // MISCREG_CNTV_CTL_EL0 - bitset(string("01111000000000000000")), + bitset(string("11111111111111000001")), // MISCREG_CNTV_CVAL_EL0 - bitset(string("01111000000000000000")), + bitset(string("11111111111111000001")), // MISCREG_PMEVCNTR0_EL0 bitset(string("11111111111111000001")), // MISCREG_PMEVCNTR1_EL0 -- cgit v1.2.3