diff options
Diffstat (limited to 'hw/i386/kvm/clock.c')
-rw-r--r-- | hw/i386/kvm/clock.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/hw/i386/kvm/clock.c b/hw/i386/kvm/clock.c index 75ad1ba6f0..1707434db3 100644 --- a/hw/i386/kvm/clock.c +++ b/hw/i386/kvm/clock.c @@ -62,7 +62,7 @@ static uint64_t kvmclock_current_nsec(KVMClockState *s) { CPUState *cpu = first_cpu; CPUX86State *env = cpu->env_ptr; - hwaddr kvmclock_struct_pa = env->system_time_msr & ~1ULL; + hwaddr kvmclock_struct_pa; uint64_t migration_tsc = env->tsc; struct pvclock_vcpu_time_info time; uint64_t delta; @@ -77,6 +77,7 @@ static uint64_t kvmclock_current_nsec(KVMClockState *s) return 0; } + kvmclock_struct_pa = env->system_time_msr & ~1ULL; cpu_physical_memory_read(kvmclock_struct_pa, &time, sizeof(time)); assert(time.tsc_timestamp <= migration_tsc); |