1
0
Fork 0
alistair23-linux/arch/x86/kvm
Paolo Bonzini b8e8c8303f kvm: mmu: ITLB_MULTIHIT mitigation
With some Intel processors, putting the same virtual address in the TLB
as both a 4 KiB and 2 MiB page can confuse the instruction fetch unit
and cause the processor to issue a machine check resulting in a CPU lockup.

Unfortunately when EPT page tables use huge pages, it is possible for a
malicious guest to cause this situation.

Add a knob to mark huge pages as non-executable. When the nx_huge_pages
parameter is enabled (and we are using EPT), all huge pages are marked as
NX. If the guest attempts to execute in one of those pages, the page is
broken down into 4K pages, which are then marked executable.

This is not an issue for shadow paging (except nested EPT), because then
the host is in control of TLB flushes and the problematic situation cannot
happen.  With nested EPT, again the nested guest can cause problems shadow
and direct EPT is treated in the same way.

[ tglx: Fixup default to auto and massage wording a bit ]

Originally-by: Junaid Shahid <junaids@google.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
2019-11-04 12:22:02 +01:00
..
vmx KVM: vmx, svm: always run with EFER.NXE=1 when shadow paging is active 2019-10-31 12:13:44 +01:00
Kconfig kvm: x86: add host poll control msrs 2019-06-18 11:43:46 +02:00
Makefile KVM: x86: fix TRACE_INCLUDE_PATH and remove -I. header search paths 2019-01-25 19:12:37 +01:00
cpuid.c kvm: x86: Expose RDPID in KVM_GET_SUPPORTED_CPUID 2019-10-22 13:31:12 +02:00
cpuid.h x86/cpufeatures: Combine word 11 and 12 into a new scattered features word 2019-06-20 12:38:44 +02:00
debugfs.c KVM: no need to check return value of debugfs_create functions 2019-08-05 12:55:49 +02:00
emulate.c KVM: x86: set ctxt->have_exception in x86_decode_insn() 2019-09-11 18:01:34 +02:00
hyperv.c KVM: x86: hyper-v: set NoNonArchitecturalCoreSharing CPUID bit when SMT is impossible 2019-09-24 13:37:30 +02:00
hyperv.h treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 499 2019-06-19 17:09:53 +02:00
i8254.c kvm: x86: Add memcg accounting to KVM allocations 2019-02-20 22:48:30 +01:00
i8254.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
i8259.c kvm: x86: Add memcg accounting to KVM allocations 2019-02-20 22:48:30 +01:00
ioapic.c kvm: x86: ioapic and apic debug macros cleanup 2019-07-15 20:39:01 +02:00
ioapic.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
irq.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 320 2019-06-05 17:37:05 +02:00
irq.h KVM/arm updates for 5.3 2019-07-11 15:14:16 +02:00
irq_comm.c KVM/arm updates for 5.3 2019-07-11 15:14:16 +02:00
kvm_cache_regs.h KVM: x86: use direct accessors for RIP and RSP 2019-04-30 22:07:26 +02:00
lapic.c KVM: SVM: Fix potential wrong physical id in avic_handle_ldr_update 2019-10-22 18:47:50 +02:00
lapic.h KVM: SVM: Fix potential wrong physical id in avic_handle_ldr_update 2019-10-22 18:47:50 +02:00
mmu.c kvm: mmu: ITLB_MULTIHIT mitigation 2019-11-04 12:22:02 +01:00
mmu.h KVM: x86/mmu: Add explicit access mask for MMIO SPTEs 2019-08-22 10:09:24 +02:00
mmu_audit.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 499 2019-06-19 17:09:53 +02:00
mmutrace.h KVM: x86/mmu: Explicitly track only a single invalid mmu generation 2019-09-24 14:36:00 +02:00
mtrr.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 499 2019-06-19 17:09:53 +02:00
page_track.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 499 2019-06-19 17:09:53 +02:00
paging_tmpl.h kvm: mmu: ITLB_MULTIHIT mitigation 2019-11-04 12:22:02 +01:00
pmu.c KVM: x86: Add fixed counters to PMU filter 2019-07-20 09:00:48 +02:00
pmu.h KVM: x86: PMU Event Filter 2019-07-11 15:08:28 +02:00
pmu_amd.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 499 2019-06-19 17:09:53 +02:00
svm.c KVM: vmx, svm: always run with EFER.NXE=1 when shadow paging is active 2019-10-31 12:13:44 +01:00
trace.h KVM: nVMX: trace nested VM-Enter failures detected by H/W 2019-09-11 17:34:17 +02:00
tss.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
x86.c kvm: mmu: ITLB_MULTIHIT mitigation 2019-11-04 12:22:02 +01:00
x86.h KVM: x86: Move triple fault request into RM int injection 2019-09-24 14:31:20 +02:00