From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jes Sorensen Subject: KVM PMU virtualization Date: Thu, 25 Feb 2010 16:04:28 +0100 Message-ID: <4B86917C.4070102@redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: Peter Zijlstra , Avi Kivity , Zachary Amsden , Gleb Natapov , Ingo Molnar , ming.m.lin@intel.com, "Zhang, Yanmin" To: KVM General Return-path: Received: from mx1.redhat.com ([209.132.183.28]:64580 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753492Ab0BYPFR (ORCPT ); Thu, 25 Feb 2010 10:05:17 -0500 Sender: kvm-owner@vger.kernel.org List-ID: Hi, It looks like several of us have been looking at how to use the PMU for virtualization. Rather than continuing to have discussions in smaller groups, I think it is a good idea we move it to the mailing lists to see what we can share and avoid duplicate efforts. There are really two separate things to handle: 1) Add support to perf to allow it to monitor a KVM guest from the host. 2) Allow guests access to the PMU (or an emulated PMU), making it possible to run perf on applications running within the guest. I know some of you have been looking at 1) and I am currently working on 2). I have been looking at various approaches, including whether it is feasible to share the PMU between the host and multiple guests. For now I am going to focus on allowing one guest to take control of the PMU, then later hopefully adding support for multiplexing it between multiple guests. Eventually we will see proper hardware PMU virtualization from Intel and AMD (admittedly I have only looked at the Intel specs so far), and by then be able to allow the host as well as the guests to share the PMU. If anybody else is working on this, I'd love to hear about it so we can coordinate our efforts. The main purpose with this mail was really to being the discussion to the mailing list to avoid duplicated efforts. Cheers, Jes PS: I'll be AFK all of next week, so it may take a few days for me to reply to follow-up discussions.