Re: [PATCH 4/25] [PATCH] Add debugreg/load_rsp native hooks

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

 



>
> @@ -264,13 +270,64 @@ struct thread_struct {
>  	set_fs(USER_DS);							 \
>  } while(0)
>
> -#define get_debugreg(var, register)				\
> -		__asm__("movq %%db" #register ", %0"		\
> -			:"=r" (var))
> -#define set_debugreg(value, register)			\
> -		__asm__("movq %0,%%db" #register		\
> -			: /* no output */			\
> -			:"r" (value))
> +static inline unsigned long native_get_debugreg(int regno)
> +{
> +	unsigned long val;

It would be better to have own functions for each debug register I think

-Andi
_______________________________________________
Virtualization mailing list
Virtualization@xxxxxxxxxxxxxxxxxxxxxxxxxx
https://lists.linux-foundation.org/mailman/listinfo/virtualization

[Index of Archives]     [KVM Development]     [Libvirt Development]     [Libvirt Users]     [CentOS Virtualization]     [Netdev]     [Ethernet Bridging]     [Linux Wireless]     [Kernel Newbies]     [Security]     [Linux for Hams]     [Netfilter]     [Bugtraq]     [Yosemite Forum]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux Admin]     [Samba]

  Powered by Linux