diff options
author | Chao Gao <chao.gao@intel.com> | 2025-03-24 22:08:48 +0800 |
---|---|---|
committer | Sean Christopherson <seanjc@google.com> | 2025-04-28 10:57:56 -0700 |
commit | a0ee1d5faff135e28810f29e0f06328c66f89852 (patch) | |
tree | 19dc6c44fbfc48f224043a3994b236e61523d8ab /scripts/lib | |
parent | 798b9b1cb0e55c10fe761f42de5e28ecec8ef1f4 (diff) |
KVM: VMX: Flush shadow VMCS on emergency reboot
Ensure the shadow VMCS cache is evicted during an emergency reboot to
prevent potential memory corruption if the cache is evicted after reboot.
This issue was identified through code inspection, as __loaded_vmcs_clear()
flushes both the normal VMCS and the shadow VMCS.
Avoid checking the "launched" state during an emergency reboot, unlike the
behavior in __loaded_vmcs_clear(). This is important because reboot NMIs
can interfere with operations like copy_shadow_to_vmcs12(), where shadow
VMCSes are loaded directly using VMPTRLD. In such cases, if NMIs occur
right after the VMCS load, the shadow VMCSes will be active but the
"launched" state may not be set.
Fixes: 16f5b9034b69 ("KVM: nVMX: Copy processor-specific shadow-vmcs to VMCS12")
Cc: stable@vger.kernel.org
Signed-off-by: Chao Gao <chao.gao@intel.com>
Reviewed-by: Kai Huang <kai.huang@intel.com>
Link: https://lore.kernel.org/r/20250324140849.2099723-1-chao.gao@intel.com
Signed-off-by: Sean Christopherson <seanjc@google.com>
Diffstat (limited to 'scripts/lib')
0 files changed, 0 insertions, 0 deletions