Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1671847

Re: [PATCH RFC] KVM: VMX: drop vmm_exclusive module parameter

Path csiph.com!news.redatomik.org!aioe.org!bofh.it!news.nic.it!robomod
From Arnaldo Carvalho de Melo <acme@kernel.org>
Newsgroups linux.kernel
Subject Re: [PATCH RFC] KVM: VMX: drop vmm_exclusive module parameter
Date Wed, 21 Jun 2017 19:50:01 +0200
Message-ID <tURVn-Rb-5@gated-at.bofh.it> (permalink)
References <tjrdw-3oE-31@gated-at.bofh.it>
Dmarc-Filter OpenDMARC Filter v1.3.2 mail.kernel.org 5F97D2187B
Authentication-Results mail.kernel.org; dmarc=none (p=none dis=none) header.from=kernel.org
Authentication-Results mail.kernel.org; spf=none smtp.mailfrom=acme@kernel.org
MIME-Version 1.0
Content-Type text/plain; charset=us-ascii
Content-Disposition inline
X-URL http://acmel.wordpress.com
User-Agent Mutt/1.8.0 (2017-02-23)
Sender robomod@news.nic.it
List-ID <linux-kernel.vger.kernel.org>
X-Mailing-List linux-kernel@vger.kernel.org
Approved robomod@news.nic.it
Lines 35
Organization linux.* mail to news gateway
X-Original-Cc kvm@vger.kernel.org, Paolo Bonzini <pbonzini@redhat.com>, rkrcmar@redhat.com, dvyukov@google.com, Alexander Shishkin <alexander.shishkin@linux.intel.com>, linux-kernel@vger.kernel.org
X-Original-Date Wed, 21 Jun 2017 14:48:22 -0300
X-Original-Message-ID <20170621174822.GR13640@kernel.org>
X-Original-References <20170310114713.7571-1-david@redhat.com>
X-Original-Sender linux-kernel-owner@vger.kernel.org
Xref csiph.com linux.kernel:1671847

Show key headers only | View raw


Em Fri, Mar 10, 2017 at 12:47:13PM +0100, David Hildenbrand escreveu:
> vmm_exclusive=0 leads to KVM setting X86_CR4_VMXE always and calling
> VMXON only when the vcpu is loaded. X86_CR4_VMXE is used as an
> indication in cpu_emergency_vmxoff() (called on kdump) if VMXOFF has to be
> called. This is obviously not the case if both are used independtly.
> Calling VMXOFF without a previous VMXON will result in an exception.
> 
> In addition, X86_CR4_VMXE is used as a mean to test if VMX is already in
> use by another VMM in hardware_enable(). So there can't really be
> co-existance. If the other VMM is prepared for co-existance and does a
> similar check, only one VMM can exist. If the other VMM is not prepared
> and blindly sets/clears X86_CR4_VMXE, we will get inconsistencies with
> X86_CR4_VMXE.
> 
> As we also had bug reports related to clearing of vmcs with vmm_exclusive=0
> this seems to be pretty much untested. So let's better drop it.
> 
> While at it, directly move setting/clearing X86_CR4_VMXE into
> kvm_cpu_vmxon/off.

Oh well, I was using, as suggested by Alexander, this parameter to be
able to use Intel PT on the host on a Broadwell machine, i.e.:

  perf record -e intel_pt// usleep 1
  perf script

would show decoded Intel PT records, no more :-\ But I'm clueless about
KVM internals, so just reporting the change in behaviour for this very
specific use case.

Now I don't know if this is something that would make Intel PT be usable
on Broadwell machines but wouldn't be required with newer chips, will
test with a Kaby Lake i5 7500 when back at my home office...

- Arnaldo

Back to linux.kernel | Previous | NextNext in thread | Find similar | Unroll thread


Thread

Re: [PATCH RFC] KVM: VMX: drop vmm_exclusive module parameter Arnaldo Carvalho de Melo <acme@kernel.org> - 2017-06-21 19:50 +0200
  Re: [PATCH RFC] KVM: VMX: drop vmm_exclusive module parameter Radim Krčmář <rkrcmar@redhat.com> - 2017-06-21 20:30 +0200

csiph-web