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-users

RE: [Xen-users] A fundamental doubt.

To: "Anuj Bhatt" <anuj.bhatt@xxxxxxxxx>, xen-users@xxxxxxxxxxxxxxxxxxx
Subject: RE: [Xen-users] A fundamental doubt.
From: "Petersson, Mats" <Mats.Petersson@xxxxxxx>
Date: Thu, 5 Apr 2007 15:09:55 +0200
Delivery-date: Thu, 05 Apr 2007 06:09:05 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
In-reply-to: <1dd506600704050553o2386e6acra21a200418456eb4@xxxxxxxxxxxxxx>
List-help: <mailto:xen-users-request@lists.xensource.com?subject=help>
List-id: Xen user discussion <xen-users.lists.xensource.com>
List-post: <mailto:xen-users@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-users>, <mailto:xen-users-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-users>, <mailto:xen-users-request@lists.xensource.com?subject=unsubscribe>
Sender: xen-users-bounces@xxxxxxxxxxxxxxxxxxx
Thread-index: Acd3gXGhkYND3pNzSzino1cXDfvyZQAACqVA
Thread-topic: [Xen-users] A fundamental doubt.
 

> -----Original Message-----
> From: xen-users-bounces@xxxxxxxxxxxxxxxxxxx 
> [mailto:xen-users-bounces@xxxxxxxxxxxxxxxxxxx] On Behalf Of Anuj Bhatt
> Sent: 05 April 2007 13:53
> To: xen-users@xxxxxxxxxxxxxxxxxxx
> Subject: [Xen-users] A fundamental doubt.
> 
> Hi,
> 
> I read an article on the ring architecture of Xen which is based on
> the protection ring architecture of x86. It said that the host kernel
> as well as the guest xenified kernels run in ring1 and xen on ring0.
> Since xen is in ring0 and hypercalls are basically calls made from
> user space to kernel space(in this case ring1) how does one block
> calls from reaching to dom0 from an event that has occurred from domU?

No, hypercalls are "kernel-mode to hypervisor", so from Ring1 to Ring0,
and Xen knows which guest is which - Dom0 isn't any different from any
other guest other than having a special flag to say "I'm Dom0"
(Actually, the flag says "I'm privileged", but it amounts to the same
thing at the moment). This is comparable to a "regular" user (DomU) and
the "root" user (Dom0) in any Unix. The OS only sees a difference
between root and regular users in special cases where the root user is
allowed to do certain things that regular users would be prevented from
doing (such as killing a process that the user isn't owner of - root can
do this, but a regular user can only kill owned processes). Similarly,
Dom0 can do things like create/destroy domains, but DomU can't. 

To explain a bit further about hypercalls - generally, hypercalls are
part of system calls, for example, if a system call allocates 1MB of
memory, a hypercall would be used to write the 256 page-table entries
into the page-table [this is an example, it may actually not work
exactly that way - but it gives an idea of how hypercalls are used]. 

It is not possible for user-mode applications to perform hypercalls
directly - they have to be done in kernel-space.

> Is this done by the event channel which is monitored?

Event channels are used to communicate between domains, such as Dom0
telling DomU that the disk-read it just asked for is completed, or from
DomU to Dom0 to say "I've got another disk operation I would like you to
perform". 

[And to be more technical about things, only 32-bit Xen uses Ring1 for
kernel-space. In 64-bit mode, the kernel uses Ring3, but it has a
different page-table mapping so that user-mode apps can't access the
kernel spac]. 

--
Mats
> 
> Have I got my facts right?
> 
> Thanks a ton.
> 
> Regards,
> Anuj Bhatt.
> 
> _______________________________________________
> Xen-users mailing list
> Xen-users@xxxxxxxxxxxxxxxxxxx
> http://lists.xensource.com/xen-users
> 
> 
> 



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

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