aboutsummaryrefslogtreecommitdiffstats
path: root/rust/helpers/mutex.c
diff options
context:
space:
mode:
authorChao Gao <[email protected]>2025-03-24 14:08:48 +0000
committerSean Christopherson <[email protected]>2025-04-28 17:57:56 +0000
commita0ee1d5faff135e28810f29e0f06328c66f89852 (patch)
tree19dc6c44fbfc48f224043a3994b236e61523d8ab /rust/helpers/mutex.c
parentKVM: VMX: Use LEAVE in vmx_do_interrupt_irqoff() (diff)
downloadkernel-a0ee1d5faff135e28810f29e0f06328c66f89852.tar.gz
kernel-a0ee1d5faff135e28810f29e0f06328c66f89852.zip
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: [email protected] Signed-off-by: Chao Gao <[email protected]> Reviewed-by: Kai Huang <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Sean Christopherson <[email protected]>
Diffstat (limited to 'rust/helpers/mutex.c')
0 files changed, 0 insertions, 0 deletions