From: "Andreas Färber" <afaerber@suse.de>
To: Sasha Levin <levinsasha928@gmail.com>
Cc: joerg.roedel@amd.com, avi@redhat.com, mtosatti@redhat.com,
kvm@vger.kernel.org
Subject: Re: [PATCH v2 1/2] KVM: VMX: Notify if VMX is already in use
Date: Wed, 07 Dec 2011 16:13:47 +0100 [thread overview]
Message-ID: <4EDF82AB.9020709@suse.de> (raw)
In-Reply-To: <1323268449-9818-1-git-send-email-levinsasha928@gmail.com>
Am 07.12.2011 15:34, schrieb Sasha Levin:
> 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.
Being more verbose is a good move.
> Signed-off-by: Sasha Levin <levinsasha928@gmail.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_once(KERN_ERR "hardware_enable: VMX already in use on CPU%d. "
> + "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;
> + }
>
> INIT_LIST_HEAD(&per_cpu(loaded_vmcss_on_cpu, cpu));
> rdmsrl(MSR_IA32_FEATURE_CONTROL, old);
--
SUSE LINUX Products GmbH, Maxfeldstr. 5, 90409 Nürnberg, Germany
GF: Jeff Hawn, Jennifer Guild, Felix Imendörffer; HRB 16746 AG Nürnberg
prev parent reply other threads:[~2011-12-07 15:14 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-12-07 14:34 [PATCH v2 1/2] KVM: VMX: Notify if VMX is already in use Sasha Levin
2011-12-07 14:34 ` [PATCH v2 2/2] KVM: SVM: Notify if SVM " Sasha Levin
2011-12-07 15:13 ` Andreas Färber [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4EDF82AB.9020709@suse.de \
--to=afaerber@suse.de \
--cc=avi@redhat.com \
--cc=joerg.roedel@amd.com \
--cc=kvm@vger.kernel.org \
--cc=levinsasha928@gmail.com \
--cc=mtosatti@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).