aboutsummaryrefslogtreecommitdiff
path: root/hw
diff options
context:
space:
mode:
authorPeter Maydell <peter.maydell@linaro.org>2017-10-03 16:27:24 +0100
committerPeter Maydell <peter.maydell@linaro.org>2017-10-03 16:27:24 +0100
commitd147f7e815f97cb477e223586bcb80c316ae10ea (patch)
tree0f3c63f73bbfa50deafd9fca0a73d9e76597146a /hw
parent0b7fe5aed7381802600a844742920935774bb6c6 (diff)
parent346b1215b1e9f7cc6d8fe9fb6f3c2778b890afb6 (diff)
downloadqemu-d147f7e815f97cb477e223586bcb80c316ae10ea.zip
qemu-d147f7e815f97cb477e223586bcb80c316ae10ea.tar.gz
qemu-d147f7e815f97cb477e223586bcb80c316ae10ea.tar.bz2
Merge remote-tracking branch 'remotes/bonzini/tags/for-upstream' into staging
* iothread bugfix (Eduardo) * Linux headers sync (Dave) * .gitignore fix (Eric) * KVM capability check fixes (Greg) * kvmclock fix (Jim) # gpg: Signature made Mon 02 Oct 2017 14:31:09 BST # gpg: using RSA key 0xBFFBD25F78C7AE83 # gpg: Good signature from "Paolo Bonzini <bonzini@gnu.org>" # gpg: aka "Paolo Bonzini <pbonzini@redhat.com>" # Primary key fingerprint: 46F5 9FBD 57D6 12E7 BFD4 E2F7 7E15 100C CD36 69B1 # Subkey fingerprint: F133 3857 4B66 2389 866C 7682 BFFB D25F 78C7 AE83 * remotes/bonzini/tags/for-upstream: kvmclock: use the updated system_timer_msr kvm: check KVM_CAP_NR_VCPUS with kvm_vm_check_extension() kvm: check KVM_CAP_SYNC_MMU with kvm_vm_check_extension() linux-headers: sync against v4.14-rc1 iothread: Make iothread_stop() idempotent scsi: Ignore executable for in-tree builds Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Diffstat (limited to 'hw')
-rw-r--r--hw/i386/kvm/clock.c3
1 files changed, 2 insertions, 1 deletions
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);