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-devel

[Xen-devel] [PATCH] Use hypercalls instead of accessing debug registers

To: Ian Pratt <Ian.Pratt@xxxxxxxxxxxx>, Keir Fraser <Keir.Fraser@xxxxxxxxxxxx>
Subject: [Xen-devel] [PATCH] Use hypercalls instead of accessing debug registers directly.
From: Arun Sharma <arun.sharma@xxxxxxxxx>
Date: Thu, 7 Jul 2005 14:50:23 -0700
Cc: xen-devel@xxxxxxxxxxxxxxxxxxx
Delivery-date: Thu, 07 Jul 2005 21:44:47 +0000
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
User-agent: Mutt/1.4.1i
Use hypercalls instead of accessing debug registers directly.

Signed-off-by: Jun Nakajima <jun.nakajima@xxxxxxxxx>
Signed-off-by: Arun Sharma <arun.sharma@xxxxxxxxx>

--- a/linux-2.6.11-xen-sparse/arch/xen/x86_64/kernel/traps.c    Wed Jul  6 
23:44:28 2005
+++ b/linux-2.6.11-xen-sparse/arch/xen/x86_64/kernel/traps.c    Thu Jul  7 
14:38:19 2005
@@ -666,7 +666,7 @@
        }
 #endif
 
-       asm("movq %%db6,%0" : "=r" (condition));
+       condition = HYPERVISOR_get_debugreg(6);
 
        if (notify_die(DIE_DEBUG, "debug", regs, condition, error_code,
                                                SIGTRAP) == NOTIFY_STOP) {
@@ -714,7 +714,8 @@
        info.si_addr = (void __user *)regs->rip;
        force_sig_info(SIGTRAP, &info, tsk);    
 clear_dr7:
-       asm volatile("movq %0,%%db7"::"r"(0UL));
+       HYPERVISOR_set_debugreg(7, 0);
+
        notify_die(DIE_DEBUG, "debug", regs, condition, 1, SIGTRAP);
        return regs;
 

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

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-devel] [PATCH] Use hypercalls instead of accessing debug registers directly., Arun Sharma <=