Received: by 2002:a25:86ce:0:0:0:0:0 with SMTP id y14csp1155468ybm; Tue, 21 May 2019 09:26:00 -0700 (PDT) X-Google-Smtp-Source: APXvYqzKXe0N+NLED//YgaGmHwPZvR14Z2wZg1ObzMBYpq4jVHUCKObquSW8RwN8+5EYBHVHNpQ7 X-Received: by 2002:a17:902:6b03:: with SMTP id o3mr33557108plk.85.1558455960130; Tue, 21 May 2019 09:26:00 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1558455960; cv=none; d=google.com; s=arc-20160816; b=aQm/DUb2yFvU674jaWH36vjunpRuXRwsrglm8PG5wjdlI+87vvMgBbe+6Q5pFczLFI 4Udn4pixKFguTd7GlmJU9MHCdNt3/+CSdBt2UuakxpWLOZjK7Kd7QxUzazJgI3xL/out Jjdqbsw6jKxGp4GJWElsFrbpwBsnWrjlvryIgexsH9LpFtBQMF4hDLtEDrzcPePvlknW J1PoO4/0w1Ltr7u2pBVhqURmXy79+vk7GOOMzgLFkwVK+P5ije2ApOYABLFkVJGqqnpb iJj06UCUBou1cfv+w7B8srwOy0cS038L9CRlsu3DGpSgJhVTR15Y5VJobkq0DvyRNuQv UQZg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:thread-index:thread-topic :content-transfer-encoding:mime-version:subject:references :in-reply-to:message-id:cc:to:from:date; bh=rxs2m4lcvC5lmcIZp5PLevSpT3sW8HhKoo0qMwroHck=; b=cPwcOFKrXiOE3dYyRYVS9zRFjSHLpliUKwrkPCyuLjWqG+xqoGW4bVrisbkKpuBVjP arPeisCTGIwFs4vVDd45DK0Bxx6EpidAv/8ZSfA53iwqzlVUjZ4BCfghj/a5+hScqfXB PaORBqCYRNbByvCA1T2zFeJKHS47zsSVNFxOVj8h81vbLhupnsAQy8Ls3iJ3HtnV3g5E aC/8/SDkRbEXj8Skk9klSPz6SSBHzOgY1WLEmSg5k8wAy6uLWs0Evab2RGIjmNTzU44x Mz/OVmOLtJr19nv/3e3PjrkSy5295nuS3L4yL9ETovqqZfwQpQXM4y61dvPQ6hRuGaUe dWQQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-ext4-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-ext4-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id o15si22088775pgh.181.2019.05.21.09.25.44; Tue, 21 May 2019 09:26:00 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-ext4-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-ext4-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-ext4-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728899AbfEUQYk (ORCPT + 99 others); Tue, 21 May 2019 12:24:40 -0400 Received: from mx1.redhat.com ([209.132.183.28]:39834 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728858AbfEUQYk (ORCPT ); Tue, 21 May 2019 12:24:40 -0400 Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.13]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 4368830833AF; Tue, 21 May 2019 16:24:29 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.21]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 1465F4387; Tue, 21 May 2019 16:24:24 +0000 (UTC) Received: from zmail21.collab.prod.int.phx2.redhat.com (zmail21.collab.prod.int.phx2.redhat.com [10.5.83.24]) by colo-mx.corp.redhat.com (Postfix) with ESMTP id C3F6A5B423; Tue, 21 May 2019 16:24:14 +0000 (UTC) Date: Tue, 21 May 2019 12:24:14 -0400 (EDT) From: Pankaj Gupta To: "Michael S. Tsirkin" Cc: cohuck@redhat.com, jack@suse.cz, kvm@vger.kernel.org, david@redhat.com, jasowang@redhat.com, david@fromorbit.com, qemu-devel@nongnu.org, virtualization@lists.linux-foundation.org, dm-devel@redhat.com, adilger kernel , zwisler@kernel.org, aarcange@redhat.com, dave jiang , jstaron@google.com, linux-nvdimm@lists.01.org, vishal l verma , willy@infradead.org, hch@infradead.org, linux-acpi@vger.kernel.org, jmoyer@redhat.com, linux-ext4@vger.kernel.org, lenb@kernel.org, kilobyte@angband.pl, rdunlap@infradead.org, riel@surriel.com, yuval shaia , stefanha@redhat.com, pbonzini@redhat.com, dan j williams , lcapitulino@redhat.com, kwolf@redhat.com, nilal@redhat.com, tytso@mit.edu, xiaoguangrong eric , snitzer@redhat.com, darrick wong , rjw@rjwysocki.net, linux-kernel@vger.kernel.org, linux-xfs@vger.kernel.org, linux-fsdevel@vger.kernel.org, imammedo@redhat.com Message-ID: <176786650.30122184.1558455854322.JavaMail.zimbra@redhat.com> In-Reply-To: <20190521094543-mutt-send-email-mst@kernel.org> References: <20190521133713.31653-1-pagupta@redhat.com> <20190521133713.31653-3-pagupta@redhat.com> <20190521094543-mutt-send-email-mst@kernel.org> Subject: Re: [Qemu-devel] [PATCH v10 2/7] virtio-pmem: Add virtio pmem driver MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Originating-IP: [10.67.116.105, 10.4.195.14] Thread-Topic: virtio-pmem: Add virtio pmem driver Thread-Index: 3AiQ7PJb9jLe5p+DRlEZBNdQ18HFYA== X-Scanned-By: MIMEDefang 2.79 on 10.5.11.13 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.44]); Tue, 21 May 2019 16:24:39 +0000 (UTC) Sender: linux-ext4-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-ext4@vger.kernel.org > > diff --git a/include/uapi/linux/virtio_pmem.h > > b/include/uapi/linux/virtio_pmem.h > > new file mode 100644 > > index 000000000000..7a3e2fe52415 > > --- /dev/null > > +++ b/include/uapi/linux/virtio_pmem.h > > @@ -0,0 +1,35 @@ > > +/* SPDX-License-Identifier: GPL-2.0 OR BSD-3-Clause */ > > +/* > > + * Definitions for virtio-pmem devices. > > + * > > + * Copyright (C) 2019 Red Hat, Inc. > > + * > > + * Author(s): Pankaj Gupta > > + */ > > + > > +#ifndef _UAPI_LINUX_VIRTIO_PMEM_H > > +#define _UAPI_LINUX_VIRTIO_PMEM_H > > + > > +#include > > +#include > > +#include > > +#include > > + > > +struct virtio_pmem_config { > > + __le64 start; > > + __le64 size; > > +}; > > + > > config generally should be __u64. > Are you sure sparse does not complain? I used this because VIRTIO 1.1 spec says: "The device configuration space uses the little-endian format for multi-byte fields. " and __le64 looks ok to me. Also, its used in other driver config as welle.g virtio-vsock > > > > +#define VIRTIO_PMEM_REQ_TYPE_FLUSH 0 > > + > > +struct virtio_pmem_resp { > > + /* Host return status corresponding to flush request */ > > + __virtio32 ret; > > +}; > > + > > +struct virtio_pmem_req { > > + /* command type */ > > + __virtio32 type; > > +}; > > + > > +#endif > > -- > > 2.20.1 > > Sorry why are these __virtio32 not __le32? I used __virtio32 for data fields for guest and host supporting different endianess. Thanks, Pankaj > > -- > MST > >