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: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20111202085316.GI13268@amd.com>
Date:	Fri, 2 Dec 2011 09:53:16 +0100
From:	Joerg Roedel <joerg.roedel@....com>
To:	Sasha Levin <levinsasha928@...il.com>
CC:	<linux-kernel@...r.kernel.org>, Avi Kivity <avi@...hat.com>,
	Marcelo Tosatti <mtosatti@...hat.com>, <kvm@...r.kernel.org>
Subject: Re: [PATCH 2/2] KVM: SVM: Notify if SVM is already in use

On Thu, Dec 01, 2011 at 08:30:18PM +0200, Sasha Levin wrote:
> 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@....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/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);

Hmm, this can nicely flood dmesg on a machine with many cores :) How
about removing the CPU%d part of the message and using printk_once?


	Joerg

-- 
AMD Operating System Research Center

Advanced Micro Devices GmbH Einsteinring 24 85609 Dornach
General Managers: Alberto Bozzo, Andrew Bowd
Registration: Dornach, Landkr. Muenchen; Registerger. Muenchen, HRB Nr. 43632

--
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