mirror of
https://github.com/torvalds/linux.git
synced 2024-12-18 09:02:17 +00:00
0e0ab73c9a
...except RSP, which is restored by hardware as part of VM-Exit.
Paolo theorized that restoring registers from the stack after a VM-Exit
in lieu of zeroing them could lead to speculative execution with the
guest's values, e.g. if the stack accesses miss the L1 cache[1].
Zeroing XORs are dirt cheap, so just be ultra-paranoid.
Note that the scratch register (currently RCX) used to save/restore the
guest state is also zeroed as its host-defined value is loaded via the
stack, just with a MOV instead of a POP.
[1] https://patchwork.kernel.org/patch/10771539/#22441255
Fixes:
|
||
---|---|---|
.. | ||
capabilities.h | ||
evmcs.c | ||
evmcs.h | ||
nested.c | ||
nested.h | ||
ops.h | ||
pmu_intel.c | ||
vmcs12.c | ||
vmcs12.h | ||
vmcs_shadow_fields.h | ||
vmcs.h | ||
vmenter.S | ||
vmx.c | ||
vmx.h |