On Thu, Jan 13, 2022 at 04:38:32PM +0000, Andrew Cooper wrote: > 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. > > Expand and drop the macros. 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 <[email protected]>
Reviewed-by: Roger Pau Monné <[email protected]> I wonder however if it would be clearer to define SPEC_CTRL_ENTRY_FROM_{SVM,VMX} and EXIT macros in spec_ctrl_asm.h (even if just used in a single place) so that all the related SPEC macros are in a single file. Thanks, Roger.
