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

[Xen-changelog] [xen-unstable] [HVM][VMX] Propagate debug exception to guest if no external debugger is enabled.



# HG changeset patch
# User kaf24@xxxxxxxxxxxxxxxxxxxx
# Node ID 1e2ea40078f2ce25d55918ca3b7f9bf818b72bca
# Parent  9ec0b4f10b4f588f5e7764a6a64e5fcd0f9af0f1
[HVM][VMX] Propagate debug exception to guest if no external debugger is 
enabled.
Signed-off-by: George Dunlap <dunlapg@xxxxxxxxx>
---
 xen/arch/x86/hvm/vmx/vmx.c |   17 +++++++++++++----
 1 files changed, 13 insertions(+), 4 deletions(-)

diff -r 9ec0b4f10b4f -r 1e2ea40078f2 xen/arch/x86/hvm/vmx/vmx.c
--- a/xen/arch/x86/hvm/vmx/vmx.c        Sat Jun 24 23:44:18 2006 +0100
+++ b/xen/arch/x86/hvm/vmx/vmx.c        Tue Jun 27 09:33:35 2006 +0100
@@ -2080,10 +2080,19 @@ asmlinkage void vmx_vmexit_handler(struc
         {
             void store_cpu_user_regs(struct cpu_user_regs *regs);
 
-            store_cpu_user_regs(&regs);
-            __vm_clear_bit(GUEST_PENDING_DBG_EXCEPTIONS, PENDING_DEBUG_EXC_BS);
-
-            domain_pause_for_debugger();
+            if ( test_bit(_DOMF_debugging, &v->domain->domain_flags) )
+            {
+                store_cpu_user_regs(&regs);
+                domain_pause_for_debugger();
+                __vm_clear_bit(GUEST_PENDING_DBG_EXCEPTIONS,
+                               PENDING_DEBUG_EXC_BS);
+            }
+            else
+            {
+                vmx_reflect_exception(v);
+                __vm_clear_bit(GUEST_PENDING_DBG_EXCEPTIONS,
+                               PENDING_DEBUG_EXC_BS);
+            }
 
             break;
         }

_______________________________________________
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®.