Initialize the generic timer scale factor based on the counter frequency
register cntfrq_el0, and default to the current static value if necessary.
Always use the default value for TCG.
Signed-off-by: Bijan Mottahedeh
---
hw/arm/virt.c | 17 +
target/arm/helper.c
= {clock = 0x097ddad0 ,
mask = 72057594037927935, cycle_last = 271809294296, mult = 335544320,
shift = 24, xtime_nsec = 345610649600, base = 5435795172160,
base_real = 15391264550}
This would explain why without any pause time accounting, the both
hwclock and date comman
Accumulate the total guest pause time and update the virtual counter
offset register accordingly in order to account for that time before
resuming the guest.
Signed-off-by: Bijan Mottahedeh
---
hw/intc/arm_gicv3_kvm.c | 39 +++
target/arm/cpu.h| 3
On 11/8/2018 6:21 AM, Richard Henderson wrote:
On 11/7/18 7:48 PM, Bijan Mottahedeh wrote:
+static void set_system_clock_scale(void)
+{
+unsigned long cntfrq_el0;
+
+asm volatile("mrs %0, cntfrq_el0" : "=r"(cntfrq_el0));
+
+if (cntfrq_el0 == 0) {
6, mult = 335544320,
shift = 24, xtime_nsec = 345610649600, base = 5435795172160,
base_real = 15391264550}
This would explain why without any pause time accounting, the both
hwclock and date command show the same time after the guest is resume
from a pause, e.g. with the following seque
Initialize the generic timer scale factor based on the counter frequency
register cntfrq_el0, and default to the current static value if necessary.
Signed-off-by: Bijan Mottahedeh
---
hw/arm/virt.c | 15 +++
target/arm/helper.c| 19 ---
target/arm
Accumulate the total guest pause time and update the virtual counter
offset register accordingly in order to account for that time before
resuming the guest.
Signed-off-by: Bijan Mottahedeh
---
hw/intc/arm_gicv3_kvm.c | 39 +++
target/arm/cpu.h| 3