Skip to content

Commit

Permalink
x86: cpu_emergency_svm_disable() function
Browse files Browse the repository at this point in the history
This function can be used by the reboot or kdump code to forcibly
disable SVM on the CPU.

Signed-off-by: Eduardo Habkost <[email protected]>
Signed-off-by: Avi Kivity <[email protected]>
  • Loading branch information
ehabkost authored and avikivity committed Dec 31, 2008
1 parent 2c8dcee commit 0f3e9ee
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions arch/x86/include/asm/virtext.h
Original file line number Diff line number Diff line change
Expand Up @@ -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 */

0 comments on commit 0f3e9ee

Please sign in to comment.