From 2fc612d38a507149b1f3f58709609c3bf0f62788 Mon Sep 17 00:00:00 2001 From: Eduardo Habkost Date: Mon, 17 Nov 2008 19:03:22 -0200 Subject: [PATCH] --- yaml --- r: 125238 b: refs/heads/master c: 0f3e9eeba0ea212bbea88790729d054b700ab91e h: refs/heads/master v: v3 --- [refs] | 2 +- trunk/arch/x86/include/asm/virtext.h | 8 ++++++++ 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/[refs] b/[refs] index a3ee9de3d873..d61a528fc951 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 2c8dceebb238680d5577500f8283397d41ca5590 +refs/heads/master: 0f3e9eeba0ea212bbea88790729d054b700ab91e diff --git a/trunk/arch/x86/include/asm/virtext.h b/trunk/arch/x86/include/asm/virtext.h index 2cfe363729c3..593636275238 100644 --- a/trunk/arch/x86/include/asm/virtext.h +++ b/trunk/arch/x86/include/asm/virtext.h @@ -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 */