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] Hypercall privilege check

To: xen-devel@xxxxxxxxxxxxxxxxxxx
Subject: Re: [Xen-devel] Hypercall privilege check
From: Mark Williamson <mark.williamson@xxxxxxxxxxxx>
Date: Fri, 29 Jun 2007 00:07:05 +0100
Cc: "Steven Y. Ko" <sko@xxxxxxxxxxx>
Delivery-date: Thu, 28 Jun 2007 16:05:03 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
In-reply-to: <5fa100fd0706281554s4bd36ae1l936e92b8ec8ce280@xxxxxxxxxxxxxx>
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>
References: <5fa100fd0706281554s4bd36ae1l936e92b8ec8ce280@xxxxxxxxxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
User-agent: KMail/1.9.6
> I'm wondering where Xen actually checks whether a hypercall is made
> from ring 1 or ring 3. Could anyone point me out to the code? Any
> pointer would be much appreciated. Thanks!

Hypercalls are made from ring 1.  The userspace tools do make hypercalls 
sometimes, but they do it by calling a special kernel driver, which then does 
the actual hypercall.  *actually* what that does is to jump into the 
hypercall transfer page at the right location.  This page contains the actual 
implementation of the hypercall (using this indirection allows future 
versions of Xen to supply different implementations of the calls, if 
appropriate).

Take a look at:
drivers/xen/privcmd/privcmd.c  in the XenLinux tree.  This is used by the dom0 
tools to do control plane operations.

Also, take a look at: include/asm-i386/mach-xen/asm/hypercall.h which contains 
implementations of some other hypercalls.

HTH,
Cheers,
mark

-- 
Dave: Just a question. What use is a unicyle with no seat?  And no pedals!
Mark: To answer a question with a question: What use is a skateboard?
Dave: Skateboards have wheels.
Mark: My wheel has a wheel!

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