From mboxrd@z Thu Jan 1 00:00:00 1970 From: Andi Kleen Subject: Re: Performance monitoring units and KVM Date: Thu, 31 Jan 2008 04:12:32 +0100 Message-ID: <20080131031232.GB27115@one.firstfloor.org> References: <87wsprxmyb.fsf@pike.pond.sub.org> <47A0BE8F.4090508@qumranet.com> <200801310044.11055.balajirrao@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Cc: kvm-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org, markus.armbruster-5C7GfCeVMHo@public.gmane.org, Andi Kleen , avi-atKUWr5tajBWk0Htik3J/w@public.gmane.org To: Balaji Rao Return-path: Content-Disposition: inline In-Reply-To: <200801310044.11055.balajirrao-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: kvm-devel-bounces-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org Errors-To: kvm-devel-bounces-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org List-Id: kvm.vger.kernel.org On Thu, Jan 31, 2008 at 12:44:10AM +0530, Balaji Rao wrote: > On Wednesday 30 January 2008 11:56:25 pm Andi Kleen wrote: > > There is no really an architectural PMU if you consider > > boxes beyond relatively new Intel CPUs (which got one) > > > But since kvm runs only on such CPUs, it should not really be a problem in > migrating between various Intel models at least. I'm not 100% sure, but I think there are P4 based (Family 15) CPUs which have VT but not ArchPerfMon. AFAIK ArchPerfMon is only in Family 6 CPUs. Family 15 has a completely different PerfMon interface. > > But on the other hand in my experience most PMU users use > > relatively simple few counters (e.g. 90+% likely the local > > variant of CPU_CYCLES_NONHALTED) so it would be in theory > > possible to translate those by traps from a different CPU's > > format in the monitor into the local MSR. > > > > The only trouble is that is no architectural way to tell > > the guest "i support only counter X Y Z" and also no > > nice way to reject a particular counter except for just > > not ticking. > Can't this be exported through CPUID ? Sure it could, but that would be a new interface. If you were free to define a new interface you could also just go completely hypercall based. -Andi ------------------------------------------------------------------------- This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2008. http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/