x86/spec-ctrl: Drop SPEC_CTRL_{ENTRY_FROM,EXIT_TO}_HVM
authorAndrew Cooper <andrew.cooper3@citrix.com>
Wed, 12 Jan 2022 16:36:29 +0000 (16:36 +0000)
committerAndrew Cooper <andrew.cooper3@citrix.com>
Thu, 20 Jan 2022 16:32:11 +0000 (16:32 +0000)
commit95b13fa43e0753b7514bef13abe28253e8614f62
treee867fcc3bf11aef59a2ad8a20135dec938406bbb
parent6536688439dbca1d08fd6db5be29c39e3917fb2f
x86/spec-ctrl: Drop SPEC_CTRL_{ENTRY_FROM,EXIT_TO}_HVM

These were written before Spectre/Meltdown went public, and there was large
uncertainty in how the protections would evolve.  As it turns out, they're
very specific to Intel hardware, and not very suitable for AMD.

Drop the macros, opencoding the relevant subset of functionality, and leaving
grep-fodder to locate the logic.  No change at all for VT-x.

For AMD, the only relevant piece of functionality is DO_OVERWRITE_RSB,
although we will soon be adding (different) logic to handle MSR_SPEC_CTRL.

This has a marginal improvement of removing an unconditional pile of long-nops
from the vmentry/exit path.

Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
Reviewed-by: Roger Pau Monné <roger.pau@citrix.com>
xen/arch/x86/hvm/svm/entry.S
xen/arch/x86/hvm/vmx/entry.S
xen/arch/x86/include/asm/spec_ctrl_asm.h