From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail.linutronix.de (146.0.238.70:993) by crypto-ml.lab.linutronix.de with IMAP4-SSL for ; 08 Feb 2019 09:07:40 -0000 Received: from bombadil.infradead.org ([2607:7c80:54:e::133]) by Galois.linutronix.de with esmtps (TLS1.2:RSA_AES_256_CBC_SHA256:256) (Exim 4.80) (envelope-from ) id 1gs28I-0005ge-TM for speck@linutronix.de; Fri, 08 Feb 2019 10:07:39 +0100 Received: from j217100.upc-j.chello.nl ([24.132.217.100] helo=hirez.programming.kicks-ass.net) by bombadil.infradead.org with esmtpsa (Exim 4.90_1 #2 (Red Hat Linux)) id 1gs28H-0006ZL-8M for speck@linutronix.de; Fri, 08 Feb 2019 09:07:37 +0000 Date: Fri, 8 Feb 2019 10:07:34 +0100 From: Peter Zijlstra Subject: [MODERATED] Re: [PATCH v3 6/6] PERFv3 Message-ID: <20190208090734.GM32477@hirez.programming.kicks-ass.net> References: <8fb4335a313a71913ae398f3cc1dcd86306553b7.1549582769.git.ak@linux.intel.com> MIME-Version: 1.0 In-Reply-To: <8fb4335a313a71913ae398f3cc1dcd86306553b7.1549582769.git.ak@linux.intel.com> Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit To: speck@linutronix.de List-ID: On Thu, Feb 07, 2019 at 03:41:08PM -0800, speck for Andi Kleen wrote: > From: Andi Kleen > Subject: kvm: vmx: Support TSX_FORCE_ABORT in KVM guests > > Recent microcode for Skylake added a new CPUID bit and MSR to control > TSX aborting and enabling PMU counter 3. This patch adds support > for controlling counter 3 from KVM guests. > > Intercept the MSR and set the correct attribute on the perf events > used by the virtualized PMU. TSX is only disabled when counter > 3 is actually used by the host PMU. The guest can use all four > counters without multiplexing. > > Also export the CPUID bit. > > Signed-off-by: Andi Kleen I would really rather not do this at all. Keep this walnut crap as small as possible. The more code you generate, the more we need to maintain. And very soon nobody will give a crap about this weird bug anymore, but we're stuck with all this junk. Also; apparently the virt people themselves already said not to expose this, so why do you persist.