KVM: Introduce paravirtualization hints and KVM_HINTS_DEDICATED
authorWanpeng Li <wanpengli@tencent.com>
Tue, 13 Feb 2018 01:05:40 +0000 (09:05 +0800)
committerRadim Krčmář <rkrcmar@redhat.com>
Tue, 6 Mar 2018 17:40:44 +0000 (18:40 +0100)
commita4429e53c9b3082b05e51224c3d58dbdd39306c5
treed0fbeff12679477198902c365cb23ad6b645747c
parentd4c67a7a54f12cb8d267284212f1072c95917e5a
KVM: Introduce paravirtualization hints and KVM_HINTS_DEDICATED

This patch introduces kvm_para_has_hint() to query for hints about
the configuration of the guests.  The first hint KVM_HINTS_DEDICATED,
is set if the guest has dedicated physical CPUs for each vCPU (i.e.
pinning and no over-commitment).  This allows optimizing spinlocks
and tells the guest to avoid PV TLB flush.

Cc: Paolo Bonzini <pbonzini@redhat.com>
Cc: Radim Krčmář <rkrcmar@redhat.com>
Cc: Eduardo Habkost <ehabkost@redhat.com>
Signed-off-by: Wanpeng Li <wanpengli@tencent.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Radim Krčmář <rkrcmar@redhat.com>
Documentation/virtual/kvm/cpuid.txt
arch/mips/include/asm/kvm_para.h
arch/powerpc/include/asm/kvm_para.h
arch/s390/include/asm/kvm_para.h
arch/x86/include/asm/kvm_para.h
arch/x86/include/uapi/asm/kvm_para.h
arch/x86/kernel/kvm.c
include/asm-generic/kvm_para.h
include/linux/kvm_para.h