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

Re: [Xen-devel] [PATCH v8 for-4.9 3/5] hvm/dmop: Implement copy_{to, from}_guest_buf() in terms of raw accessors



>>> On 21.04.17 at 16:05, <jennifer.herbert@xxxxxxxxxx> wrote:
> @@ -314,7 +323,7 @@ static int dm_op(const struct dmop_args *op_args)
>      if ( rc )
>          goto out;
>  
> -    if ( !copy_buf_from_guest(&op_args->buf[0], op_args->nr_bufs, &op, 0, 
> sizeof(op)) )
> +    if ( !COPY_FROM_GUEST_BUF(op, op_args, 0) );

Btw, I also had to remove the bogus semicolon here, causing a build
failure, and ...

> @@ -570,8 +579,8 @@ static int dm_op(const struct dmop_args *op_args)
>      }
>  
>      if ( (!rc || rc == -ERESTART) &&
> -         !const_op &&
> -         !copy_buf_to_guest(&op_args->buf[0], op_args->nr_bufs, 0, &op, 
> sizeof(op)) )
> +         !const_op && !COPY_TO_GUEST_BUF(op_args, 0, op) )
> +
>          rc = -EFAULT;

... I've taken the liberty to remove this stray blank line.

Both are likely a sign of this having been put together in too much
of a hurry, and the former suggests this version hasn't been tested
at all.

Jan


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

 


Rackspace

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