Merge tag 'modules-for-v5.15' of git://git.kernel.org/pub/scm/linux/kernel/git/jeyu...
[linux-2.6-microblaze.git] / arch / x86 / kvm / x86.c
index 1a00af1..28ef141 100644 (file)
@@ -3321,6 +3321,10 @@ int kvm_set_msr_common(struct kvm_vcpu *vcpu, struct msr_data *msr_info)
                        if (!msr_info->host_initiated) {
                                s64 adj = data - vcpu->arch.ia32_tsc_adjust_msr;
                                adjust_tsc_offset_guest(vcpu, adj);
+                               /* Before back to guest, tsc_timestamp must be adjusted
+                                * as well, otherwise guest's percpu pvclock time could jump.
+                                */
+                               kvm_make_request(KVM_REQ_CLOCK_UPDATE, vcpu);
                        }
                        vcpu->arch.ia32_tsc_adjust_msr = data;
                }