aboutsummaryrefslogtreecommitdiffstats
path: root/arch/x86/kvm/Makefile
diff options
context:
space:
mode:
authorPaolo Bonzini <pbonzini@redhat.com>2021-02-06 09:53:33 -0500
committerPaolo Bonzini <pbonzini@redhat.com>2021-02-08 14:49:01 -0500
commit897218ff7cf19290ec2d69652ce673d8ed6fedeb (patch)
treee2901b8ab7865dc22205fdd57c173f72279aad19 /arch/x86/kvm/Makefile
parenti915: kvmgt: the KVM mmu_lock is now an rwlock (diff)
downloadlinux-dev-897218ff7cf19290ec2d69652ce673d8ed6fedeb.tar.xz
linux-dev-897218ff7cf19290ec2d69652ce673d8ed6fedeb.zip
KVM: x86: compile out TDP MMU on 32-bit systems
The TDP MMU assumes that it can do atomic accesses to 64-bit PTEs. Rather than just disabling it, compile it out completely so that it is possible to use for example 64-bit xchg. To limit the number of stubs, wrap all accesses to tdp_mmu_enabled or tdp_mmu_page with a function. Calls to all other functions in tdp_mmu.c are eliminated and do not even reach the linker. Reviewed-by: Sean Christopherson <seanjc@google.com> Tested-by: Sean Christopherson <seanjc@google.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'arch/x86/kvm/Makefile')
-rw-r--r--arch/x86/kvm/Makefile3
1 files changed, 2 insertions, 1 deletions
diff --git a/arch/x86/kvm/Makefile b/arch/x86/kvm/Makefile
index a50041235530..aeab168c5711 100644
--- a/arch/x86/kvm/Makefile
+++ b/arch/x86/kvm/Makefile
@@ -17,7 +17,8 @@ kvm-$(CONFIG_KVM_ASYNC_PF) += $(KVM)/async_pf.o
kvm-y += x86.o emulate.o i8259.o irq.o lapic.o xen.o \
i8254.o ioapic.o irq_comm.o cpuid.o pmu.o mtrr.o \
hyperv.o debugfs.o mmu/mmu.o mmu/page_track.o \
- mmu/spte.o mmu/tdp_iter.o mmu/tdp_mmu.o
+ mmu/spte.o
+kvm-$(CONFIG_X86_64) += mmu/tdp_iter.o mmu/tdp_mmu.o
kvm-intel-y += vmx/vmx.o vmx/vmenter.o vmx/pmu_intel.o vmx/vmcs12.o \
vmx/evmcs.o vmx/nested.o vmx/posted_intr.o