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

Re: [Xen-devel] [PATCH 11/13] libx86: Introduce a helper to deserialise a cpuid_policy object



>>> On 03.07.18 at 22:55, <andrew.cooper3@xxxxxxxxxx> wrote:
> @@ -47,6 +48,17 @@ static inline bool test_bit(unsigned int bit, const void 
> *vaddr)
>      0;                                                  \
>  })
>  
> +/* memcpy(), but with copy_from_guest_offset()'s API */
> +#define copy_from_buffer_offset(dst, src, index, nr) ({ \
> +    const typeof(*(dst)) *s = (src);                    \
> +    unsigned int i;                                     \
> +                                                        \
> +    for ( i = 0; i < (nr); i++ )                        \
> +        (dst)[i] = s[(index) + i];                      \
> +                                                        \
> +    0;                                                  \
> +})

Again the question on whether multiple evaluation of macro arguments
would better be avoided here.

Jan



_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxxx
https://lists.xenproject.org/mailman/listinfo/xen-devel

 


Rackspace

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