From: Emil Condrea <emilcondrea@gmail.com>
To: qemu-devel@nongnu.org
Cc: xuquan8@huawei.com, anthony.perard@citrix.com,
wei.liu2@citrix.com, stefanb@linux.vnet.ibm.com,
sstabellini@kernel.org, xen-devel@lists.xen.org,
dgdegra@tycho.nsa.gov, eblake@redhat.com,
Emil Condrea <emilcondrea@gmail.com>
Subject: [Qemu-devel] [PATCH 06/15] xen: Move evtchn functions to xen_pvdev.c
Date: Tue, 4 Oct 2016 09:43:35 +0300 [thread overview]
Message-ID: <1475563424-6604-7-git-send-email-emilcondrea@gmail.com> (raw)
In-Reply-To: <1475563424-6604-1-git-send-email-emilcondrea@gmail.com>
The name of the functions moved:
* xen_be_evtchn_event
* xen_be_unbind_evtchn
* xen_be_send_notify
Signed-off-by: Emil Condrea <emilcondrea@gmail.com>
---
hw/xen/xen_backend.c | 35 -----------------------------------
hw/xen/xen_pvdev.c | 35 +++++++++++++++++++++++++++++++++++
include/hw/xen/xen_backend.h | 2 --
include/hw/xen/xen_pvdev.h | 4 ++++
4 files changed, 39 insertions(+), 37 deletions(-)
diff --git a/hw/xen/xen_backend.c b/hw/xen/xen_backend.c
index 6b03c50..c7db068 100644
--- a/hw/xen/xen_backend.c
+++ b/hw/xen/xen_backend.c
@@ -543,25 +543,6 @@ void xenstore_update_be(char *watch, char *type, int dom,
}
}
-static void xen_be_evtchn_event(void *opaque)
-{
- struct XenDevice *xendev = opaque;
- evtchn_port_t port;
-
- port = xenevtchn_pending(xendev->evtchndev);
- if (port != xendev->local_port) {
- xen_be_printf(xendev, 0,
- "xenevtchn_pending returned %d (expected %d)\n",
- port, xendev->local_port);
- return;
- }
- xenevtchn_unmask(xendev->evtchndev, port);
-
- if (xendev->ops->event) {
- xendev->ops->event(xendev);
- }
-}
-
/* -------------------------------------------------------------------- */
int xen_be_init(void)
@@ -638,22 +619,6 @@ int xen_be_bind_evtchn(struct XenDevice *xendev)
return 0;
}
-void xen_be_unbind_evtchn(struct XenDevice *xendev)
-{
- if (xendev->local_port == -1) {
- return;
- }
- qemu_set_fd_handler(xenevtchn_fd(xendev->evtchndev), NULL, NULL, NULL);
- xenevtchn_unbind(xendev->evtchndev, xendev->local_port);
- xen_be_printf(xendev, 2, "unbind evtchn port %d\n", xendev->local_port);
- xendev->local_port = -1;
-}
-
-int xen_be_send_notify(struct XenDevice *xendev)
-{
- return xenevtchn_notify(xendev->evtchndev, xendev->local_port);
-}
-
static int xen_sysdev_init(SysBusDevice *dev)
{
diff --git a/hw/xen/xen_pvdev.c b/hw/xen/xen_pvdev.c
index 35d3be6..91101fd 100644
--- a/hw/xen/xen_pvdev.c
+++ b/hw/xen/xen_pvdev.c
@@ -172,3 +172,38 @@ void xen_be_printf(struct XenDevice *xendev, int msg_level,
}
qemu_log_flush();
}
+
+void xen_be_evtchn_event(void *opaque)
+{
+ struct XenDevice *xendev = opaque;
+ evtchn_port_t port;
+
+ port = xenevtchn_pending(xendev->evtchndev);
+ if (port != xendev->local_port) {
+ xen_be_printf(xendev, 0,
+ "xenevtchn_pending returned %d (expected %d)\n",
+ port, xendev->local_port);
+ return;
+ }
+ xenevtchn_unmask(xendev->evtchndev, port);
+
+ if (xendev->ops->event) {
+ xendev->ops->event(xendev);
+ }
+}
+
+void xen_be_unbind_evtchn(struct XenDevice *xendev)
+{
+ if (xendev->local_port == -1) {
+ return;
+ }
+ qemu_set_fd_handler(xenevtchn_fd(xendev->evtchndev), NULL, NULL, NULL);
+ xenevtchn_unbind(xendev->evtchndev, xendev->local_port);
+ xen_be_printf(xendev, 2, "unbind evtchn port %d\n", xendev->local_port);
+ xendev->local_port = -1;
+}
+
+int xen_be_send_notify(struct XenDevice *xendev)
+{
+ return xenevtchn_notify(xendev->evtchndev, xendev->local_port);
+}
diff --git a/include/hw/xen/xen_backend.h b/include/hw/xen/xen_backend.h
index 965a39a..d0dbee5 100644
--- a/include/hw/xen/xen_backend.h
+++ b/include/hw/xen/xen_backend.h
@@ -31,8 +31,6 @@ void xen_be_register_common(void);
int xen_be_register(const char *type, struct XenDevOps *ops);
int xen_be_set_state(struct XenDevice *xendev, enum xenbus_state state);
int xen_be_bind_evtchn(struct XenDevice *xendev);
-void xen_be_unbind_evtchn(struct XenDevice *xendev);
-int xen_be_send_notify(struct XenDevice *xendev);
/* actual backend drivers */
extern struct XenDevOps xen_console_ops; /* xen_console.c */
diff --git a/include/hw/xen/xen_pvdev.h b/include/hw/xen/xen_pvdev.h
index 3a9a4a4..cf44a87 100644
--- a/include/hw/xen/xen_pvdev.h
+++ b/include/hw/xen/xen_pvdev.h
@@ -64,6 +64,10 @@ void xenstore_update(void *unused);
const char *xenbus_strstate(enum xenbus_state state);
+void xen_be_evtchn_event(void *opaque);
+void xen_be_unbind_evtchn(struct XenDevice *xendev);
+int xen_be_send_notify(struct XenDevice *xendev);
+
void xen_be_printf(struct XenDevice *xendev, int msg_level,
const char *fmt, ...) GCC_FMT_ATTR(3, 4);
--
1.9.1
next prev parent reply other threads:[~2016-10-04 6:44 UTC|newest]
Thread overview: 43+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-10-04 6:43 [Qemu-devel] [PATCH 00/15] Refactor common part of xen backend and frontend Emil Condrea
2016-10-04 6:43 ` [Qemu-devel] [PATCH 01/15] xen: Fix coding style errors Emil Condrea
2016-10-11 13:56 ` Anthony PERARD
2016-10-13 3:48 ` Emil Condrea
2016-10-04 6:43 ` [Qemu-devel] [PATCH 02/15] xen: Fix coding style warnings Emil Condrea
2016-10-11 14:20 ` Anthony PERARD
2016-10-13 4:04 ` Emil Condrea
2016-10-13 11:35 ` Anthony PERARD
2016-10-13 15:59 ` Emil Condrea
2016-10-04 6:43 ` [Qemu-devel] [PATCH 03/15] xen: Create a new file xen_pvdev.c Emil Condrea
2016-10-11 14:38 ` Anthony PERARD
2016-10-04 6:43 ` [Qemu-devel] [PATCH 04/15] xen: Create a new file xen_frontend.c Emil Condrea
2016-10-12 13:30 ` Anthony PERARD
2016-10-04 6:43 ` [Qemu-devel] [PATCH 05/15] xen: Move xenstore_update to xen_pvdev.c Emil Condrea
2016-10-04 6:43 ` Emil Condrea [this message]
2016-10-04 6:43 ` [Qemu-devel] [PATCH 07/15] xen: Prepare xendev qtail to be shared with frontends Emil Condrea
2016-10-04 6:43 ` [Qemu-devel] [PATCH 08/15] xen: Move xenstore cleanup and mkdir functions Emil Condrea
2016-10-12 13:30 ` Anthony PERARD
2016-10-04 6:43 ` [Qemu-devel] [PATCH 09/15] xen: Rename xen_be_printf to xen_pv_printf Emil Condrea
2016-10-12 13:31 ` Anthony PERARD
2016-10-04 6:43 ` [Qemu-devel] [PATCH 10/15] xen: Rename xen_be_unbind_evtchn Emil Condrea
2016-10-12 13:37 ` Anthony PERARD
2016-10-13 1:44 ` Xuquan (Quan Xu)
2016-10-04 6:43 ` [Qemu-devel] [PATCH 11/15] xen: Rename xen_be_send_notify Emil Condrea
2016-10-12 13:40 ` Anthony PERARD
2016-10-13 1:45 ` Xuquan (Quan Xu)
2016-10-04 6:43 ` [Qemu-devel] [PATCH 12/15] xen: Rename xen_be_evtchn_event Emil Condrea
2016-10-12 13:41 ` Anthony PERARD
2016-10-13 1:46 ` Xuquan (Quan Xu)
2016-10-04 6:43 ` [Qemu-devel] [PATCH 13/15] xen: Rename xen_be_find_xendev Emil Condrea
2016-10-12 13:42 ` Anthony PERARD
2016-10-13 1:46 ` Xuquan (Quan Xu)
2016-10-04 6:43 ` [Qemu-devel] [PATCH 14/15] xen: Rename xen_be_del_xendev Emil Condrea
2016-10-12 13:46 ` Anthony PERARD
2016-10-13 1:47 ` Xuquan (Quan Xu)
2016-10-04 6:43 ` [Qemu-devel] [PATCH 15/15] xen: Rename xen_be_frontend_changed Emil Condrea
2016-10-04 8:06 ` Paolo Bonzini
2016-10-04 8:08 ` Paolo Bonzini
2016-10-09 19:50 ` Emil Condrea
2016-10-12 11:00 ` Paolo Bonzini
2016-10-13 6:08 ` Emil Condrea
2016-10-13 6:32 ` Xuquan (Quan Xu)
2016-10-13 8:27 ` Paolo Bonzini
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1475563424-6604-7-git-send-email-emilcondrea@gmail.com \
--to=emilcondrea@gmail.com \
--cc=anthony.perard@citrix.com \
--cc=dgdegra@tycho.nsa.gov \
--cc=eblake@redhat.com \
--cc=qemu-devel@nongnu.org \
--cc=sstabellini@kernel.org \
--cc=stefanb@linux.vnet.ibm.com \
--cc=wei.liu2@citrix.com \
--cc=xen-devel@lists.xen.org \
--cc=xuquan8@huawei.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).