[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: [Xen-users] Where do System calls go?


  • To: <helicoterus-elih@xxxxxxxx>, "xen list" <xen-users@xxxxxxxxxxxxxxxxxxx>
  • 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
  • List-id: Xen user discussion <xen-users.lists.xensource.com>
  • 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


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.