x86/spec-ctrl: Calculate safe PTE addresses for L1TF mitigations
authorAndrew Cooper <andrew.cooper3@citrix.com>
Wed, 25 Jul 2018 12:10:19 +0000 (12:10 +0000)
committerAndrew Cooper <andrew.cooper3@citrix.com>
Tue, 14 Aug 2018 15:56:47 +0000 (16:56 +0100)
commitb03a57c9383b32181e60add6b6de12b473652aa4
tree7ecfd24789068002365ecdfbffc777c8056fa9e2
parent73392c7fd14c59f8c96e0b2eeeb329e4ae9086b6
x86/spec-ctrl: Calculate safe PTE addresses for L1TF mitigations

Safe PTE addresses for L1TF mitigations are ones which are within the L1D
address width (may be wider than reported in CPUID), and above the highest
cacheable RAM/NVDIMM/BAR/etc.

All logic here is best-effort heuristics, which should in practice be fine for
most hardware.  Future work will see about disentangling the SRAT handling
further, as well as having L0 pass this information down to lower levels when
virtualised.

This is part of XSA-273 / CVE-2018-3620.

Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
Signed-off-by: Jan Beulich <jbeulich@suse.com>
xen/arch/x86/setup.c
xen/arch/x86/spec_ctrl.c
xen/arch/x86/srat.c
xen/common/efi/boot.c
xen/include/asm-x86/spec_ctrl.h