Return-Path: Received: from mail.linutronix.de (146.0.238.70:993) by crypto-ml.lab.linutronix.de with IMAP4-SSL for ; 07 Feb 2019 17:01:04 -0000 Received: from merlin.infradead.org ([2001:8b0:10b:1231::1]) by Galois.linutronix.de with esmtps (TLS1.2:RSA_AES_256_CBC_SHA256:256) (Exim 4.80) (envelope-from ) id 1grn2t-0007tx-Bs for speck@linutronix.de; Thu, 07 Feb 2019 18:01:03 +0100 Received: from j217100.upc-j.chello.nl ([24.132.217.100] helo=hirez.programming.kicks-ass.net) by merlin.infradead.org with esmtpsa (Exim 4.90_1 #2 (Red Hat Linux)) id 1grn2r-00061p-8k for speck@linutronix.de; Thu, 07 Feb 2019 17:01:01 +0000 Date: Thu, 7 Feb 2019 18:00:59 +0100 From: Peter Zijlstra Subject: [MODERATED] Re: [PATCH v2 0/8] PERFv2 Message-ID: <20190207170059.GD32511@hirez.programming.kicks-ass.net> References: <20190207132709.GA32477@hirez.programming.kicks-ass.net> <20190207143759.GP31598@tassilo.jf.intel.com> <20190207153728.GE32477@hirez.programming.kicks-ass.net> <2875fb7c-1354-c401-a7e5-6cb2cb02b40c@citrix.com> MIME-Version: 1.0 In-Reply-To: <2875fb7c-1354-c401-a7e5-6cb2cb02b40c@citrix.com> Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable To: speck@linutronix.de List-ID: On Thu, Feb 07, 2019 at 04:35:12PM +0000, speck for Andrew Cooper wrote: > On 07/02/2019 15:37, speck for Peter Zijlstra wrote: > > On Thu, Feb 07, 2019 at 06:37:59AM -0800, speck for Andi Kleen wrote: > > > >> Okay I see you rely on it being guarded by the global, but for virtualiz= ation > >> support will need the copy. > >> > >> Would need a copy at least. > > I've not thought abou virt yet; do we _have_ to expose the thing to > > guests? >=20 > Virt has been discussed at length. >=20 > This feature and MSR are not architectural, and not expected to exist on > future hardware with a silicon fix for the issue (CascadeLake B1 > stepping and later, IIRC). >=20 > By exposing the features to guests, you automatically limit their > migrateability to a subset of the Skylake uarch processors. >=20 > For Xen, I've just gone with a boot time global flag.=C2=A0 PMU deliberately > isn't available to guests in general, but developers wanting to do > profiling/other can trivially flip the default. Is that a per-guest or per-hv setting? My current patch does per-hv, but I suppose it would not be too hard to make that per-guest. The only question is where/how does the guest communicate this desire.