From mboxrd@z Thu Jan 1 00:00:00 1970 From: Avi Kivity Subject: Re: performance specs on VT-x vmenter/exit Date: Thu, 06 Dec 2007 20:36:50 +0200 Message-ID: <47584142.10600@qumranet.com> References: Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Cc: kvm-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org To: Dan Return-path: In-Reply-To: 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 Dan wrote: > Greetings Honorable KVM Devs! > > I am doing research on the performance characteristics of the Intel > VMX instructions, specifically with respect to KVM. I need to count > the cycles for a VMENTER and VMEXIT instruction under various > conditions. (But getting it to work at all would be cool :) > > So the idea is to drop the cycle count in a register from the VMM, > force a VMENTER, drop the count in a different register, and force a > VMEXIT. Then get a last count and do appropriate adding/subtracting. > I'm working with a 2.6.22.6 vanilla kernel on an > Core2Duo with KVM-54. > > Questions: > Is there a better way to get these numbers? > If not, where in the KVM source should I aim to put these > instructions (file/line number/general area)? > Any tips on forcing a vmexit out of the guest immediately after the > count? > > Thank you so much for your time. > :dan Have a look at user/test/x86/vmexit.c, which does exactly that. -- Do not meddle in the internals of kernels, for they are subtle and quick to panic. ------------------------------------------------------------------------- SF.Net email is sponsored by: The Future of Linux Business White Paper from Novell. From the desktop to the data center, Linux is going mainstream. Let it simplify your IT future. http://altfarm.mediaplex.com/ad/ck/8857-50307-18918-4