linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Thomas Gleixner <tglx@linutronix.de>
To: Paolo Bonzini <pbonzini@redhat.com>
Cc: Jingqi Liu <jingqi.liu@intel.com>,
	rkrcmar@redhat.com, mingo@redhat.com, hpa@zytor.com,
	x86@kernel.org, linux-kernel@vger.kernel.org,
	kvm@vger.kernel.org, wei.w.wang@intel.com,
	Robert Hoo <robert.hu@linux.intel.com>
Subject: Re: [PATCH v2] KVM: Expose the split lock detection feature to guest VM
Date: Wed, 4 Jul 2018 20:39:50 +0200 (CEST)	[thread overview]
Message-ID: <alpine.DEB.2.21.1807042035340.12092@nanos.tec.linutronix.de> (raw)
In-Reply-To: <a83b9b41-afbb-016d-528b-029f1b6228ae@redhat.com>

On Wed, 4 Jul 2018, Paolo Bonzini wrote:
> On 04/07/2018 16:51, Thomas Gleixner wrote:
> > There is no rush for this to be in KVM/QEMU now because all what exists for
> > this new split lock thing is 'silicon' running on an emulator. And w/o
> > support in the kernel proper this is completely useless.
> 
> That's good.  I assumed it was IceLake, in which case the feature would
> block the definition of a standard IceLake CPU model in QEMU.
> 
> > So this needs the following things:
> > 
> >   1) Proper enumeration via CPUID or MISC_FEATURES. The current detection
> >      hack is just broken.
> 
> Yes please.
> 
> >   2) A proper host side implementation, which then automatically makes the
> >      stuff usable in a guest once it is exposed.
> 
> If the CPUID bit or MISC_FEATURES is added, you don't even need the host
> side for the guests to use it.  It's only needed now because of the ugly
> MSR-based detection.
> 
> >   3) A proper way how to expose MSR_TEST_CTL to the guest, but surely not
> >      with extra split_lock_ctrl voodoo. It's an MSR nothing else. KVM/QEMU
> >      have standartized ways to deal with MSRs and the required selective
> >      bitwise access control.
> 
> That part is pretty much standard, I'm not worried about it.  We have
> one variable in struct kvm_vcpu_arch for each MSR (or set of MSRs) that
> we expose, so that's the split_lock_ctrl voodoo. :)
> 
> Once the detection is sorted out, KVM is easy.

That's what I thought and even if it was IceLeak then they still can flip a
CPUID/MISC FEATURE bit in their binary BIOS blob or ucode. We really need
to push back hard on these half baken features which need voodoo
programming to detect.

Thanks,

	tglx

  reply	other threads:[~2018-07-04 18:40 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-07-04 13:06 [PATCH v2] KVM: Expose the split lock detection feature to guest VM Jingqi Liu
2018-07-04 13:36 ` Paolo Bonzini
2018-07-04 14:51   ` Thomas Gleixner
2018-07-04 16:21     ` Paolo Bonzini
2018-07-04 18:39       ` Thomas Gleixner [this message]
2018-07-06  8:13   ` Liu, Jingqi
2018-07-04 23:07 ` kbuild test robot
2018-07-04 23:07 ` kbuild test robot

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=alpine.DEB.2.21.1807042035340.12092@nanos.tec.linutronix.de \
    --to=tglx@linutronix.de \
    --cc=hpa@zytor.com \
    --cc=jingqi.liu@intel.com \
    --cc=kvm@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@redhat.com \
    --cc=pbonzini@redhat.com \
    --cc=rkrcmar@redhat.com \
    --cc=robert.hu@linux.intel.com \
    --cc=wei.w.wang@intel.com \
    --cc=x86@kernel.org \
    /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).