]> git.itanic.dy.fi Git - linux-stable/commit
KVM: x86: Make Hyper-V emulation optional
authorVitaly Kuznetsov <vkuznets@redhat.com>
Tue, 5 Dec 2023 10:36:26 +0000 (11:36 +0100)
committerSean Christopherson <seanjc@google.com>
Thu, 7 Dec 2023 17:34:57 +0000 (09:34 -0800)
commitb4f69df0f65e97fec439130a0d0a8b9c7cc02df2
tree2d7e60178bfbd974c6a7eb361b0a1fb10918b60f
parentf97314626734deaef49564a429c6f8eee3846bd3
KVM: x86: Make Hyper-V emulation optional

Hyper-V emulation in KVM is a fairly big chunk and in some cases it may be
desirable to not compile it in to reduce module sizes as well as the attack
surface. Introduce CONFIG_KVM_HYPERV option to make it possible.

Note, there's room for further nVMX/nSVM code optimizations when
!CONFIG_KVM_HYPERV, this will be done in follow-up patches.

Reorganize Makefile a bit so all CONFIG_HYPERV and CONFIG_KVM_HYPERV files
are grouped together.

Signed-off-by: Vitaly Kuznetsov <vkuznets@redhat.com>
Reviewed-by: Maxim Levitsky <mlevitsk@redhat.com>
Tested-by: Jeremi Piotrowski <jpiotrowski@linux.microsoft.com>
Link: https://lore.kernel.org/r/20231205103630.1391318-13-vkuznets@redhat.com
Signed-off-by: Sean Christopherson <seanjc@google.com>
arch/x86/include/asm/kvm_host.h
arch/x86/kvm/Kconfig
arch/x86/kvm/Makefile
arch/x86/kvm/cpuid.c
arch/x86/kvm/hyperv.h
arch/x86/kvm/irq_comm.c
arch/x86/kvm/svm/hyperv.h
arch/x86/kvm/vmx/hyperv.h
arch/x86/kvm/vmx/nested.c
arch/x86/kvm/vmx/vmx.c
arch/x86/kvm/x86.c