diff options
author | Andrey Smetanin <asmetanin@virtuozzo.com> | 2015-12-28 16:27:24 +0100 |
---|---|---|
committer | Paolo Bonzini <pbonzini@redhat.com> | 2016-01-08 19:04:42 +0100 |
commit | f3b138c5d89a1f74a2b46adaa1067aea9a7e3cbb (patch) | |
tree | 438ad25bcd5642ed1e2e55091824470a3ecac70b /arch/x86/kvm/x86.c | |
parent | kvm/x86: Skip SynIC vector check for QEMU side (diff) | |
download | linux-f3b138c5d89a1f74a2b46adaa1067aea9a7e3cbb.tar.xz linux-f3b138c5d89a1f74a2b46adaa1067aea9a7e3cbb.zip |
kvm/x86: Update SynIC timers on guest entry only
Consolidate updating the Hyper-V SynIC timers in a
single place: on guest entry in processing KVM_REQ_HV_STIMER
request. This simplifies the overall logic, and makes sure
the most current state of msrs and guest clock is used for
arming the timers (to achieve that, KVM_REQ_HV_STIMER
has to be processed after KVM_REQ_CLOCK_UPDATE).
Signed-off-by: Andrey Smetanin <asmetanin@virtuozzo.com>
Reviewed-by: Roman Kagan <rkagan@virtuozzo.com>
CC: Gleb Natapov <gleb@kernel.org>
CC: Paolo Bonzini <pbonzini@redhat.com>
CC: Roman Kagan <rkagan@virtuozzo.com>
CC: Denis V. Lunev <den@openvz.org>
CC: qemu-devel@nongnu.org
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'arch/x86/kvm/x86.c')
-rw-r--r-- | arch/x86/kvm/x86.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/arch/x86/kvm/x86.c b/arch/x86/kvm/x86.c index 107ceaf8cbd0..fad1d096919e 100644 --- a/arch/x86/kvm/x86.c +++ b/arch/x86/kvm/x86.c @@ -6508,6 +6508,12 @@ static int vcpu_enter_guest(struct kvm_vcpu *vcpu) r = 0; goto out; } + + /* + * KVM_REQ_HV_STIMER has to be processed after + * KVM_REQ_CLOCK_UPDATE, because Hyper-V SynIC timers + * depend on the guest clock being up-to-date + */ if (kvm_check_request(KVM_REQ_HV_STIMER, vcpu)) kvm_hv_process_stimers(vcpu); } |