From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-4.0 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 83330C04AAF for ; Tue, 21 May 2019 16:25:40 +0000 (UTC) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 58ABE208C3 for ; Tue, 21 May 2019 16:25:40 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 58ABE208C3 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=redhat.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Received: from localhost ([127.0.0.1]:56608 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hT7a4-0000Ri-CC for qemu-devel@archiver.kernel.org; Tue, 21 May 2019 12:25:36 -0400 Received: from eggs.gnu.org ([209.51.188.92]:42614) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hT7ZH-0008T0-8R for qemu-devel@nongnu.org; Tue, 21 May 2019 12:24:48 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hT7ZG-0008RC-C9 for qemu-devel@nongnu.org; Tue, 21 May 2019 12:24:47 -0400 Received: from mx1.redhat.com ([209.132.183.28]:44404) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1hT7ZG-0008OY-4R for qemu-devel@nongnu.org; Tue, 21 May 2019 12:24:46 -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" 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> 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) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 209.132.183.28 Subject: Re: [Qemu-devel] [PATCH v10 2/7] virtio-pmem: Add virtio pmem driver X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: rdunlap@infradead.org, 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, riel@surriel.com, yuval shaia , stefanha@redhat.com, imammedo@redhat.com, dan j williams , lcapitulino@redhat.com, kwolf@redhat.com, nilal@redhat.com, tytso@mit.edu, xiaoguangrong eric , snitzer@redhat.com, cohuck@redhat.com, rjw@rjwysocki.net, linux-kernel@vger.kernel.org, linux-xfs@vger.kernel.org, linux-fsdevel@vger.kernel.org, pbonzini@redhat.com, darrick wong Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: "Qemu-devel" > > 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 > >