cloud-hypervisor/vm-virtio/src
Sebastien Boeuf 02bd50f6ab vm-virtio: Add helper to set the configuration BAR value
From a VirtioPciDevice perspective, there are two types of BARs, either
the virtio configuration BAR or the SHaredMemory BAR.

The SHaredMemory BAR address comes from the virtio device directly as
the memory region had been previously allocated when the virtio device
has been created. So for this BAR, there's nothing to do when restoring
a VM, since the associated virtio device is already restored with the
appropriate resources, hence the BAR will already be at the right
address.

The remaining configuration BAR is different, as we usually get its
address from the SystemAllocator. This means in case we restore a VM,
we must provide this value, bypassing the allocator. This is what this
commit takes care of, by letting the caller set the base address for the
configuration BAR prior to allocating the BARs.

Signed-off-by: Sebastien Boeuf <sebastien.boeuf@intel.com>
2020-05-12 17:37:31 +01:00
..
transport vm-virtio: Add helper to set the configuration BAR value 2020-05-12 17:37:31 +01:00
vhost_user vm-virtio: vhost-user-net: Expect an identifier upon device creation 2020-04-29 19:34:31 +01:00
vsock vm-virtio, vmm: Delete unix socket on shutdown 2020-05-05 13:01:38 +02:00
block.rs vm-virtio: blk: Expect an identifier upon device creation 2020-04-29 19:34:31 +01:00
console.rs vm-virtio: console: Expect an identifier upon device creation 2020-04-29 19:34:31 +01:00
device.rs vm-virtio: Get userspace mappings from VirtioDevice 2020-04-21 10:02:21 +01:00
iommu.rs vm-virtio: iommu: Expect an identifier upon device creation 2020-04-29 19:34:31 +01:00
lib.rs virtio-mem: Return reize error in MemEpollHandler.run 2020-05-03 10:21:49 +01:00
mem.rs virtio-mem: Return reize error in MemEpollHandler.run 2020-05-03 10:21:49 +01:00
net_util.rs vm-virtio: Implement the Snapshottable trait for Net 2020-04-21 21:25:03 +02:00
net.rs vm-virtio: net: Expect an identifier upon device creation 2020-04-29 19:34:31 +01:00
pmem.rs vm-virtio: pmem: Expect an identifier upon device creation 2020-04-29 19:34:31 +01:00
queue.rs vm-virtio: Correctly reset the virtqueues 2020-05-08 11:31:50 +01:00
rng.rs vm-virtio: rng: Expect an identifier upon device creation 2020-04-29 19:34:31 +01:00