qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [Xen-devel] [PATCH] xen: use native disk xenbus protoco


From: Juergen Gross
Subject: Re: [Qemu-devel] [Xen-devel] [PATCH] xen: use native disk xenbus protocol if possible
Date: Mon, 27 Jun 2016 12:54:39 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.7.0

On 17/06/16 13:14, Juergen Gross wrote:
> The qdisk implementation is using the native xenbus protocol only in
> case of no protocol specified at all. As using the explicit 32- or
> 64-bit protocol is slower than the native one due to copying requests
> not by memcpy but element for element, this is not optimal.
> 
> Correct this by using the native protocol in case word sizes of
> frontend and backend match.

Ping?

> 
> Signed-off-by: Juergen Gross <address@hidden>
> ---
>  hw/block/xen_disk.c | 16 ++++++++--------
>  1 file changed, 8 insertions(+), 8 deletions(-)
> 
> diff --git a/hw/block/xen_disk.c b/hw/block/xen_disk.c
> index 2862b59..0961fcb 100644
> --- a/hw/block/xen_disk.c
> +++ b/hw/block/xen_disk.c
> @@ -976,14 +976,14 @@ static int blk_connect(struct XenDevice *xendev)
>          blkdev->feature_persistent = !!pers;
>      }
>  
> -    blkdev->protocol = BLKIF_PROTOCOL_NATIVE;
> -    if (blkdev->xendev.protocol) {
> -        if (strcmp(blkdev->xendev.protocol, XEN_IO_PROTO_ABI_X86_32) == 0) {
> -            blkdev->protocol = BLKIF_PROTOCOL_X86_32;
> -        }
> -        if (strcmp(blkdev->xendev.protocol, XEN_IO_PROTO_ABI_X86_64) == 0) {
> -            blkdev->protocol = BLKIF_PROTOCOL_X86_64;
> -        }
> +    if (!blkdev->xendev.protocol) {
> +        blkdev->protocol = BLKIF_PROTOCOL_NATIVE;
> +    } else if (strcmp(blkdev->xendev.protocol, XEN_IO_PROTO_ABI_NATIVE) == 
> 0) {
> +        blkdev->protocol = BLKIF_PROTOCOL_NATIVE;
> +    } else if (strcmp(blkdev->xendev.protocol, XEN_IO_PROTO_ABI_X86_32) == 
> 0) {
> +        blkdev->protocol = BLKIF_PROTOCOL_X86_32;
> +    } else if (strcmp(blkdev->xendev.protocol, XEN_IO_PROTO_ABI_X86_64) == 
> 0) {
> +        blkdev->protocol = BLKIF_PROTOCOL_X86_64;
>      }
>  
>      blkdev->sring = xengnttab_map_grant_ref(blkdev->xendev.gnttabdev,
> 




reply via email to

[Prev in Thread] Current Thread [Next in Thread]