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] RE: [PATCH] Use hypercalls instead of accessing debug regist

To: "Arun Sharma" <arun.sharma@xxxxxxxxx>, "Ian Pratt" <Ian.Pratt@xxxxxxxxxxxx>, "Keir Fraser" <Keir.Fraser@xxxxxxxxxxxx>
Subject: [Xen-devel] RE: [PATCH] Use hypercalls instead of accessing debug registers directly.
From: "Ian Pratt" <m+Ian.Pratt@xxxxxxxxxxxx>
Date: Fri, 8 Jul 2005 00:05:29 +0100
Cc: xen-devel@xxxxxxxxxxxxxxxxxxx
Delivery-date: Thu, 07 Jul 2005 23:04:20 +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
Thread-index: AcWDPUli9n/Koa7nRmWY/3JwC6CVUgACr6yw
Thread-topic: [PATCH] Use hypercalls instead of accessing debug registers directly.
 

> Use hypercalls instead of accessing debug registers directly.

Is this based on measurement? If the debug registers aren't on the
critical path its probably not worth the change. If they are, they
should probably be part of a multicall.

Best,
Ian

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