[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PULL 6/6] kvmclock: use the updated system_timer_msr
From: |
Paolo Bonzini |
Subject: |
[Qemu-devel] [PULL 6/6] kvmclock: use the updated system_timer_msr |
Date: |
Tue, 3 Oct 2017 12:28:41 +0200 |
From: Jim Somerville <address@hidden>
Fixes e2b6c17 (kvmclock: update system_time_msr address forcibly)
which makes a call to get the latest value of the address
stored in system_timer_msr, but then uses the old address anyway.
Signed-off-by: Jim Somerville <address@hidden>
Message-Id: <address@hidden>
Cc: address@hidden
Signed-off-by: Paolo Bonzini <address@hidden>
---
hw/i386/kvm/clock.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/hw/i386/kvm/clock.c b/hw/i386/kvm/clock.c
index 75ad1ba..1707434 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);
--
1.8.3.1
- [Qemu-devel] [PULL 0/6] Misc patches for 2017-10-03, Paolo Bonzini, 2017/10/03
- [Qemu-devel] [PULL 1/6] scsi: Ignore executable for in-tree builds, Paolo Bonzini, 2017/10/03
- [Qemu-devel] [PULL 2/6] iothread: Make iothread_stop() idempotent, Paolo Bonzini, 2017/10/03
- [Qemu-devel] [PULL 4/6] kvm: check KVM_CAP_SYNC_MMU with kvm_vm_check_extension(), Paolo Bonzini, 2017/10/03
- [Qemu-devel] [PULL 3/6] linux-headers: sync against v4.14-rc1, Paolo Bonzini, 2017/10/03
- [Qemu-devel] [PULL 6/6] kvmclock: use the updated system_timer_msr,
Paolo Bonzini <=
- [Qemu-devel] [PULL 5/6] kvm: check KVM_CAP_NR_VCPUS with kvm_vm_check_extension(), Paolo Bonzini, 2017/10/03
- Re: [Qemu-devel] [PULL 0/6] Misc patches for 2017-10-03, Peter Maydell, 2017/10/03