lkml.org 
[lkml]   [2011]   [Dec]   [1]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH 2/2] KVM: SVM: Notify if SVM is already in use
Date
Currently we silently fail if SVM is already in use by a different
virtualization technology.

This is bad since it's non-obvious for the user, and its not too uncommon
for users to have several of these installed on same host.

This patch adds a message to notify the user of the problem.

Cc: Joerg Roedel <joerg.roedel@amd.com>
Cc: Avi Kivity <avi@redhat.com>
Cc: Marcelo Tosatti <mtosatti@redhat.com>
Cc: kvm@vger.kernel.org
Signed-off-by: Sasha Levin <levinsasha928@gmail.com>
---
arch/x86/kvm/svm.c | 5 ++++-
1 files changed, 4 insertions(+), 1 deletions(-)

diff --git a/arch/x86/kvm/svm.c b/arch/x86/kvm/svm.c
index e32243e..8d1a066 100644
--- a/arch/x86/kvm/svm.c
+++ b/arch/x86/kvm/svm.c
@@ -587,8 +587,11 @@ static int svm_hardware_enable(void *garbage)
int me = raw_smp_processor_id();

rdmsrl(MSR_EFER, efer);
- if (efer & EFER_SVME)
+ if (efer & EFER_SVME) {
+ printk(KERN_ERR "svm_hardware_enable: SVM already in use on CPU%d. "
+ "Are you already another hypervisor?\n", me);
return -EBUSY;
+ }

if (!has_svm()) {
printk(KERN_ERR "svm_hardware_enable: err EOPNOTSUPP on %d\n",
--
1.7.8.rc4


\
 
 \ /
  Last update: 2011-12-01 19:33    [W:0.104 / U:0.176 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site