From mboxrd@z Thu Jan 1 00:00:00 1970 From: Ingo Molnar Subject: Re: KVM PMU virtualization Date: Fri, 26 Feb 2010 09:42:41 +0100 Message-ID: <20100226084241.GF15885@elte.hu> References: <4B86917C.4070102@redhat.com> <20100225173423.GB4246@8bytes.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: Jes Sorensen , KVM General , Peter Zijlstra , Avi Kivity , Zachary Amsden , Gleb Natapov , ming.m.lin@intel.com, "Zhang, Yanmin" , Peter Zijlstra , Thomas Gleixner , "H. Peter Anvin" , Arjan van de Ven , Fr??d??ric Weisbecker , Arnaldo Carvalho de Melo To: Joerg Roedel Return-path: Received: from mx3.mail.elte.hu ([157.181.1.138]:54224 "EHLO mx3.mail.elte.hu" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S935550Ab0BZInV (ORCPT ); Fri, 26 Feb 2010 03:43:21 -0500 Content-Disposition: inline In-Reply-To: <20100225173423.GB4246@8bytes.org> Sender: kvm-owner@vger.kernel.org List-ID: * Joerg Roedel wrote: > I personally don't like a self-defined event-set as the only solution > because that would probably only work with linux and perf. [...] The 'soft-PMU' i suggested is transparent on the guest side - if you want to enable non-Linux and legacy-Linux. It's basically a PMU interface provided to the guest by catching the right MSR accesses, implemented via perf_event_create_kernel_counter()/etc. on the host side. Note that the 'soft PMU' still sucks from a design POV as there's no generic hw interface to the PMU. So there would have to be a 'soft AMD' and a 'soft Intel' PMU driver at minimum. Far cleaner would be to expose it via hypercalls to guest OSs that are interested in instrumentation. That way it could also transparently integrate with tracing, probes, etc. It would also be wiser to first concentrate on improving Linux<->Linux guest/host combos before gutting the design just to fit Windows into the picture ... Ingo