From: "Jan Beulich" Subject: Re: [PATCH v10 09/20] x86/VPMU: Add public xenpmu.h Date: Mon, 15 Sep 2014 14:06:38 +0100 Message-ID: <5417007E0200007800034FAB@mail.emea.novell.com> References: <54115FCA0200007800033A6C@mail.emea.novell.com> <5411A97C.7090100@oracle.com> <5411D40F0200007800033FDA@mail.emea.novell.com> <5411BF12.6090600@oracle.com> <5411E2F502000078000340BA@mail.emea.novell.com> <5411D31B.90403@oracle.com> <5412B3DE02000078000344A0@mail.emea.novell.com> <54130169.9000006@oracle.com> <5413219402000078000348D8@mail.emea.novell.com> <54130ED8.1000707@oracle.com> <20140915115635.GA4831@laptop.dumpdata.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <20140915115635.GA4831@laptop.dumpdata.com> Content-Disposition: inline List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Konrad Rzeszutek Wilk Cc: tim@xen.org, kevin.tian@intel.com, keir@xen.org, suravee.suthikulpanit@amd.com, andrew.cooper3@citrix.com, eddie.dong@intel.com, xen-devel@lists.xen.org, Aravind.Gopalakrishnan@amd.com, jun.nakajima@intel.com, Boris Ostrovsky List-Id: xen-devel@lists.xenproject.org >>> On 15.09.14 at 13:56, wrote: > 5). Exposing only CS, RIP, and EFLAGS seems to be tailoring the > interface for Linux perf use case. > > 6). Exposing all of the GPRs, while not needed for the current > set of Linux patches, could allow other tools to use this > (Intel's tracing tool for example - which uses the perf > ABI). But surely there are tools on FreeBSD, NetBSD that > do profiling. > > > If I understand Jan's concerns correctly, the question is - > if we are not using all of the GPRs right now in the tools > why even bother expanding it? And if the new version of > the architecture does expose it - and we have the support > - then we can expand the page structure? (and of course > rev the major). > > While Boris's view is that the condition above will happen - > we will expand the registers/use case - so why do the > intermediate step of expanding the page structure - when we can > make the structure bigger now (and rev the minor). > > Is that about right? Not exactly, at least as far as my part is concerned: My main problem is doing a middle thing here: Expose more than the minimum amount of information, but also not the complete picture. As said in replies to Boris before (in different words) - there's nothing making %r13 any more important than %xmm5. And since exposing complete state seems overkill at this point, doing the minimum set looks like the only reasonable _and_ consistent thing to me right now. Of course, if the interface was changed such that rather than exposing struct cpu_user_regs it would expose an enumerable register set (with a way to add any current or future register without needing to change the ABI, i.e. conceptually similar to how the counters get exposed), then I would not see initially exposing an arbitrary subset as a problem. Jan