]> git.proxmox.com Git - mirror_qemu.git/commit
xen: add event channel interface for XenDevice-s
authorPaul Durrant <paul.durrant@citrix.com>
Tue, 8 Jan 2019 14:48:52 +0000 (14:48 +0000)
committerAnthony PERARD <anthony.perard@citrix.com>
Mon, 14 Jan 2019 13:45:40 +0000 (13:45 +0000)
commita3d669c8bd1a93ad588d4dce5c70ea6405fa9bb9
tree196905ed7a9eb35b1b4d0f4303216126226550a8
parent4b34b5b14054edded15888448b0aad3723b99c29
xen: add event channel interface for XenDevice-s

The legacy PV backend infrastructure provides functions to bind, unbind
and send notifications to event channnels. Similar functionality will be
required by XenDevice implementations so this patch adds the necessary
support.

Signed-off-by: Paul Durrant <paul.durrant@citrix.com>
Reviewed-by: Anthony Perard <anthony.perard@citrix.com>
Signed-off-by: Anthony PERARD <anthony.perard@citrix.com>
Patch squashed with:

Patch "xen: add event channel interface for XenDevice-s" makes use of
the type xenevtchn_port_or_error_t, but this isn't avaiable before Xen
4.7. Also the function xen_device_bind_event_channel assign the return
value of xenevtchn_bind_interdomain to channel->local_port but check the
result for error with xendev->local_port.

Fix by:
- removing local_port from struct XenDevice as it isn't use anywere.
- adding a compatibility typedef for xenevtchn_port_or_error_t for Xen
  4.6 and earlier.

As extra, replace the type of XenEventChannel->local_port by
evtchn_port_t.

Signed-off-by: Anthony PERARD <anthony.perard@citrix.com>
Reviewed-by: Paul Durrant <paul.durrant@citrix.com>
hw/xen/xen-bus.c
include/hw/xen/xen-bus.h
include/hw/xen/xen_common.h