mirror of
https://gitlab.com/redhat/centos-stream/src/kernel/centos-stream-9.git
synced 2026-09-09 00:08:12 +08:00
KVM: x86: remove always-false condition in kvmclock_sync_fn
JIRA: https://issues.redhat.com/browse/RHEL-25415 commit 2081a8450ef803e2e1136a80975eebc8682879b5 Author: Dongli Zhang <dongli.zhang@oracle.com> Date: Sun Oct 1 14:36:37 2023 -0700 KVM: x86: remove always-false condition in kvmclock_sync_fn The 'kvmclock_periodic_sync' is a readonly param that cannot change after bootup. The kvm_arch_vcpu_postcreate() is not going to schedule the kvmclock_sync_work if kvmclock_periodic_sync == false. As a result, the "if (!kvmclock_periodic_sync)" can never be true if the kvmclock_sync_work = kvmclock_sync_fn() is scheduled. Link: https://lore.kernel.org/kvm/a461bf3f-c17e-9c3f-56aa-726225e8391d@oracle.com Signed-off-by: Dongli Zhang <dongli.zhang@oracle.com> Link: https://lore.kernel.org/r/20231001213637.76686-1-dongli.zhang@oracle.com Signed-off-by: Sean Christopherson <seanjc@google.com> Signed-off-by: Prarit Bhargava <prarit@redhat.com>
This commit is contained in:
@@ -3380,9 +3380,6 @@ static void kvmclock_sync_fn(struct work_struct *work)
|
||||
kvmclock_sync_work);
|
||||
struct kvm *kvm = container_of(ka, struct kvm, arch);
|
||||
|
||||
if (!kvmclock_periodic_sync)
|
||||
return;
|
||||
|
||||
schedule_delayed_work(&kvm->arch.kvmclock_update_work, 0);
|
||||
schedule_delayed_work(&kvm->arch.kvmclock_sync_work,
|
||||
KVMCLOCK_SYNC_PERIOD);
|
||||
|
||||
Reference in New Issue
Block a user