lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Date:	Thu,  1 Dec 2011 20:30:17 +0200
From:	Sasha Levin <levinsasha928@...il.com>
To:	linux-kernel@...r.kernel.org
Cc:	Sasha Levin <levinsasha928@...il.com>,
	Joerg Roedel <joerg.roedel@....com>,
	Avi Kivity <avi@...hat.com>,
	Marcelo Tosatti <mtosatti@...hat.com>, kvm@...r.kernel.org
Subject: [PATCH 1/2] KVM: VMX: Notify if VMX is already in use

Currently we silently fail if VMX 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@....com>
Cc: Avi Kivity <avi@...hat.com>
Cc: Marcelo Tosatti <mtosatti@...hat.com>
Cc: kvm@...r.kernel.org
Signed-off-by: Sasha Levin <levinsasha928@...il.com>
---
 arch/x86/kvm/vmx.c |    5 ++++-
 1 files changed, 4 insertions(+), 1 deletions(-)

diff --git a/arch/x86/kvm/vmx.c b/arch/x86/kvm/vmx.c
index 4ceced2..0ef59ed 100644
--- a/arch/x86/kvm/vmx.c
+++ b/arch/x86/kvm/vmx.c
@@ -2300,8 +2300,11 @@ static int hardware_enable(void *garbage)
 	u64 phys_addr = __pa(per_cpu(vmxarea, cpu));
 	u64 old, test_bits;
 
-	if (read_cr4() & X86_CR4_VMXE)
+	if (read_cr4() & X86_CR4_VMXE) {
+		printk(KERN_ERR "hardware_enable: VMX already in use on CPU%d. "
+				"Are you already another hypervisor?\n", cpu);
 		return -EBUSY;
+	}
 
 	INIT_LIST_HEAD(&per_cpu(loaded_vmcss_on_cpu, cpu));
 	rdmsrl(MSR_IA32_FEATURE_CONTROL, old);
-- 
1.7.8.rc4

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ