acrn-hypervisor/devicemodel/hw/pci
Vijay Dhanraj 71b56e0eed DM: Virtio-Blk Rescan
This patch adds support to trigger rescan of virtio-blk device by the
guest VM. This is an alternate to hot-plugging virtio-blk device.
This feature stems from the kata requirement, which hot-plugs container
rootfs after the VM is launched.

As part of virtio-blk rescan,
1. Update the backing file for the virtio-blk device with valid file.
   Basically update the empty file (with dummy bctxt) that was passed
   during VM launch.
2. Update virtio-blk device configurations for udpated backing file.
3. Update size associated with valid backing file in the config space.
4. Notify guest OS, of the new config change.
5. On this notification, guest will do the following.
	(i). Update virtio-blk capacity.
 	(ii). Revalidate the disk.
 	(iii). Identify the newly plugged block device.

v5 -> v6:
- Removed use of dummy file and added a new parameter "nodisk"
  to virtio-blk which indicates user wants to create a virtio-blk
  device with dummy backend.
- Moved vm_monitor_rescan from pci core to virtio-blk as it currently
  applies to only virtio-blk.

v4 -> v5:
- Reverted back logic, so that blkrescan is only supported when
  VM is launched with empty backend file.

v3 -> v4:
- Close block context before allocating a new one
- Allow backend filepath  with additional options to be more generic
- Remove blank lines introduced as part of previous patches.

v2 -> v3:
- Renamed vdev ops vdev_blk rescan to vdev_rescan
- Renamed montior ops virtio_blkrescan_ops to virtio_rescan_ops
- Consolidated virtio-blk configuration specific part into
  a separate function
- Removed size requirement in acrnctl command.

v1 -> v2:
- Added more comments in the code.
- Renamed APIs from displug to blkrescan, inline with acrnctl cmd.
- Split the patch into two. This corresponds to changes in acrn-dm.

Tracked-On: #3051
Signed-off-by: Vijay Dhanraj <vijay.dhanraj@intel.com>
Acked-by: Yu Wang <yu1.wang@intel.com>
2019-05-07 09:08:50 +08:00
..
virtio DM: Virtio-Blk Rescan 2019-05-07 09:08:50 +08:00
ahci.c dm: storage: rename delete to discard 2018-12-18 13:21:07 +08:00
core.c DM: Virtio-Blk Rescan 2019-05-07 09:08:50 +08:00
gsi_sharing.c dm: hw: Replace sscanf with permitted string API 2018-12-17 19:17:29 +08:00
gvt.c acrn/dm: gvt returns negative errno to terminate the initialization 2019-04-25 15:11:10 +08:00
hostbridge.c DM: cleanup for header inclusions 2018-06-07 14:35:30 +08:00
irq.c DM: wrap ASSERT/DEASSERT IRQ line with Set/Clear IRQ line 2018-10-29 09:26:23 +08:00
lpc.c dm: refine the uart_core 2018-12-27 09:58:20 +08:00
npk.c dm: Fix some issues from string operations 2018-12-25 18:40:04 +08:00
passthrough.c acrn-dm: Pass vbdf and pbdf info to vm_reset_ptdev_intx_info 2019-04-29 17:04:02 +08:00
platform_gsi_info.c DM: update GSI sharing info 2018-08-09 15:42:51 +08:00
uart.c dm: refine the uart_core 2018-12-27 09:58:20 +08:00
wdt_i6300esb.c acrn-dm: enable debug option for acrn-dm 2019-04-16 15:24:25 +08:00
xhci.c DM USB: xHCI: refine the failure process logic of control transfer 2019-04-11 20:05:20 +08:00