]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
kvm: apic: Flush TLB after APIC mode/address change if VPIDs are in use
authorJunaid Shahid <junaids@google.com>
Thu, 26 Apr 2018 20:09:50 +0000 (13:09 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 20 Jun 2018 19:01:29 +0000 (04:01 +0900)
commitcf70b9d07d0f75e95ea89daeb2e1b5e43cc9f13b
tree0fecfe443ef8901f148a4375a988ef566caed304
parentbb7819a5a33bb694407996a934b1d91cdc86f490
kvm: apic: Flush TLB after APIC mode/address change if VPIDs are in use

[ Upstream commit a468f2dbf921d02f5107378501693137a812999b ]

Currently, KVM flushes the TLB after a change to the APIC access page
address or the APIC mode when EPT mode is enabled. However, even in
shadow paging mode, a TLB flush is needed if VPIDs are being used, as
specified in the Intel SDM Section 29.4.5.

So replace vmx_flush_tlb_ept_only() with vmx_flush_tlb(), which will
flush if either EPT or VPIDs are in use.

Signed-off-by: Junaid Shahid <junaids@google.com>
Reviewed-by: Jim Mattson <jmattson@google.com>
Signed-off-by: Radim Krčmář <rkrcmar@redhat.com>
Signed-off-by: Sasha Levin <alexander.levin@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
arch/x86/kvm/vmx.c