From patchwork Tue Jul 25 21:21:58 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stefano Stabellini X-Patchwork-Id: 9863819 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 0942B6038C for ; Tue, 25 Jul 2017 21:24:25 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id E560A2860F for ; Tue, 25 Jul 2017 21:24:24 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id D9D3E28708; Tue, 25 Jul 2017 21:24:24 +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 611C42860F for ; Tue, 25 Jul 2017 21:24:24 +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 1da7HX-0004XZ-Ne; Tue, 25 Jul 2017 21:22:19 +0000 Received: from mail6.bemta6.messagelabs.com ([193.109.254.103]) by lists.xenproject.org with esmtp (Exim 4.84_2) (envelope-from ) id 1da7HW-0004X9-Pu for xen-devel@lists.xen.org; Tue, 25 Jul 2017 21:22:18 +0000 Received: from [193.109.254.147] by server-2.bemta-6.messagelabs.com id B9/77-27137-A86B7795; Tue, 25 Jul 2017 21:22:18 +0000 X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFvrPLMWRWlGSWpSXmKPExsVybKJssm7ntvJ Ig+stlhZLPi5mcWD0OLr7N1MAYxRrZl5SfkUCa8aXg9NZC54LVqz9/5CxgXElfxcjF4eQwDom ieMP7rB1MXJysAg4SHR8WQFkc3AwCsRIPPhhDRJmFAiTmHx5CSuIzSZgKPH3ySawchEBaYlrn y8zgsxhFpjMKPH63S9mkISwgI/EuX8trBAzVSUeb/nFAmLzCrhJPDh2gB3ElhCQkzh5bDJYDS dQ/d7mLawge4UEvCWe37OcwMi7gJFhFaNGcWpRWWqRrpGJXlJRZnpGSW5iZo6uoYGZXm5qcXF iempOYlKxXnJ+7iZGYDAwAMEOxn0fIw8xSnIwKYnyftMtjxTiS8pPqcxILM6ILyrNSS0+xCjD waEkwfttC1BOsCg1PbUiLTMHGJYwaQkOHiUR3t6tQGne4oLE3OLMdIjUKUZjjg2r139h4ng14 f83JiGWvPy8VClxXgOQUgGQ0ozSPLhBsHi5xCgrJczLCHSaEE9BalFuZgmq/CtGcQ5GJWFeBZ ApPJl5JXD7XgGdwgR0ypwZpSCnlCQipKQaGPvuSpUbXikMPKQ3UTP/3K/cW3fORHKfanp4d+b isrkHb9o8iFdpXvWxMp3rwIFqq5La88x3g15/1ww992y+6SGhvemqLE33Zco7cqcaLbP8pbA/ 87bTDPvIS0yv5uZY80wMiq+3fcgafXLq/WxF/YVJb6MP163619GVnLvmTIh/5AzdYN7YbUosx RmJhlrMRcWJAOyH+GeSAgAA X-Env-Sender: sstabellini@kernel.org X-Msg-Ref: server-5.tower-27.messagelabs.com!1501017736!103355003!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.25; banners=-,-,- X-VirusChecked: Checked Received: (qmail 59368 invoked from network); 25 Jul 2017 21:22:17 -0000 Received: from mail.kernel.org (HELO mail.kernel.org) (198.145.29.99) by server-5.tower-27.messagelabs.com with DHE-RSA-AES256-GCM-SHA384 encrypted SMTP; 25 Jul 2017 21:22:17 -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 CC5BB22B5D; Tue, 25 Jul 2017 21:22:15 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org CC5BB22B5D From: Stefano Stabellini To: xen-devel@lists.xen.org Date: Tue, 25 Jul 2017 14:21:58 -0700 Message-Id: <1501017730-12797-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 v2 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 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);