linux-stable/arch
Vitaly Kuznetsov 250552b925 KVM: nVMX: Don't use Enlightened MSR Bitmap for L3
When KVM runs as a nested hypervisor on top of Hyper-V it uses Enlightened
VMCS and enables Enlightened MSR Bitmap feature for its L1s and L2s (which
are actually L2s and L3s from Hyper-V's perspective). When MSR bitmap is
updated, KVM has to reset HV_VMX_ENLIGHTENED_CLEAN_FIELD_MSR_BITMAP from
clean fields to make Hyper-V aware of the change. For KVM's L1s, this is
done in vmx_disable_intercept_for_msr()/vmx_enable_intercept_for_msr().
MSR bitmap for L2 is build in nested_vmx_prepare_msr_bitmap() by blending
MSR bitmap for L1 and L1's idea of MSR bitmap for L2. KVM, however, doesn't
check if the resulting bitmap is different and never cleans
HV_VMX_ENLIGHTENED_CLEAN_FIELD_MSR_BITMAP in eVMCS02. This is incorrect and
may result in Hyper-V missing the update.

The issue could've been solved by calling evmcs_touch_msr_bitmap() for
eVMCS02 from nested_vmx_prepare_msr_bitmap() unconditionally but doing so
would not give any performance benefits (compared to not using Enlightened
MSR Bitmap at all). 3-level nesting is also not a very common setup
nowadays.

Don't enable 'Enlightened MSR Bitmap' feature for KVM's L2s (real L3s) for
now.

Signed-off-by: Vitaly Kuznetsov <vkuznets@redhat.com>
Message-Id: <20211129094704.326635-2-vkuznets@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2021-12-08 04:53:13 -05:00
..
alpha futex: Wireup futex_waitv syscall 2021-11-25 14:26:12 +01:00
arc Add linux/cacheflush.h 2021-11-17 10:36:15 -05:00
arm ARM: SoC fixes for v5.16, part 2 2021-11-25 10:31:37 -08:00
arm64 arm64 fixes for -rc4 2021-12-03 10:50:14 -08:00
csky asm-generic: asm/syscall.h cleanup 2021-11-10 11:22:03 -08:00
h8300 Kbuild updates for v5.16 2021-11-08 09:15:45 -08:00
hexagon hexagon: ignore vmlinux.lds 2021-11-20 10:35:54 -08:00
ia64 futex: Wireup futex_waitv syscall 2021-11-25 14:26:12 +01:00
m68k asm-generic: syscall table updates 2021-11-25 10:41:28 -08:00
microblaze futex: Wireup futex_waitv syscall 2021-11-25 14:26:12 +01:00
mips - build fix for ZSTD enabled configs 2021-11-27 09:50:31 -08:00
nds32 Add linux/cacheflush.h 2021-11-17 10:36:15 -05:00
nios2 Add linux/cacheflush.h 2021-11-17 10:36:15 -05:00
openrisc Merge branch 'exit-cleanups-for-v5.16' of git://git.kernel.org/pub/scm/linux/kernel/git/ebiederm/user-namespace 2021-11-10 16:15:54 -08:00
parisc parisc: Mark cr16 CPU clocksource unstable on all SMP machines 2021-12-04 21:36:04 +01:00
powerpc powerpc fixes for 5.16 #3 2021-11-27 10:06:15 -08:00
riscv RISC-V: KVM: Fix incorrect KVM_MAX_VCPUS value 2021-11-22 10:36:19 +05:30
s390 s390: update defconfigs 2021-12-02 19:29:44 +01:00
sh asm-generic: syscall table updates 2021-11-25 10:41:28 -08:00
sparc asm-generic: syscall table updates 2021-11-25 10:41:28 -08:00
um Merge branch 'exit-cleanups-for-v5.16' of git://git.kernel.org/pub/scm/linux/kernel/git/ebiederm/user-namespace 2021-11-10 16:15:54 -08:00
x86 KVM: nVMX: Don't use Enlightened MSR Bitmap for L3 2021-12-08 04:53:13 -05:00
xtensa asm-generic: syscall table updates 2021-11-25 10:41:28 -08:00
.gitignore
Kconfig arch: Add generic Kconfig option indicating page size smaller than 64k 2021-11-27 14:34:41 -08:00