From mboxrd@z Thu Jan 1 00:00:00 1970 From: David Ahern Subject: Re: [PATCH v2 00/11] KVM in-guest performance monitoring Date: Mon, 13 Jun 2011 13:55:06 -0600 Message-ID: <4DF66B1A.6060606@cisco.com> References: <1307972106-2468-1-git-send-email-avi@redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Cc: Marcelo Tosatti , kvm@vger.kernel.org, Ingo Molnar , Peter Zijlstra , Arnaldo Carvalho de Melo To: Avi Kivity Return-path: Received: from sj-iport-3.cisco.com ([171.71.176.72]:37986 "EHLO sj-iport-3.cisco.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752080Ab1FMTzH (ORCPT ); Mon, 13 Jun 2011 15:55:07 -0400 In-Reply-To: <1307972106-2468-1-git-send-email-avi@redhat.com> Sender: kvm-owner@vger.kernel.org List-ID: On 06/13/2011 07:34 AM, Avi Kivity wrote: > This patchset exposes an emulated version 1 architectural performance > monitoring unit to KVM guests. The PMU is emulated using perf_events, > so the host kernel can multiplex host-wide, host-user, and the > guest on available resources. Any particular magic needed to try this patchset? Host and guest both 64-bit, Fedora 14. Kernel for both is your 'kvm.git next' with this patchset applied. Host: 2 x Intel(R) Xeon(R) CPU E5540 @ 2.53GHz qemu-kvm git as of May 9. Guest: tried '-cpu host' and without a -cpu arg (so qemu-kvm default). In both cases I get: [ 0.044999] CPU0: Intel(R) Xeon(R) CPU E5540 @ 2.53GHz stepping 05 [ 0.046996] Performance Events: unsupported p6 CPU model 26 no PMU driver, software events only. David > > Caveats: > - counters that have PMI (interrupt) enabled stop counting after the > interrupt is signalled. This is because we need one-shot samples > that keep counting, which perf doesn't support yet > - some combinations of INV and CMASK are not supported > - counters keep on counting in the host as well as the guest > > perf maintainers: please consider the first three patches for merging (the > first two make sense even without the rest). If you're familiar with the Intel > PMU, please review patch 5 as well - it effectively undoes all your work > of abstracting the PMU into perf_events by unabstracting perf_events into what > is hoped is a very similar PMU. > > v2: > - don't pass perf_event handler context to the callback; extract it via the > 'event' parameter instead > - RDPMC emulation and interception > - CR4.PCE emulation > -- > To unsubscribe from this list: send the line "unsubscribe kvm" in > the body of a message to majordomo@vger.kernel.org > More majordomo info at http://vger.kernel.org/majordomo-info.html >