Skip to content

Commit 72e59c3

Browse files
sstabelliniBoris Ostrovsky
authored andcommitted
xen/pvcalls: introduce the pvcalls xenbus backend
Introduce a xenbus backend 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 <[email protected]> Reviewed-by: Boris Ostrovsky <[email protected]> Reviewed-by: Juergen Gross <[email protected]> CC: [email protected] CC: [email protected] Signed-off-by: Boris Ostrovsky <[email protected]>
1 parent 75e3ea5 commit 72e59c3

File tree

1 file changed

+61
-0
lines changed

1 file changed

+61
-0
lines changed

drivers/xen/pvcalls-back.c

Lines changed: 61 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,61 @@
1+
/*
2+
* (c) 2017 Stefano Stabellini <[email protected]>
3+
*
4+
* This program is free software; you can redistribute it and/or modify
5+
* it under the terms of the GNU General Public License as published by
6+
* the Free Software Foundation; either version 2 of the License, or
7+
* (at your option) any later version.
8+
*
9+
* This program is distributed in the hope that it will be useful,
10+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
11+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12+
* GNU General Public License for more details.
13+
*/
14+
15+
#include <linux/kthread.h>
16+
#include <linux/list.h>
17+
#include <linux/radix-tree.h>
18+
#include <linux/module.h>
19+
#include <linux/semaphore.h>
20+
#include <linux/wait.h>
21+
22+
#include <xen/events.h>
23+
#include <xen/grant_table.h>
24+
#include <xen/xen.h>
25+
#include <xen/xenbus.h>
26+
#include <xen/interface/io/pvcalls.h>
27+
28+
static int pvcalls_back_probe(struct xenbus_device *dev,
29+
const struct xenbus_device_id *id)
30+
{
31+
return 0;
32+
}
33+
34+
static void pvcalls_back_changed(struct xenbus_device *dev,
35+
enum xenbus_state frontend_state)
36+
{
37+
}
38+
39+
static int pvcalls_back_remove(struct xenbus_device *dev)
40+
{
41+
return 0;
42+
}
43+
44+
static int pvcalls_back_uevent(struct xenbus_device *xdev,
45+
struct kobj_uevent_env *env)
46+
{
47+
return 0;
48+
}
49+
50+
static const struct xenbus_device_id pvcalls_back_ids[] = {
51+
{ "pvcalls" },
52+
{ "" }
53+
};
54+
55+
static struct xenbus_driver pvcalls_back_driver = {
56+
.ids = pvcalls_back_ids,
57+
.probe = pvcalls_back_probe,
58+
.remove = pvcalls_back_remove,
59+
.uevent = pvcalls_back_uevent,
60+
.otherend_changed = pvcalls_back_changed,
61+
};

0 commit comments

Comments
 (0)