Commit 0f3e9eeb authored by Eduardo Habkost's avatar Eduardo Habkost Committed by Avi Kivity

x86: cpu_emergency_svm_disable() function

This function can be used by the reboot or kdump code to forcibly
disable SVM on the CPU.
Signed-off-by: default avatarEduardo Habkost <ehabkost@redhat.com>
Signed-off-by: default avatarAvi Kivity <avi@redhat.com>
parent 2c8dceeb
......@@ -121,4 +121,12 @@ static inline void cpu_svm_disable(void)
wrmsrl(MSR_EFER, efer & ~MSR_EFER_SVME_MASK);
}
/** Makes sure SVM is disabled, if it is supported on the CPU
*/
static inline void cpu_emergency_svm_disable(void)
{
if (cpu_has_svm(NULL))
cpu_svm_disable();
}
#endif /* _ASM_X86_VIRTEX_H */
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment