From patchwork Thu Oct 26 19:11:40 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stefano Stabellini X-Patchwork-Id: 10028725 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 1E5AA60375 for ; Thu, 26 Oct 2017 19:14:06 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 0E77B28EA0 for ; Thu, 26 Oct 2017 19:14:06 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 039C028EA3; Thu, 26 Oct 2017 19:14:06 +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 A11A428EA0 for ; Thu, 26 Oct 2017 19:14:05 +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 1e7nZO-0004xM-UF; Thu, 26 Oct 2017 19:11:58 +0000 Received: from mail6.bemta5.messagelabs.com ([195.245.231.135]) by lists.xenproject.org with esmtp (Exim 4.84_2) (envelope-from ) id 1e7nZN-0004wV-A0 for xen-devel@lists.xen.org; Thu, 26 Oct 2017 19:11:57 +0000 Received: from [85.158.139.211] by server-15.bemta-5.messagelabs.com id 30/6D-23912-C7332F95; Thu, 26 Oct 2017 19:11:56 +0000 X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFmplkeJIrShJLcpLzFFi42I5NlE2Wbfa+FO kwcfbZhZLPi5mcWD0OLr7N1MAYxRrZl5SfkUCa8a2zoOsBQuFKr5OfsTawHifv4uRk0NIYB2T xOWlMSA2i4CDxMy7t9m7GDk4GAViJB78sAYJMwqESUy+vIQVxGYTMJT4+2QTG4gtIiAtce3zZ cYuRi4OZoHJjBKv3/1iBkkIC/hIrN32kxFipqrE72drwWxeAVeJC/MvgjVLCMhJnDw2GWwop4 CXxP4Tn1kh7vGU2LRoM8sERt4FjAyrGDWKU4vKUot0jYz0kooy0zNKchMzc3QNDUz1clOLixP TU3MSk4r1kvNzNzECg6GegYFxB+Oedr9DjJIcTEqivAx7PkQK8SXlp1RmJBZnxBeV5qQWH2KU 4eBQkuDdY/gpUkiwKDU9tSItMwcYljBpCQ4eJRFeFSOgNG9xQWJucWY6ROoUoyXHsU2X/zBxd Ny8CySfzXzdwCzEkpeflyolzusC0iAA0pBRmgc3DhY7lxhlpYR5GRkYGIR4ClKLcjNLUOVfMY pzMCoJ88qDTOHJzCuB2/oK6CAmoIOaVD+AHFSSiJCSamCs4HhlvjRUVPgvz76JCnW/D3p8rD1 3JDL2znnRiedTH027u1Pz6lu51KC+D5fvlj0Md/1Tucvh8IofIWnH2q60Hefc9EvhuLHu/aCJ pwR7KkPvGLN9PPlhnbbmibp/z7I1v3B1+7N/a3yy+yanM3/dFVP57LqfxqYdbH/Z/U13rT36z 4Pd9UOtEktxRqKhFnNRcSIAj05nWJgCAAA= X-Env-Sender: sstabellini@kernel.org X-Msg-Ref: server-6.tower-206.messagelabs.com!1509045114!106016230!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 48919 invoked from network); 26 Oct 2017 19:11:55 -0000 Received: from mail.kernel.org (HELO mail.kernel.org) (198.145.29.99) by server-6.tower-206.messagelabs.com with DHE-RSA-AES256-GCM-SHA384 encrypted SMTP; 26 Oct 2017 19:11:55 -0000 Received: from localhost.localdomain (162-198-228-35.lightspeed.wlfrct.sbcglobal.net [162.198.228.35]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id B99DC218A5; Thu, 26 Oct 2017 19:11:53 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org B99DC218A5 From: Stefano Stabellini To: xen-devel@lists.xen.org Date: Thu, 26 Oct 2017 12:11:40 -0700 Message-Id: <1509045112-9807-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 v7 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);