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

[Xen-devel] [PATCH 08/14] arm: implement do_set_trap_table function



arm: implement do_set_trap_table function

Signed-off-by: Jaemin Ryu <jm77.ryu@xxxxxxxxxxx>

diff -r 334dfdebde12 xen/arch/arm/xen/fault.c
--- a/xen/arch/arm/xen/fault.c  Sun Feb 12 11:46:52 2012 +0900
+++ b/xen/arch/arm/xen/fault.c  Sun Feb 12 11:54:33 2012 +0900
@@ -118,6 +118,22 @@ void unregister_guest_nmi_callback(void)
 
 long do_set_trap_table(XEN_GUEST_HANDLE(trap_info_t) traps)
 {
+       unsigned long trap_table;
+
+       if ( guest_handle_is_null(traps) )
+               goto failed;
+
+       trap_table = (unsigned long)traps.p;
+
+       current->arch.ctx.vbar = trap_table;
+
+       return 0;
+
+failed:
+       current->arch.ctx.vbar = 0;
+
+       printk("Trap table install failed\n");
+
        return -EFAULT;
 }
 

Attachment: patch08.diff
Description: Binary data

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel

 


Rackspace

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