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

[Xen-users] xen trap questions


  • To: <xen-users@xxxxxxxxxxxxxxxxxxx>
  • From: Tommy Huang <tommy24@xxxxxxxx>
  • Date: Fri, 7 Nov 2008 00:07:38 -0800
  • Delivery-date: Fri, 07 Nov 2008 00:08:16 -0800
  • Importance: Normal
  • List-id: Xen user discussion <xen-users.lists.xensource.com>

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

 


Rackspace

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