From mboxrd@z Thu Jan 1 00:00:00 1970 From: Avi Kivity Subject: Re: How to monitoring segment registers? Date: Sat, 14 Nov 2009 15:29:32 +0200 Message-ID: <4AFEB0BC.202@redhat.com> References: Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Cc: kvm@vger.kernel.org To: Jun Koi Return-path: Received: from mx1.redhat.com ([209.132.183.28]:59800 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752222AbZKNN3a (ORCPT ); Sat, 14 Nov 2009 08:29:30 -0500 In-Reply-To: Sender: kvm-owner@vger.kernel.org List-ID: On 11/11/2009 06:19 PM, Jun Koi wrote: > Hi, > > I am doing some profiling for a guest VM on KVM. One of things I want > to do is to monitor the activities of SS register. > > Specifically, I want to be notified whenever guest's SS changes its > value (like when OS switches from userspace stack to kernel stack). > > I imagine that I need to reprogram VMCS, so I can get VMEXIT anytime > SS changes its value. > Is that feasible? If so, which code should I look at in kvm code? > Virtualization extensions don't allow trapping on segment register changes. I recommend modifying qemu/tcg instead. -- Do not meddle in the internals of kernels, for they are subtle and quick to panic.