From mboxrd@z Thu Jan 1 00:00:00 1970 From: =?ISO-8859-15?Q?Andreas_F=E4rber?= Subject: Re: [PATCH v2 1/2] KVM: VMX: Notify if VMX is already in use Date: Wed, 07 Dec 2011 16:13:47 +0100 Message-ID: <4EDF82AB.9020709@suse.de> References: <1323268449-9818-1-git-send-email-levinsasha928@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-15 Content-Transfer-Encoding: QUOTED-PRINTABLE Cc: joerg.roedel@amd.com, avi@redhat.com, mtosatti@redhat.com, kvm@vger.kernel.org To: Sasha Levin Return-path: Received: from cantor2.suse.de ([195.135.220.15]:55162 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756042Ab1LGPOt (ORCPT ); Wed, 7 Dec 2011 10:14:49 -0500 In-Reply-To: <1323268449-9818-1-git-send-email-levinsasha928@gmail.com> Sender: kvm-owner@vger.kernel.org List-ID: Am 07.12.2011 15:34, schrieb Sasha Levin: > Currently we silently fail if VMX is already in use by a different > virtualization technology. >=20 > This is bad since it's non-obvious for the user, and its not too unco= mmon > for users to have several of these installed on same host. >=20 > This patch adds a message to notify the user of the problem. Being more verbose is a good move. > Signed-off-by: Sasha Levin > --- > arch/x86/kvm/vmx.c | 5 ++++- > 1 files changed, 4 insertions(+), 1 deletions(-) >=20 > 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 =3D __pa(per_cpu(vmxarea, cpu)); > u64 old, test_bits; > =20 > - if (read_cr4() & X86_CR4_VMXE) > + if (read_cr4() & X86_CR4_VMXE) { > + printk_once(KERN_ERR "hardware_enable: VMX already in use on CPU%d= =2E " > + "Are you already another hypervisor?\n", cpu); Since this question addresses the user, it should read: "Are you already using another hypervisor?\n" (or the like) Applies to 2/2 as well. Andreas > return -EBUSY; > + } > =20 > INIT_LIST_HEAD(&per_cpu(loaded_vmcss_on_cpu, cpu)); > rdmsrl(MSR_IA32_FEATURE_CONTROL, old); --=20 SUSE LINUX Products GmbH, Maxfeldstr. 5, 90409 N=FCrnberg, Germany GF: Jeff Hawn, Jennifer Guild, Felix Imend=F6rffer; HRB 16746 AG N=FCrn= berg