Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

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

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
Loading
Loading
Loading
Loading
+8 −0
Original line number Original line Diff line number Diff line
@@ -121,4 +121,12 @@ static inline void cpu_svm_disable(void)
	wrmsrl(MSR_EFER, efer & ~MSR_EFER_SVME_MASK);
	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 */
#endif /* _ASM_X86_VIRTEX_H */