From: "pallavi jk" Subject: Re: vcpu_info Date: Fri, 10 Oct 2008 23:29:05 +0530 Message-ID: References: <48EF8579.4040201@goop.org> <48EF904E.6070004@goop.org> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============1762346391==" Return-path: In-Reply-To: <48EF904E.6070004@goop.org> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: Jeremy Fitzhardinge Cc: George Dunlap , xen-devel@lists.xensource.com List-Id: xen-devel@lists.xenproject.org --===============1762346391== Content-Type: multipart/alternative; boundary="----=_Part_88580_3643573.1223661545609" ------=_Part_88580_3643573.1223661545609 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline Thanx a lot Jeremy!! This is really going to be a lot of help. Right now I am not very sure whether I will be able to use a 64-bit machine, but I will consider that options. Thanx again for the help. On Fri, Oct 10, 2008 at 10:56 PM, Jeremy Fitzhardinge wrote: > pallavi jk wrote: > >> Hi Jeremy, >> >> Yes, I am planning to modify xen and the guest OS as well. >> >> I need to trap every entry into the guest OS from user mode because I need >> to perform some checks in the hypervisor before transferring control to the >> guest OS. >> > > If you run a 64-bit hypervisor, this will happen automatically. Only > 32-on-32 supports directly trapping from guest usermode to kernel. > > So I need to avoid fast handlers which would directly transfer control to >> the guest OS, as I want to trap this entry first in the hypervisor. I need >> to do this as I intend to protect applications from a possibly malicious OS, >> so I want to perform some checks in the hypervisor. >> >> I have just started studying the code. Can you please provide me >> guidelines about which source files and functions I should concentrate on? >> > > arch/x86/**/traps.c is the first point to look at. Also entry.S which does > the actual transfer of control between the various modes. There are several > variants of each file for different modes (32, 64, 32 compat on 64), so make > sure you target the right ones. > > J > ------=_Part_88580_3643573.1223661545609 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline
Thanx a lot Jeremy!!

This is really going to be a lot of help.

Right now I am not very sure whether I will be able to use a 64-bit machine, but I will consider that options.
Thanx again for the help.   

On Fri, Oct 10, 2008 at 10:56 PM, Jeremy Fitzhardinge <jeremy@goop.org> wrote:
pallavi jk wrote:
Hi Jeremy,

Yes, I am planning to modify xen and the guest OS as well.

I need to trap every entry into the guest OS from user mode because I need to perform some checks in the hypervisor before transferring control to the guest OS.

If you run a 64-bit hypervisor, this will happen automatically.  Only 32-on-32 supports directly trapping from guest usermode to kernel.


So I need to avoid fast handlers which would directly transfer control to the guest OS, as I want to trap this entry first in the hypervisor. I need to do this as I intend to protect applications from a possibly malicious OS, so I want to perform some checks in the hypervisor.

I have just started studying the code. Can you please provide me guidelines about which source files and functions I should concentrate on?

arch/x86/**/traps.c is the first point to look at. Also entry.S which does the actual transfer of control between the various modes.  There are several variants of each file for different modes (32, 64, 32 compat on 64), so make sure you target the right ones.

  J

------=_Part_88580_3643573.1223661545609-- --===============1762346391== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel --===============1762346391==--