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

[Xen-changelog] Add a 'clear trap table' path to set_trap_table hypercall, taken when



# HG changeset patch
# User kaf24@xxxxxxxxxxxxxxxxxxxx
# Node ID 29f8c87bd8fd13d3aaaa3c1ccb0e238b0562e7bb
# Parent  af04fef70bada7326089573af3fac0183ef8bdfe
Add a 'clear trap table' path to set_trap_table hypercall, taken when
the input table is NULL.

Also, no need for set_trap_table to take the per-domain biglock.

Signed-off-by: Keir Fraser <keir@xxxxxxxxxxxxx>

diff -r af04fef70bad -r 29f8c87bd8fd xen/arch/x86/traps.c
--- a/xen/arch/x86/traps.c      Thu Mar  2 20:37:14 2006
+++ b/xen/arch/x86/traps.c      Fri Mar  3 09:34:03 2006
@@ -1410,7 +1410,13 @@
     struct trap_info *dst = current->arch.guest_context.trap_ctxt;
     long rc = 0;
 
-    LOCK_BIGLOCK(current->domain);
+    /* If no table is presented then clear the entire virtual IDT. */
+    if ( traps == NULL )
+    {
+        memset(dst, 0, 256 * sizeof(*dst));
+        init_int80_direct_trap(current);
+        return 0;
+    }
 
     for ( ; ; )
     {
@@ -1439,8 +1445,6 @@
 
         traps++;
     }
-
-    UNLOCK_BIGLOCK(current->domain);
 
     return rc;
 }

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


 


Rackspace

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