From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jes Sorensen Subject: Re: KVM PMU virtualization Date: Fri, 26 Feb 2010 12:01:58 +0100 Message-ID: <4B87AA26.7050908@redhat.com> References: <4B86917C.4070102@redhat.com> <20100225173423.GB4246@8bytes.org> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: KVM General , Peter Zijlstra , Avi Kivity , Zachary Amsden , Gleb Natapov , Ingo Molnar , ming.m.lin@intel.com, "Zhang, Yanmin" To: Joerg Roedel Return-path: Received: from mx1.redhat.com ([209.132.183.28]:7750 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S934028Ab0BZLFA (ORCPT ); Fri, 26 Feb 2010 06:05:00 -0500 In-Reply-To: <20100225173423.GB4246@8bytes.org> Sender: kvm-owner@vger.kernel.org List-ID: On 02/25/10 18:34, Joerg Roedel wrote: > The biggest problem I see here is teaching the guest about the available > events. The available event sets are dependent on the processor family > (at least on AMD). > A simple approach would be shadowing the perf msrs which is a simple > thing to do. More problematic is the reinjection of performance > interrupts and performance nmis. IMHO the only real solution here is to map it to the host CPU, and require -cpu host for PMU support. There is no point in trying to emulate PMU features which we don't have in the hardware. Ie. you cannot count cache misses if the hardware doesn't support it. Cheers, Jes