Commit 923fcb3d authored by Yury Norov's avatar Yury Norov Committed by Sean Christopherson
Browse files

KVM: SEV: don't check have_run_cpus in sev_writeback_caches()



Drop KVM's check on an empty cpumask when flushing caches when memory is
being reclaimed from an SEV VM, as smp_call_function_many_cond() naturally
(and correctly) handles an empty cpumask.  This avoids an extra O(n)
lookup in the common case where at least one pCPU has enterred the guest,
which could be noticeable in some setups, e.g. if a small VM is pinned to
the last few pCPUs in the system.

Fixes: 6f38f8c5 ("KVM: SVM: Flush cache only on CPUs running SEV guest")
Signed-off-by: default avatarYury Norov (NVIDIA) <yury.norov@gmail.com>
[sean: rewrite changelog to capture performance angle]
Signed-off-by: default avatarSean Christopherson <seanjc@google.com>
parent c87bd4dd
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment