xen: add implementations of xen-block connect and disconnect functions...
...and wire in the dataplane.
This patch adds the remaining code to make the xen-block XenDevice
functional. The parameters that a block frontend expects to find are
populated in the backend xenstore area, and the 'ring-ref' and
'event-channel' values specified in the frontend xenstore area are
mapped/bound and used to set up the dataplane.
Signed-off-by: Paul Durrant <paul.durrant@citrix.com>
--- Cc: Stefano Stabellini <sstabellini@kernel.org> Cc: Anthony Perard <anthony.perard@citrix.com> Cc: Kevin Wolf <kwolf@redhat.com> Cc: Max Reitz <mreitz@redhat.com>
v3:
- Add missing return statement to xen_block_realize()
- Set device name to 'vbd' now the backend is functional
- Add an unplug handler
- Move backend watch code from subsequent patch since it's now needed
to handle unplug
v2:
- Tidy up header inclusions
- Stop leaking ring_ref on error
- Auto-create drive for CDRom devices