From patchwork Mon Mar 13 23:55:54 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stefano Stabellini X-Patchwork-Id: 9622319 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 27329604CC for ; Mon, 13 Mar 2017 23:56:31 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 15F9E2848E for ; Mon, 13 Mar 2017 23:56:31 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 081FF28520; Mon, 13 Mar 2017 23:56:31 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.9 required=2.0 tests=BAYES_00,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 7E9862848E for ; Mon, 13 Mar 2017 23:56:30 +0000 (UTC) Received: from localhost ([::1]:55676 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cnZpF-0000LX-HV for patchwork-qemu-devel@patchwork.kernel.org; Mon, 13 Mar 2017 19:56:29 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:54041) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cnZow-0000Jx-Kv for qemu-devel@nongnu.org; Mon, 13 Mar 2017 19:56:11 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1cnZov-0004kR-Ty for qemu-devel@nongnu.org; Mon, 13 Mar 2017 19:56:10 -0400 Received: from mail.kernel.org ([198.145.29.136]:46732) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1cnZov-0004k0-Nl for qemu-devel@nongnu.org; Mon, 13 Mar 2017 19:56:09 -0400 Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id C8DDE20412; Mon, 13 Mar 2017 23:56:07 +0000 (UTC) Received: from sstabellini-ThinkPad-X260.hsd1.ca.comcast.net (96-82-76-110-static.hfc.comcastbusiness.net [96.82.76.110]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id AB478203ED; Mon, 13 Mar 2017 23:56:06 +0000 (UTC) From: Stefano Stabellini To: qemu-devel@nongnu.org Date: Mon, 13 Mar 2017 16:55:54 -0700 Message-Id: <1489449360-14411-3-git-send-email-sstabellini@kernel.org> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1489449360-14411-1-git-send-email-sstabellini@kernel.org> References: <1489449360-14411-1-git-send-email-sstabellini@kernel.org> X-Virus-Scanned: ClamAV using ClamSMTP X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x [fuzzy] X-Received-From: 198.145.29.136 Subject: [Qemu-devel] [PATCH v2 3/9] xen: introduce the header file for the Xen 9pfs transport protocol 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: jgross@suse.com, sstabellini@kernel.org, groug@kaod.org, Stefano Stabellini , anthony.perard@citrix.com, xen-devel@lists.xenproject.org Errors-To: qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Sender: "Qemu-devel" X-Virus-Scanned: ClamAV using ClamSMTP It uses the new ring.h macros to declare rings and interfaces. Signed-off-by: Stefano Stabellini CC: anthony.perard@citrix.com CC: jgross@suse.com --- hw/9pfs/xen_9pfs.h | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 hw/9pfs/xen_9pfs.h diff --git a/hw/9pfs/xen_9pfs.h b/hw/9pfs/xen_9pfs.h new file mode 100644 index 0000000..c4e8901 --- /dev/null +++ b/hw/9pfs/xen_9pfs.h @@ -0,0 +1,20 @@ +#ifndef XEN_9PFS_H +#define XEN_9PFS_H + +#include "hw/xen/io/ring.h" +#include + +struct xen_9pfs_header { + uint32_t size; + uint8_t id; + uint16_t tag; + + /* uint8_t sdata[]; */ +} __attribute__((packed)); + +#define PAGE_SHIFT XC_PAGE_SHIFT +#define XEN_9PFS_RING_ORDER 6 +#define XEN_9PFS_RING_SIZE XEN_FLEX_RING_SIZE(XEN_9PFS_RING_ORDER) +DEFINE_XEN_FLEX_RING_AND_INTF(xen_9pfs); + +#endif