]> www.infradead.org Git - users/dwmw2/qemu.git/commit
xen: create xenstore areas for XenDevice-s
authorPaul Durrant <paul.durrant@citrix.com>
Tue, 8 Jan 2019 14:48:49 +0000 (14:48 +0000)
committerAnthony PERARD <anthony.perard@citrix.com>
Mon, 14 Jan 2019 13:45:40 +0000 (13:45 +0000)
commit094a22399f1b3e796727fc7e584c7a1f2beca24b
tree0847863e115f47588149d2cba3f049d0f1ede2e9
parent1a72d9ae31517b2f83ec7923c820daf1887fde50
xen: create xenstore areas for XenDevice-s

This patch adds a new source module, xen-bus-helper.c, which builds on
basic libxenstore primitives to provide functions to create (setting
permissions appropriately) and destroy xenstore areas, and functions to
'printf' and 'scanf' nodes therein. The main xen-bus code then uses
these primitives [1] to initialize and destroy the frontend and backend
areas for a XenDevice during realize and unrealize respectively.

The 'xen-block' implementation is extended with a 'get_name' method that
returns the VBD number. This number is required to 'name' the xenstore
areas.

NOTE: An exit handler is also added to make sure the xenstore areas are
      cleaned up if QEMU terminates without devices being unrealized.

[1] The 'scanf' functions are actually not yet needed, but they will be
    needed by code delivered in subsequent patches.

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>
hw/block/xen-block.c
hw/xen/Makefile.objs
hw/xen/trace-events
hw/xen/xen-bus-helper.c [new file with mode: 0644]
hw/xen/xen-bus.c
include/hw/xen/xen-bus-helper.h [new file with mode: 0644]
include/hw/xen/xen-bus.h