aboutsummaryrefslogtreecommitdiffstats
path: root/arch/x86/include/asm/kvm_para.h
diff options
context:
space:
mode:
authorWanpeng Li <wanpengli@tencent.com>2018-02-13 09:05:40 +0800
committerRadim Krčmář <rkrcmar@redhat.com>2018-03-06 18:40:44 +0100
commita4429e53c9b3082b05e51224c3d58dbdd39306c5 (patch)
treed0fbeff12679477198902c365cb23ad6b645747c /arch/x86/include/asm/kvm_para.h
parentkvm: use insert sort in kvm_io_bus_register_dev function (diff)
downloadlinux-dev-a4429e53c9b3082b05e51224c3d58dbdd39306c5.tar.xz
linux-dev-a4429e53c9b3082b05e51224c3d58dbdd39306c5.zip
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>
Diffstat (limited to 'arch/x86/include/asm/kvm_para.h')
-rw-r--r--arch/x86/include/asm/kvm_para.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/arch/x86/include/asm/kvm_para.h b/arch/x86/include/asm/kvm_para.h
index 7b407dda2bd7..3aea2658323a 100644
--- a/arch/x86/include/asm/kvm_para.h
+++ b/arch/x86/include/asm/kvm_para.h
@@ -88,6 +88,7 @@ static inline long kvm_hypercall4(unsigned int nr, unsigned long p1,
#ifdef CONFIG_KVM_GUEST
bool kvm_para_available(void);
unsigned int kvm_arch_para_features(void);
+unsigned int kvm_arch_para_hints(void);
void kvm_async_pf_task_wait(u32 token, int interrupt_kernel);
void kvm_async_pf_task_wake(u32 token);
u32 kvm_read_and_reset_pf_reason(void);
@@ -115,6 +116,11 @@ static inline unsigned int kvm_arch_para_features(void)
return 0;
}
+static inline unsigned int kvm_arch_para_hints(void)
+{
+ return 0;
+}
+
static inline u32 kvm_read_and_reset_pf_reason(void)
{
return 0;