aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
authorSean Christopherson <seanjc@google.com>2025-01-31 17:38:19 -0800
committerSean Christopherson <seanjc@google.com>2025-02-12 10:45:54 -0800
commitaceb04f571e9fb85d627ec854ea9a012c734fbc2 (patch)
tree66c8bc81fefa4b1289029313c1df2b6fde5bc68a
parentKVM: x86: Eliminate "handling" of impossible errors during SUSPEND (diff)
downloadwireguard-linux-aceb04f571e9fb85d627ec854ea9a012c734fbc2.tar.xz
wireguard-linux-aceb04f571e9fb85d627ec854ea9a012c734fbc2.zip
KVM: x86: Drop local pvclock_flags variable in kvm_guest_time_update()
Drop the local pvclock_flags in kvm_guest_time_update(), the local variable is immediately shoved into the per-vCPU "cache", i.e. the local variable serves no purpose. No functional change intended. Reviewed-by: Paul Durrant <paul@xen.org> Link: https://lore.kernel.org/r/20250201013827.680235-4-seanjc@google.com Signed-off-by: Sean Christopherson <seanjc@google.com>
-rw-r--r--arch/x86/kvm/x86.c7
1 files changed, 2 insertions, 5 deletions
diff --git a/arch/x86/kvm/x86.c b/arch/x86/kvm/x86.c
index fa409d540d83..08e9ea87994b 100644
--- a/arch/x86/kvm/x86.c
+++ b/arch/x86/kvm/x86.c
@@ -3178,7 +3178,6 @@ static int kvm_guest_time_update(struct kvm_vcpu *v)
struct kvm_arch *ka = &v->kvm->arch;
s64 kernel_ns;
u64 tsc_timestamp, host_tsc;
- u8 pvclock_flags;
bool use_master_clock;
#ifdef CONFIG_KVM_XEN
/*
@@ -3261,11 +3260,9 @@ static int kvm_guest_time_update(struct kvm_vcpu *v)
vcpu->last_guest_tsc = tsc_timestamp;
/* If the host uses TSC clocksource, then it is stable */
- pvclock_flags = 0;
+ vcpu->hv_clock.flags = 0;
if (use_master_clock)
- pvclock_flags |= PVCLOCK_TSC_STABLE_BIT;
-
- vcpu->hv_clock.flags = pvclock_flags;
+ vcpu->hv_clock.flags |= PVCLOCK_TSC_STABLE_BIT;
if (vcpu->pv_time.active)
kvm_setup_guest_pvclock(v, &vcpu->pv_time, 0, false);