WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-devel

Re: [Xen-devel] Last Branch Record (LBR) in Xen

To: Jan Beulich <JBeulich@xxxxxxxxxx>
Subject: Re: [Xen-devel] Last Branch Record (LBR) in Xen
From: Abhinav Srivastava <abhinavs_iitkgp@xxxxxxxxxxx>
Date: Fri, 26 Jun 2009 19:20:50 +0530 (IST)
Cc: xen-devel@xxxxxxxxxxxxxxxxxxx
Delivery-date: Fri, 26 Jun 2009 06:52:46 -0700
Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.co.in; s=s1024; t=1246024251; bh=6H6S56Ody4HAB7Y+xMwQGoXX5v5DEm05KMAfhquXUsM=; h=Message-ID:X-YMail-OSG:Received:X-Mailer:Date:From:Subject:To:Cc:MIME-Version:Content-Type:Content-Transfer-Encoding; b=r3zMEvlZBhtnmAKGS5I8sV5kb6owxnvZ/J2LwS3QA5UVIPPYn4W+RrAgdHPfHe+s6GzeLufnLUs6DXiKpsKuVPMOXrr8oKobYBRq0oMFP9/gzpL36apUtDOMguB+1A2fx7MM2PMnfzLQstCGyejYwtEciaT8GNck3kPm1/Ij24M=
Domainkey-signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.co.in; h=Message-ID:X-YMail-OSG:Received:X-Mailer:Date:From:Subject:To:Cc:MIME-Version:Content-Type:Content-Transfer-Encoding; b=CbzV7W1Tod4GtHggWWjQs72fQSCTIdol2xfvQdGy8dwPetE4hOtn3ftAQlX9Ien7hu7ratPHVDAflifoDXsOj+/zdKwwcgwaCpAQ8iyDB+TzVIDeiwzCrKqTBZHOm4bXoqVIhcEIZH8n/nNGorJq68L18Vn0L1Z698Q4xydD/zM=;
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx

Hi Jan,

Thanks for your reply. I am referring to the second patch (however, could you 
please confirm and point to me to the right patch).

As far as I understand (please correct me if I am wrong), you meant that HVM 
guests have to enable the LBR recording, and this action cannot be 
initiated/controlled by Xen. I was thinking like other kind of actions, such as 
single stepping on instruction, single stepping on branch etc. that can be 
controlled from the hypervisor and guests behave accordingly, the LBR feature 
can also be set/reset from the hypervisor. And, if that is not the case then I 
think any malicious programs can turn off this feature inside HVM guests and 
can bypass the debugger. Moreover, I assumed anything that a guest can do, can 
also be done from the hypervisor by setting guest MSR registers or bitmap from 
the hypervisor.

However, if that is the case that you described and LBR recording cannot be 
enable Xen then could you please give me some idea what things need to be done 
from HVM guests side to enable this feature?


Thanks,
Abhinav


--- On Fri, 26/6/09, Jan Beulich <JBeulich@xxxxxxxxxx> wrote:

> From: Jan Beulich <JBeulich@xxxxxxxxxx>
> Subject: Re: [Xen-devel] Last Branch Record (LBR) in Xen
> To: "Abhinav Srivastava" <abhinavs_iitkgp@xxxxxxxxxxx>
> Cc: xen-devel@xxxxxxxxxxxxxxxxxxx
> Date: Friday, 26 June, 2009, 1:11 PM
> >>> Abhinav Srivastava
> <abhinavs_iitkgp@xxxxxxxxxxx>
> 25.06.09 18:57 >>>
> >I am trying to achieve Last Branch Recording (LBR)
> functionality on Intel Core 2 Quad processor from Xen
> hypervisor. However, I
> >could not get it working. I am using Xen-3.2.2 (which I
> agree is a bit old, however, there is not much change in the
> code related to
> >this functionality in Xen-3.4).
> >
> >I looked into the patch provided by Keir and Jan
> Beulich, and still I did not understand how to make it work.
> I got some success in
> >creating single step on branch feature by setting bit 1
> of GUEST_DEBUGCTL_MSR register. However, when I am trying to
> achieve
> >LBR functionality (which requires reading
> LASTBRANCH_TO_IP and LASTBRANC_FROM_IP registers too), it is
> not working.
> 
> Not sure what you actually want to do: There are two
> possible patches you might be talking about: One was simply
> to add (command line triggerable) support for printing out
> LBR values during register dumps (i.e. in particular when
> Xen crashes - which it will never do ;-) ). The other was to
> allow HVM guests to enable LBR recording on their own.
> 
> >I must admit that by looking into the patch I got
> little bit confused. It would be really good if someone
> could tell me what are the
> >steps required in the hypervisor to enable this
> feature. Since I want to control this feature from the
> hypervisor without doing
> >anything inside guest, how should I approach to this
> problem.
> 
> If you refer to the second of the described patches, the
> guest has to do action on it own.
> 
> Jan
> 
> 
> _______________________________________________
> Xen-devel mailing list
> Xen-devel@xxxxxxxxxxxxxxxxxxx
> http://lists.xensource.com/xen-devel
> 


      Cricket on your mind? Visit the ultimate cricket website. Enter 
http://cricket.yahoo.com

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel

<Prev in Thread] Current Thread [Next in Thread>