KVM Archive on lore.kernel.org
 help / color / Atom feed
From: "Radim Krčmář" <rkrcmar@redhat.com>
To: Vitaly Kuznetsov <vkuznets@redhat.com>
Cc: Tony Luck <tony.luck@intel.com>,
	kvm@vger.kernel.org, Paolo Bonzini <pbonzini@redhat.com>,
	Sean Christopherson <sean.j.christopherson@intel.com>,
	Wanpeng Li <wanpengli@tencent.com>,
	Jim Mattson <jmattson@google.com>, Joerg Roedel <joro@8bytes.org>
Subject: Re: [PATCH] KVM: x86: Only print persistent reasons for kvm disabled once
Date: Tue, 27 Aug 2019 21:08:10 +0200
Message-ID: <20190827190810.GA21275@flask> (raw)
In-Reply-To: <87imqjm8b4.fsf@vitty.brq.redhat.com>

2019-08-27 08:27+0200, Vitaly Kuznetsov:
> Tony Luck <tony.luck@intel.com> writes:
> > When I boot my server I'm treated to a console log with:
> >
> > [   40.520510] kvm: disabled by bios
> > [   40.551234] kvm: disabled by bios
> > [   40.607987] kvm: disabled by bios
> > [   40.659701] kvm: disabled by bios
> > [   40.691224] kvm: disabled by bios
> > [   40.718786] kvm: disabled by bios
> > [   40.750122] kvm: disabled by bios
> > [   40.797170] kvm: disabled by bios
> > [   40.828408] kvm: disabled by bios
> >
> >  ... many, many more lines, one for every logical CPU
> (If I didn't miss anything) we have the following code:
> __init vmx_init()
>         kvm_init();
>             kvm_arch_init()
> and we bail on first error so there should be only 1 message per module
> load attempt. The question I have is who (and why) is trying to load
> kvm-intel (or kvm-amd which is not any different) for each CPU? Is it
> udev? Can this be changed?

I agree that this is a highly suspicious behavior.

It would be really helpful if we found out what is causing it.
So far, this patch seems to be working around a userspace bug.

> In particular, I'm worried about eVMCS enablement in vmx_init(), we will
> also get a bunch of "KVM: vmx: using Hyper-V Enlightened VMCS" messages
> if the consequent kvm_arch_init() fails.

And we can't get rid of this through the printk_once trick, because this
code lives in kvm_intel module and therefore gets unloaded on every

I am also not inclined to apply the patch as we will likely merge the
kvm and kvm_{svm,intel} modules in the future to take full advantage of
link time optimizations and this patch would stop working after that.


  parent reply index

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-08-26 18:23 Tony Luck
2019-08-27  6:27 ` Vitaly Kuznetsov
2019-08-27 17:50   ` Luck, Tony
2019-08-27 19:08   ` Radim Krčmář [this message]
2019-08-27 19:24     ` Sean Christopherson
2019-09-11 15:30       ` Paolo Bonzini

Reply instructions:

You may reply publically 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:

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20190827190810.GA21275@flask \
    --to=rkrcmar@redhat.com \
    --cc=jmattson@google.com \
    --cc=joro@8bytes.org \
    --cc=kvm@vger.kernel.org \
    --cc=pbonzini@redhat.com \
    --cc=sean.j.christopherson@intel.com \
    --cc=tony.luck@intel.com \
    --cc=vkuznets@redhat.com \
    --cc=wanpengli@tencent.com \


* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

KVM Archive on lore.kernel.org

Archives are clonable:
	git clone --mirror https://lore.kernel.org/kvm/0 kvm/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 kvm kvm/ https://lore.kernel.org/kvm \
		kvm@vger.kernel.org kvm@archiver.kernel.org
	public-inbox-index kvm

Example config snippet for mirrors

Newsgroup available over NNTP:

AGPL code for this site: git clone https://public-inbox.org/ public-inbox