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/
Home Products Support Community News


Re: [Xen-devel] Hypercall

To: Carlo Bertoldi <mcbain@xxxxxxxxxx>
Subject: Re: [Xen-devel] Hypercall
From: Daniel Stodden <stodden@xxxxxxxxxx>
Date: Wed, 09 Apr 2008 19:25:18 +0200
Cc: xen-devel <xen-devel@xxxxxxxxxxxxxxxxxxx>
Delivery-date: Wed, 09 Apr 2008 10:25:40 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
In-reply-to: <47FC81E2.603@xxxxxxxxxx>
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/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
Organization: Fakultät für Informatik I10, Technische Universität München
References: <47FC81E2.603@xxxxxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
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 
> domU kernel. I started modifying 
> include/asm-i386/mach-xen/asm/hypercall.h but I don't think it's such a 
> great idea, so I think that, as a last chance, I'll have to substitute 
> 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 Stodden
LRR     -      Lehrstuhl für Rechnertechnik und Rechnerorganisation
Institut für Informatik der TU München             D-85748 Garching
http://www.lrr.in.tum.de/~stodden         mailto:stodden@xxxxxxxxxx
PGP Fingerprint: F5A4 1575 4C56 E26A 0B33  3D80 457E 82AE B0D8 735B

Xen-devel mailing list

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