]> git.proxmox.com Git - mirror_ubuntu-kernels.git/commit
x86/kvm: Don't use pv tlb/ipi/sched_yield if on 1 vCPU
authorWanpeng Li <wanpengli@tencent.com>
Fri, 18 Feb 2022 08:10:38 +0000 (00:10 -0800)
committerPaolo Bonzini <pbonzini@redhat.com>
Fri, 18 Feb 2022 08:36:24 +0000 (03:36 -0500)
commitec756e40e271866f951d77c5e923d8deb6002b15
tree43b000e294ca5e44e2cb5f440515c1a8c8cbeee3
parentba1f77c546966c12d86220d078e5838dcaeab348
x86/kvm: Don't use pv tlb/ipi/sched_yield if on 1 vCPU

Inspired by commit 3553ae5690a (x86/kvm: Don't use pvqspinlock code if
only 1 vCPU), on a VM with only 1 vCPU, there is no need to enable
pv tlb/ipi/sched_yield and we can save the memory for __pv_cpu_mask.

Signed-off-by: Wanpeng Li <wanpengli@tencent.com>
Message-Id: <1645171838-2855-1-git-send-email-wanpengli@tencent.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
arch/x86/kernel/kvm.c