]> xenbits.xensource.com Git - people/pauldu/qemu.git/commit
xen: introduce 'xen-block', 'xen-disk' and 'xen-cdrom'
authorPaul Durrant <paul.durrant@citrix.com>
Tue, 1 May 2018 14:45:58 +0000 (15:45 +0100)
committerPaul Durrant <paul.durrant@citrix.com>
Tue, 11 Dec 2018 09:56:15 +0000 (09:56 +0000)
commit8ade8f8650201ebe3ac4e98361ea424c2564bbb4
tree502bdafff195afcd8b8cb2329621d8e8f6305a22
parentb1560795fa785f4225bbc542195957f6e5a586ab
xen: introduce 'xen-block', 'xen-disk' and 'xen-cdrom'

This patch adds new XenDevice-s: 'xen-disk' and 'xen-cdrom', both derived
from a common 'xen-block' parent type. These will eventually replace the
'xen_disk' (note the underscore rather than hyphen) legacy PV backend but
it is illustrative to build up the implementation incrementally, along with
the XenBus/XenDevice framework. Subsequent patches will therefore add to
these devices' implementation as new features are added to the framework.

After this patch has been applied it is possible to instantiate new
'xen-disk' or 'xen-cdrom' devices with a single 'vdev' parameter, which
accepts values adhering to the Xen VBD naming scheme [1]. For example, a
command-line instantiation of a xen-disk can be done with an argument
similar to the following:

-device xen-disk,vdev=hda

The implementation of the vdev parameter formulates the appropriate VBD
number for use in the PV protocol.

[1] https://xenbits.xen.org/docs/unstable/man/xen-vbd-interface.7.html

Signed-off-by: Paul Durrant <paul.durrant@citrix.com>
---
Cc: Kevin Wolf <kwolf@redhat.com>
Cc: Max Reitz <mreitz@redhat.com>
Cc: Stefano Stabellini <sstabellini@kernel.org>
Cc: Anthony Perard <anthony.perard@citrix.com>
v3:
 - Fix vdev parsing again, and vdev formatting this time
 - Remove an unnecessary local_err

v2:
 - Fix boilerplate
 - Fix vdev parsing
 - Change name from 'xen-qdisk' to 'xen-block', make abstract, and split
   off 'xen-disk' and 'xen-cdrom' as concrete sub-types
MAINTAINERS
hw/block/Makefile.objs
hw/block/trace-events
hw/block/xen-block.c [new file with mode: 0644]
include/hw/xen/xen-block.h [new file with mode: 0644]