mirror of
https://github.com/xen-project/xen.git
synced 2026-10-28 02:01:24 +01:00
With a device model stubdom, dom0 exports a PV disk to the stubdom. Inside the stubdom, QEMU emulates a cdrom to the guest with a host_device pointing at the PV frontend (/dev/xvdc) An empty cdrom drive causes problems booting the stubdom. The PV disk protocol isn't designed to support no media. That can be partially hacked around, but the stubdom kernel waits for all block devices to transition to Connected. Since the backend never connects empty media, stubdom launch times out and it is destroyed. Empty media and the PV disks not connecting is fine at runtime since the stubdom keeps running irrespective of the disk state. Empty media can be worked around my providing an empty file to the stubdom for the PV disk source. This works as the disk is exposed as a zero-size disk. Dynamically create the empty file as needed and remove in the stubdom cleanup. libxl__device_disk_set_backend() needs to allow through these "empty" disks with a pdev_path. Fixup the params writing since scripts have trouble with an empty params field. This works for non-stubdom HVMs as well. Signed-off-by: Jason Andryuk <jandryuk@gmail.com> Reviewed-by: Anthony PERARD <anthony.perard@citrix.com>