]> git.itanic.dy.fi Git - linux-stable/commit
kvm: x86: Set highest physical address bits in non-present/reserved SPTEs
authorJunaid Shahid <junaids@google.com>
Tue, 14 Aug 2018 17:15:34 +0000 (10:15 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 15 Sep 2018 07:47:02 +0000 (09:47 +0200)
commitd9b47449c1a17be65332e07c1e8acba0f8b27e10
treea10985243a8b47c4dab68b86c6229d62a1a02997
parentf9acfbec6652b971930e9423894d33c85230e8ac
kvm: x86: Set highest physical address bits in non-present/reserved SPTEs

commit 28a1f3ac1d0c8558ee4453d9634dad891a6e922e upstream.

Always set the 5 upper-most supported physical address bits to 1 for SPTEs
that are marked as non-present or reserved, to make them unusable for
L1TF attacks from the guest. Currently, this just applies to MMIO SPTEs.
(We do not need to mark PTEs that are completely 0 as physical page 0
is already reserved.)

This allows mitigation of L1TF without disabling hyper-threading by using
shadow paging mode instead of EPT.

Signed-off-by: Junaid Shahid <junaids@google.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
arch/x86/kvm/mmu.c
arch/x86/kvm/x86.c