From: Daniel Stodden Subject: Re: Hypercall Date: Wed, 09 Apr 2008 19:25:18 +0200 Message-ID: <1207761918.13737.64.camel@thinkpad.localdomain> References: <47FC81E2.603@tiscali.it> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Return-path: In-Reply-To: <47FC81E2.603@tiscali.it> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: Carlo Bertoldi Cc: xen-devel List-Id: xen-devel@lists.xenproject.org On Wed, 2008-04-09 at 10:44 +0200, Carlo Bertoldi wrote: > Hi, > I'd like to do some operation every time an hypercall is issued in a=20 > domU kernel. I started modifying=20 > include/asm-i386/mach-xen/asm/hypercall.h but I don't think it's such a= =20 > great idea, so I think that, as a last chance, I'll have to substitute=20 > all of the hypercall function call with some wrapper function of my own= . > Can anyone tell me if there's a cleaner approach? It'll take some assembly. All hypercalls enter the VMM through the same trap handler in arch//entry.S (e.g. syscall_enter on x86_64). A good point to catch these entries would be somewhere shortly after the SAVE_ALL macro. Note that you'll have to carefully restore register arguments clobbered after return [depending on individual calling conventions]. Mail me if you get stuck with that. kind regards, Daniel --=20 Daniel Stodden LRR - Lehrstuhl f=C3=BCr Rechnertechnik und Rechnerorganisation Institut f=C3=BCr Informatik der TU M=C3=BCnchen D-85748 Garc= hing http://www.lrr.in.tum.de/~stodden mailto:stodden@cs.tum.edu PGP Fingerprint: F5A4 1575 4C56 E26A 0B33 3D80 457E 82AE B0D8 735B