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

Re: [Xen-devel] [PATCH 8/18 V2]: PVH xen: domain creation code changes



>>> On 26.03.13 at 22:04, Mukesh Rathor <mukesh.rathor@xxxxxxxxxx> wrote:
> #define read_segment_register(vcpu, regs, name)                   \
> ({  u16 __sel;                                                    \
>     struct cpu_user_regs *_regs = (regs);                         \
>                                                                   \
>     if ( is_pvh_vcpu(vcpu) )                                      \
>         __sel = _regs->name;                                      \
>     else                                                          \
>         asm volatile ( "movw %%" #name ",%0" : "=r" (__sel) );    \
>     __sel;                                                        \
> })

Almost: If you really want to keep the _regs variable, then it
should be "const struct cpu_user_regs *". But is there a reason
not to simply have the declaration of __sel have an initializer?

Jan


_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel


 


Rackspace

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