acrn-hypervisor/devicemodel/include
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
..
public dm: add IOCTL command to get platform information 2019-04-18 15:02:48 +08:00
acpi.h dm: disable ACPI PM timer 2019-04-16 15:03:04 +08:00
acpi_hpet.h dm: vhpet: add HPET-related header files 2019-01-23 10:33:28 +08:00
ahci.h initial import 2018-05-11 14:44:28 +08:00
ata.h initial import 2018-05-11 14:44:28 +08:00
atkbdc.h DM: add deinit function to virtual keyboard device 2018-05-15 17:25:24 +08:00
atomic.h DM: add wrappers to gcc built-in atomic operations 2018-08-08 15:53:07 +08:00
att_keybox.h DM: Attestation Keybox support in SOS DM 2019-02-25 16:40:25 +08:00
block_if.h dm: virtio-block: extend the max iov number of virtio block 2019-04-16 15:03:04 +08:00
console.h DM: add deinit function for ps2kbd and ps2mouse 2018-05-15 17:25:24 +08:00
cpuset.h initial import 2018-05-11 14:44:28 +08:00
dm.h DM: Add new parameter --rtvm for soft/hard real-time guest 2019-04-04 00:27:55 +08:00
dm_string.h doc: replace return with retval 2018-11-30 14:55:17 +08:00
gc.h initial import 2018-05-11 14:44:28 +08:00
gpio_dm.h DM: virtio-gpio: implement GPIO operations via accessing PIO 2019-04-08 10:51:49 +08:00
hpet.h dm: vhpet: add HPET-related header files 2019-01-23 10:33:28 +08:00
i8253reg.h dm: vpit: add PIT-related header files 2018-10-09 13:24:47 +08:00
inout.h dm: completely remove enable_bar()/disable_bar() functions 2019-04-22 15:18:21 +08:00
ioapic.h DM: increase vioapic pin count 2018-05-16 15:09:48 +08:00
ioc.h IOC mediator: dynamically enable dummy channels 2019-02-01 16:05:43 +08:00
iodev.h initial import 2018-05-11 14:44:28 +08:00
irq.h initial import 2018-05-11 14:44:28 +08:00
log.h DM: add logger setting parser function 2019-05-05 19:13:07 +08:00
lpc.h initial import 2018-05-11 14:44:28 +08:00
macros.h dm: vpit: add vPIT support 2018-10-09 13:24:47 +08:00
mc146818rtc.h initial import 2018-05-11 14:44:28 +08:00
mei.h dm: mei: add mei hbm protocol definitions header. 2018-10-23 11:40:15 +08:00
mem.h dm: completely remove enable_bar()/disable_bar() functions 2019-04-22 15:18:21 +08:00
mevent.h dm: enhence the mevent API 2018-12-07 20:21:33 +08:00
monitor.h DM: Virtio-Blk Rescan 2019-05-07 09:08:50 +08:00
mptable.h initial import 2018-05-11 14:44:28 +08:00
mptbl.h initial import 2018-05-11 14:44:28 +08:00
netmap.h initial import 2018-05-11 14:44:28 +08:00
netmap_user.h initial import 2018-05-11 14:44:28 +08:00
npk.h DM: implement emulated npk pci device 2018-06-07 16:11:49 +08:00
ns16550.h initial import 2018-05-11 14:44:28 +08:00
pci_core.h DM: Virtio-Blk Rescan 2019-05-07 09:08:50 +08:00
pciio.h initial import 2018-05-11 14:44:28 +08:00
pcireg.h dm: Disable stolen memory for passthru graphics 2018-06-29 00:50:01 +08:00
pit.h dm: vpit: add PIT-related header files 2018-10-09 13:24:47 +08:00
pm.h DM: register pm ops to monitor 2018-08-02 13:14:03 +08:00
ps2kbd.h DM: add deinit function for ps2kbd and ps2mouse 2018-05-15 17:25:24 +08:00
ps2mouse.h DM: add deinit function for ps2kbd and ps2mouse 2018-05-15 17:25:24 +08:00
rpmb.h dm: rpmb: DM customized changes for RPMB mux kernel module 2018-10-19 22:31:28 +08:00
rpmb_backend.h DM: RPMB virtualization 2018-05-25 10:45:24 +08:00
rpmb_sim.h dm: inline functions defined in header must be static 2018-10-11 19:04:18 +08:00
rtc.h dm: vrtc: add memory configuration in RTC CMOS 2018-10-05 00:33:17 +08:00
segments.h initial import 2018-05-11 14:44:28 +08:00
specialreg.h initial import 2018-05-11 14:44:28 +08:00
sw_load.h dm: remove empty UOS E820 entries 2019-03-21 10:28:17 +08:00
timer.h dm: vhpet: add vHPET support 2019-01-23 10:33:28 +08:00
tpm.h DM: Add support for virtual TPM enabling 2018-11-29 09:19:16 +08:00
tree.h dm: clean up mem.c 2019-03-21 10:28:17 +08:00
types.h DM: use soft link of acrn_common.h in HV 2019-03-26 21:23:16 +08:00
uart_core.h dm: refine the uart_core 2018-12-27 09:58:20 +08:00
usb.h DM USB: move the UREQ macro into common header 2018-05-29 10:35:05 +08:00
usb_core.h DM USB: xHCI: WA for an isochronous crash issue 2019-04-10 17:54:34 +08:00
usb_pmapper.h DM USB: fix memory leak during reboot 2019-04-04 18:35:02 +08:00
usbdi.h initial import 2018-05-11 14:44:28 +08:00
vbs_common_if.h dm: virtio: add support for VBS-K device reset 2018-08-16 16:22:43 +08:00
vhost.h dm: vhost: remove support for non-msix devices 2018-12-14 19:49:55 +08:00
virtio.h dm: virtio: change return type to bool 2019-04-04 00:27:10 +08:00
virtio_kernel.h doc: update virtio related functions doc comments 2018-11-04 20:32:50 -08:00
vmcfg.h DM: VMcfg: support --dump options 2018-10-22 16:57:23 +08:00
vmm.h DM: adapt to the new VHM request state transitions 2018-08-08 15:53:07 +08:00
vmmapi.h acrn-dm: Pass vbdf and pbdf info to vm_reset_ptdev_intx_info 2019-04-29 17:04:02 +08:00
vrpmb.h DM: Generate vRPMB key when creating UOS 2018-05-25 10:45:24 +08:00
xhci.h HV/DM: Unify the usage of aligned for structure definition with alignment 2018-12-20 14:08:28 +08:00
xhcireg.h DM USB: xHCI: Update the native DRD interfaces. 2018-07-10 13:42:17 +08:00