From: Ingo Molnar Subject: Re: [PATCH v1 5/5] KVM: Expose a version 1 architectural PMU to guests Date: Tue, 17 May 2011 21:41:17 +0200 Message-ID: <20110517194117.GA26184@elte.hu> References: <1305129333-7456-1-git-send-email-avi@redhat.com> <1305129333-7456-6-git-send-email-avi@redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: linux-kernel@vger.kernel.org, kvm@vger.kernel.org, Peter Zijlstra , Arnaldo Carvalho de Melo To: Avi Kivity Return-path: Content-Disposition: inline In-Reply-To: <1305129333-7456-6-git-send-email-avi@redhat.com> Sender: linux-kernel-owner@vger.kernel.org List-Id: kvm.vger.kernel.org * Avi Kivity wrote: > 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 Hm, do you need more than perf_event::event_limit, or something special? > - some combinations of INV and CMASK are not supported Could you please describe this better, where does this limit come from? If perf then this needs fixing. > - counters keep on counting in the host as well as the guest I suspect fixing this either needs a hw filter feature, or the ability to disable/enable these events across VM exits/entries. I would imagine the disable/enable to be rather expensive so hw help would be preferred ... I didnt see anything objectionable in your patches, but i'd like to have Peter's Acked-by as well before we go forward. I think that in the long run having a virtio-perf gateway would allow us a lot more tricks than just arch-perfmon emulation: - we could do things like propagate guest side traces over to the host - we could control from the host which events we measure on the guest side - etc. How would you like to handle the flow of patches - should we merge #1,#2,#3 in perf/core and you'd then merge #4,#5 via the KVM tree once the first bits hit upstream? We could also set up a separate branch for these three commits, which you could pull - this would allow all this to still hit .40. Thanks, Ingo