Message ID | 1468151270-12984-5-git-send-email-emilcondrea@gmail.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
On Sun, Jul 10, 2016 at 02:47:35PM +0300, Emil Condrea wrote: > 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 | 37 +------------------------------------ > hw/xen/xen_pvdev.c | 35 +++++++++++++++++++++++++++++++++++ > include/hw/xen/xen_backend.h | 2 -- > include/hw/xen/xen_pvdev.h | 4 ++++ > 4 files changed, 40 insertions(+), 38 deletions(-) > > diff --git a/hw/xen/xen_backend.c b/hw/xen/xen_backend.c > index 0a9f9bb..5f2821a 100644 > --- a/hw/xen/xen_backend.c > +++ b/hw/xen/xen_backend.c > @@ -693,4 +658,4 @@ static void xenbe_register_types(void) > type_register_static(&xensysdev_info); > } > > -type_init(xenbe_register_types); > +type_init(xenbe_register_types); > \ No newline at end of file Looks like this change does not belong to this patch.
On 07/25/2016 07:53 AM, Anthony PERARD wrote: > On Sun, Jul 10, 2016 at 02:47:35PM +0300, Emil Condrea wrote: >> 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 | 37 +------------------------------------ >> hw/xen/xen_pvdev.c | 35 +++++++++++++++++++++++++++++++++++ >> include/hw/xen/xen_backend.h | 2 -- >> include/hw/xen/xen_pvdev.h | 4 ++++ >> 4 files changed, 40 insertions(+), 38 deletions(-) >> >> diff --git a/hw/xen/xen_backend.c b/hw/xen/xen_backend.c >> index 0a9f9bb..5f2821a 100644 >> --- a/hw/xen/xen_backend.c >> +++ b/hw/xen/xen_backend.c >> @@ -693,4 +658,4 @@ static void xenbe_register_types(void) >> type_register_static(&xensysdev_info); >> } >> >> -type_init(xenbe_register_types); >> +type_init(xenbe_register_types); >> \ No newline at end of file > > Looks like this change does not belong to this patch. For that matter, we prefer that all text files in qemu.git end in a newline (since according to POSIX, a non-empty file that does not end in newline is not a text file).
On Mon, Jul 25, 2016 at 4:53 PM, Anthony PERARD <anthony.perard@citrix.com> wrote: > On Sun, Jul 10, 2016 at 02:47:35PM +0300, Emil Condrea wrote: > > 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 | 37 +------------------------------------ > > hw/xen/xen_pvdev.c | 35 +++++++++++++++++++++++++++++++++++ > > include/hw/xen/xen_backend.h | 2 -- > > include/hw/xen/xen_pvdev.h | 4 ++++ > > 4 files changed, 40 insertions(+), 38 deletions(-) > > > > diff --git a/hw/xen/xen_backend.c b/hw/xen/xen_backend.c > > index 0a9f9bb..5f2821a 100644 > > --- a/hw/xen/xen_backend.c > > +++ b/hw/xen/xen_backend.c > > @@ -693,4 +658,4 @@ static void xenbe_register_types(void) > > type_register_static(&xensysdev_info); > > } > > > > -type_init(xenbe_register_types); > > +type_init(xenbe_register_types); > > \ No newline at end of file > > Looks like this change does not belong to this patch. > Will fix this in v10. > > -- > Anthony PERARD >
diff --git a/hw/xen/xen_backend.c b/hw/xen/xen_backend.c index 0a9f9bb..5f2821a 100644 --- a/hw/xen/xen_backend.c +++ b/hw/xen/xen_backend.c @@ -561,25 +561,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) @@ -646,22 +627,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) { @@ -693,4 +658,4 @@ static void xenbe_register_types(void) type_register_static(&xensysdev_info); } -type_init(xenbe_register_types); +type_init(xenbe_register_types); \ No newline at end of file diff --git a/hw/xen/xen_pvdev.c b/hw/xen/xen_pvdev.c index 001fda2..7876724 100644 --- a/hw/xen/xen_pvdev.c +++ b/hw/xen/xen_pvdev.c @@ -171,3 +171,38 @@ void xen_be_printf(struct XenDevice *xendev, int msg_level, const char *fmt, ... } 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 4832f79..60b634e 100644 --- a/include/hw/xen/xen_backend.h +++ b/include/hw/xen/xen_backend.h @@ -29,8 +29,6 @@ int xen_be_init(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 cc49636..f269b04 100644 --- a/include/hw/xen/xen_pvdev.h +++ b/include/hw/xen/xen_pvdev.h @@ -66,6 +66,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);
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 | 37 +------------------------------------ hw/xen/xen_pvdev.c | 35 +++++++++++++++++++++++++++++++++++ include/hw/xen/xen_backend.h | 2 -- include/hw/xen/xen_pvdev.h | 4 ++++ 4 files changed, 40 insertions(+), 38 deletions(-)