Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

x86/KVM/VMX: Don't set l1tf_flush_l1d from vmx_handle_external_intr()

For VMEXITs caused by external interrupts, vmx_handle_external_intr()
indirectly calls into the interrupt handlers through the host's IDT.

It follows that these interrupts get accounted for in the
kvm_cpu_l1tf_flush_l1d per-cpu flag.

The subsequently executed vmx_l1d_flush() will thus be aware that some
interrupts have happened and conduct a L1d flush anyway.

Setting l1tf_flush_l1d from vmx_handle_external_intr() isn't needed
anymore. Drop it.

Signed-off-by: Nicolai Stange <nstange@suse.de>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>

authored by

Nicolai Stange and committed by
Thomas Gleixner
18b57ce2 ffcba43f

-1
-1
arch/x86/kvm/vmx.c
··· 9983 9983 [ss]"i"(__KERNEL_DS), 9984 9984 [cs]"i"(__KERNEL_CS) 9985 9985 ); 9986 - vcpu->arch.l1tf_flush_l1d = true; 9987 9986 } 9988 9987 } 9989 9988 STACK_FRAME_NON_STANDARD(vmx_handle_external_intr);