https://github.com/torvalds/linux
Revision 8b9534406456313beb7bf9051150b50c63049ab7 authored by Paolo Bonzini on 16 November 2016, 17:31:30 UTC, committed by Radim Krčmář on 19 November 2016, 17:03:03 UTC
Going through the first VCPU is wrong if you follow a KVM_SET_CLOCK with
a KVM_GET_CLOCK immediately after, without letting the VCPU run and
call kvm_guest_time_update.

To fix this, compute the kvmclock value ourselves, using the master
clock (tsc, nsec) pair as the base and the host CPU frequency as
the scale.

Reported-by: Marcelo Tosatti <mtosatti@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Radim Krčmář <rkrcmar@redhat.com>
1 parent e5dbc4b
History
Tip revision: 8b9534406456313beb7bf9051150b50c63049ab7 authored by Paolo Bonzini on 16 November 2016, 17:31:30 UTC
KVM: x86: do not go through vcpu in __get_kvmclock_ns
Tip revision: 8b95344
File Mode Size
Documentation
arch
block
certs
crypto
drivers
firmware
fs
include
init
ipc
kernel
lib
mm
net
samples
scripts
security
sound
tools
usr
virt
.cocciconfig -rw-r--r-- 59 bytes
.get_maintainer.ignore -rw-r--r-- 31 bytes
.gitattributes -rw-r--r-- 30 bytes
.gitignore -rw-r--r-- 1.3 KB
.mailmap -rw-r--r-- 7.5 KB
COPYING -rw-r--r-- 18.3 KB
CREDITS -rw-r--r-- 96.0 KB
Kbuild -rw-r--r-- 2.8 KB
Kconfig -rw-r--r-- 252 bytes
MAINTAINERS -rw-r--r-- 373.4 KB
Makefile -rw-r--r-- 57.4 KB
README -rw-r--r-- 17.9 KB
REPORTING-BUGS -rw-r--r-- 7.3 KB

README

back to top