]> git.baikalelectronics.ru Git - kernel.git/commit
kvm: x86: abstract locking around pvclock_update_vm_gtod_copy
authorPaolo Bonzini <pbonzini@redhat.com>
Thu, 16 Sep 2021 18:15:32 +0000 (18:15 +0000)
committerPaolo Bonzini <pbonzini@redhat.com>
Fri, 1 Oct 2021 07:44:47 +0000 (03:44 -0400)
commit600976e230dee967fce4359f21a813f4d313347f
tree3509f0ac652d0f4f907674620e3d0505fcebde05
parenta3dc83a7e8a5fdff6711b90678d9fe3ee5368012
kvm: x86: abstract locking around pvclock_update_vm_gtod_copy

Updates to the kvmclock parameters needs to do a complicated dance of
KVM_REQ_MCLOCK_INPROGRESS and KVM_REQ_CLOCK_UPDATE in addition to taking
pvclock_gtod_sync_lock.  Place that in two functions that can be called
on all of master clock update, KVM_SET_CLOCK, and Hyper-V reenlightenment.

Reviewed-by: Marcelo Tosatti <mtosatti@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
arch/x86/include/asm/kvm_host.h
arch/x86/kvm/x86.c