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. _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
-----Original Message----- From: xen-users-bounces@lists.xensource.com [mailto:xen-users-bounces@lists.xensource.com] On Behalf Of helicoterus-elih@yahoo.it 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@lists.xensource.com http://lists.xensource.com/xen-users _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
Amit Dang wrote:>> >> >> I have a doubt about system calls on paravirtualized Xen environment >> (without virtualization extensions).[...]> * 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[...]> > DangThanks, and what about hvm domU? How do the system calls work? H.E. _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
-----Original Message----- From: xen-users-bounces@lists.xensource.com [mailto:xen-users-bounces@lists.xensource.com] On Behalf Of helicoterus-elih@yahoo.it Sent: Friday, May 01, 2009 5:24 PM To: xen list Subject: Re: [Xen-users] Where do System calls go? Thanks, and what about hvm domU? How do the system calls work? For HVM domU there is no change in the behavior of the system call. HVM is only supported for Intel-VT and AMD-SVM processors. These processors are virtualization aware. Virtualization aware processors provide a new ring (Root-Ring 0) with higher privilege for VMM and Guest OS continues to runs with the same privilege (as without Xen) in Non-Root Ring 0. Guest OS can issue the system calls the way it used to without Xen. Hope this helps. Dang _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users