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

[Xen-users] xen trap questions

To: <xen-users@xxxxxxxxxxxxxxxxxxx>
Subject: [Xen-users] xen trap questions
From: Tommy Huang <tommy24@xxxxxxxx>
Date: Fri, 7 Nov 2008 00:07:38 -0800
Delivery-date: Fri, 07 Nov 2008 00:08:16 -0800
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
Importance: Normal
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
I am confused about traps in XEN.
 
1. I found that there are two traps.c files in xen source.
    One is in mini-os directory and the other is in xen directory. As far as I know, when the domain is scheduled, it will issue a hypercall to register its trap_table. In that case, traps from that domain can be handled without xen intervention. So it makes sence that we have it in mini-os directory, but why is there another one in xen directory? Also, the trap_table is also defined in entry.S which is used by xen. All exception handlers are not only in traps.c of mini-os, but also in somewhere in xen source, although they are doing different things.
 
2. For some privileged instructions which are not replaced by hypercalls will generate "General protection fault (GPF)" which is a kind of traps. However, it is handled by xen's traps handler but not os's trap handler. Why is it that case? I thought cpu should use the handler registered by the os but not xen's trap handler. I found that OS has that handler too (do_general_protection). What it does is to shutdown the domain(not sure). And xen has that handler also. My question is how does cpu pick which trap handler would be used? If os registers its own handler, why does the cpu use xen's handler in GPF case?
 
Any information is very appreciated. Thanks in advance.
 
Regards,
- JC


Stay up to date on your PC, the Web, and your mobile phone with Windows Live Click here
_______________________________________________
Xen-users mailing list
Xen-users@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-users
<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-users] xen trap questions, Tommy Huang <=