From patchwork Mon Oct 30 22:40:51 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stefano Stabellini X-Patchwork-Id: 10033413 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 C13286039A for ; Mon, 30 Oct 2017 22:43:18 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id B301928650 for ; Mon, 30 Oct 2017 22:43:18 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id A5D2628981; Mon, 30 Oct 2017 22:43:18 +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=-4.2 required=2.0 tests=BAYES_00, RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) (using TLSv1.2 with cipher AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 532E828650 for ; Mon, 30 Oct 2017 22:43:18 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.84_2) (envelope-from ) id 1e9Ik1-00051n-9U; Mon, 30 Oct 2017 22:41:09 +0000 Received: from mail6.bemta6.messagelabs.com ([193.109.254.103]) by lists.xenproject.org with esmtp (Exim 4.84_2) (envelope-from ) id 1e9Ik0-00051W-73 for xen-devel@lists.xen.org; Mon, 30 Oct 2017 22:41:08 +0000 Received: from [193.109.254.147] by server-6.bemta-6.messagelabs.com id 06/56-08608-38AA7F95; Mon, 30 Oct 2017 22:41:07 +0000 X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFmplkeJIrShJLcpLzFFi42I5NlE2Wbdp1fd Ig+lHTSyWfFzM4sDocXT3b6YAxijWzLyk/IoE1oxtnQdZCxYKVXyd/Ii1gfE+fxcjF4eQwDom ieVbZ7J3MXJysAg4SJyf2MbSxcjBwSgQI/HghzVImFEgTGLy5SWsIDabgKHE3yeb2EBsEQFpi WufLzOCzGEWmMwo8frdL2aQhLCAj8SU9XuZQOawCKhKXN+kDxLmFXCTeLT+FSOILSEgJ3Hy2G SwmZwC3hLTFi1mAbGFBLwkpvz8wzSBkXcBI8MqRo3i1KKy1CJdQ2O9pKLM9IyS3MTMHF1DAzO 93NTi4sT01JzEpGK95PzcTYzAYGAAgh2MX5YFHGKU5GBSEuXd6fg9UogvKT+lMiOxOCO+qDQn tfgQowwHh5IE758VQDnBotT01Iq0zBxgWMKkJTh4lER4r4CkeYsLEnOLM9MhUqcYLTmObbr8h 4mj4+ZdIPls5usGZiGWvPy8VClx3tMrgRoEQBoySvPgxsFi5xKjrJQwLyPQgUI8BalFuZklqP KvGMU5GJWEea+ATOHJzCuB2/oK6CAmoIM0JL+AHFSSiJCSamDs22n/OqmFL1dUj/vc1oU3JaX XTozNWrf0bI78seD9yUv+38/feityyQruooV+3J0xDJ1X3y/jajzcPMPnGbsKh2Tx3pp9ou9S G9aZpKtmH/Ou1TGtfXK09HhWSnHctaxXFrHyKe5bvk/m6MoRMfnuaeXpJ2YQ59cV+mX7Cuukx FmcxVN2P1FiKc5INNRiLipOBABsVj8VmAIAAA== X-Env-Sender: sstabellini@kernel.org X-Msg-Ref: server-14.tower-27.messagelabs.com!1509403265!101693555!1 X-Originating-IP: [198.145.29.99] X-SpamReason: No, hits=0.0 required=7.0 tests= X-StarScan-Received: X-StarScan-Version: 9.4.45; banners=-,-,- X-VirusChecked: Checked Received: (qmail 46503 invoked from network); 30 Oct 2017 22:41:06 -0000 Received: from mail.kernel.org (HELO mail.kernel.org) (198.145.29.99) by server-14.tower-27.messagelabs.com with DHE-RSA-AES256-GCM-SHA384 encrypted SMTP; 30 Oct 2017 22:41:06 -0000 Received: from localhost.localdomain (162-198-228-33.lightspeed.wlfrct.sbcglobal.net [162.198.228.33]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id F06932192A; Mon, 30 Oct 2017 22:41:04 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org F06932192A From: Stefano Stabellini To: xen-devel@lists.xen.org Date: Mon, 30 Oct 2017 15:40:51 -0700 Message-Id: <1509403263-15414-1-git-send-email-sstabellini@kernel.org> X-Mailer: git-send-email 1.9.1 In-Reply-To: References: Cc: jgross@suse.com, Stefano Stabellini , boris.ostrovsky@oracle.com, sstabellini@kernel.org, linux-kernel@vger.kernel.org Subject: [Xen-devel] [PATCH v8 01/13] xen/pvcalls: introduce the pvcalls xenbus frontend X-BeenThere: xen-devel@lists.xen.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: xen-devel-bounces@lists.xen.org Sender: "Xen-devel" X-Virus-Scanned: ClamAV using ClamSMTP Introduce a xenbus frontend for the pvcalls protocol, as defined by https://xenbits.xen.org/docs/unstable/misc/pvcalls.html. This patch only adds the stubs, the code will be added by the following patches. Signed-off-by: Stefano Stabellini Reviewed-by: Boris Ostrovsky CC: boris.ostrovsky@oracle.com CC: jgross@suse.com --- drivers/xen/pvcalls-front.c | 61 +++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 61 insertions(+) create mode 100644 drivers/xen/pvcalls-front.c diff --git a/drivers/xen/pvcalls-front.c b/drivers/xen/pvcalls-front.c new file mode 100644 index 0000000..a8d38c2 --- /dev/null +++ b/drivers/xen/pvcalls-front.c @@ -0,0 +1,61 @@ +/* + * (c) 2017 Stefano Stabellini + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + */ + +#include + +#include +#include +#include +#include +#include + +static const struct xenbus_device_id pvcalls_front_ids[] = { + { "pvcalls" }, + { "" } +}; + +static int pvcalls_front_remove(struct xenbus_device *dev) +{ + return 0; +} + +static int pvcalls_front_probe(struct xenbus_device *dev, + const struct xenbus_device_id *id) +{ + return 0; +} + +static void pvcalls_front_changed(struct xenbus_device *dev, + enum xenbus_state backend_state) +{ +} + +static struct xenbus_driver pvcalls_front_driver = { + .ids = pvcalls_front_ids, + .probe = pvcalls_front_probe, + .remove = pvcalls_front_remove, + .otherend_changed = pvcalls_front_changed, +}; + +static int __init pvcalls_frontend_init(void) +{ + if (!xen_domain()) + return -ENODEV; + + pr_info("Initialising Xen pvcalls frontend driver\n"); + + return xenbus_register_frontend(&pvcalls_front_driver); +} + +module_init(pvcalls_frontend_init);