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] Where do System calls go?

To: <helicoterus-elih@xxxxxxxx>, "xen list" <xen-users@xxxxxxxxxxxxxxxxxxx>
Subject: RE: [Xen-users] Where do System calls go?
From: "Amit Dang" <amitd@xxxxxxxxxxxxx>
Date: Thu, 30 Apr 2009 22:55:38 -0700
Cc:
Delivery-date: Thu, 30 Apr 2009 22:56:32 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <654084.85722.qm@xxxxxxxxxxxxxxxxxxxxxxxxxxx>
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/mailman/listinfo/xen-users>, <mailto:xen-users-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-users>, <mailto:xen-users-request@lists.xensource.com?subject=unsubscribe>
Sender: xen-users-bounces@xxxxxxxxxxxxxxxxxxx
Thread-index: AcnJsUboUWYqnWAwRo6zYHVFjijT6QAb+Vqw
Thread-topic: [Xen-users] Where do System calls go?

-----Original Message-----
From: xen-users-bounces@xxxxxxxxxxxxxxxxxxx
[mailto:xen-users-bounces@xxxxxxxxxxxxxxxxxxx] On Behalf Of
helicoterus-elih@xxxxxxxx
Sent: Thursday, April 30, 2009 8:18 PM
To: xen list
Subject: [Xen-users] Where do System calls go?


I have a doubt about system calls on paravirtualized Xen environment
(without virtualization extensions).
When a program on a domU invokes a sys call, this arrives to its kernel
(on ring 3) and then it is send to VMM (on ring 0) or system call goes
directly to VMM?
Normally a system call goes to its O.S. libc and then a handler on
kernel carries it on.
I do not understand what is the problem of sys call.

Thank you.


* In case of a Para virtualized Xen environment OS (kernel) runs at ring
1 and applications (user space) runs at ring 3 (Intel x86 only not true
for AMD).
* When ever a system call is invoked via interrupt or sysenter control
gets
transferred to the kernel (ring 0), which is then handled via system
call handler. System call never goes to libc but Libc is a library that
provides POSIX interface to the user space applications and in a way
wrapper for invocation of a system call.
* System call interrupt based [i386]: During booting process, linux
kernel of a domU register's its IDT with Xen Hypervisor via
HYPERVISOR_set_trap_table(trap_table); [arch/i386/kernel/traps-xen.c].
Xen maintains two IDT's, one global IDT (its own) and other per domain
IDT. Xen uses global IDT to register the entire trap handler except for
system call handler (int 0x80).
When a VM gets scheduled, its system call handler (from per domain IDT
table) is registered with the processor. Hence when a domain/VM executes
a system call, its own handler is executed.

Implementation differs for x86_64: Xen registers its own system call
handler with the processor and from that handler routes the request to
VM/Domain specific handler.      

Correct me if I am wrong.

Dang
_______________________________________________
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>