cloud-hypervisor/vm-virtio/src
Jose Carlos Venegas Munoz 3eaeba4b55 vm-virtio: Fix FS_IO callback for virtio-fs
FS_IO is part of the actions a vhost-user-fs daemon can ask the VMM to
perform on its behalf. It is meant to read/write the content from a file
descriptor directly into a guest memory region. This region can either
be a RAM region or the dedicated cache region for virtio-fs.

The way FS_IO was implemented, it was only expecting the guest physical
address provided through the "cache_offset" field to refer to the cache
region. Unfortunately, this was only implementing FS_IO partially.

This patch extends the existing FS_IO implementation by checking the GPA
against the cache region as a first step, but if it is not part of the
cache region address range, then we fallback onto searching for a RAM
region that could match. If there is a matching RAM region, we retrieve
the corresponding host address to let the VMM read/write from/to it.

Fixes: #1054

Signed-off-by: Sebastien Boeuf <sebastien.boeuf@intel.com>
Signed-off-by: Jose Carlos Venegas Munoz <jose.carlos.venegas.munoz@intel.com>
2020-04-23 15:01:28 +01:00
..
transport vm-virtio: Restore queues based on used index 2020-04-21 21:25:03 +02:00
vhost_user vm-virtio: Fix FS_IO callback for virtio-fs 2020-04-23 15:01:28 +01:00
vsock vm-migration: Define the Snapshottable and Transportable traits 2020-04-02 13:24:25 +01:00
block.rs vm-virtio: Implement the Snapshottable trait for Block 2020-04-17 19:29:41 +02:00
console.rs vm-virtio: Implement Snapshottable trait for Console 2020-04-22 14:45:16 +02:00
device.rs vm-virtio: Get userspace mappings from VirtioDevice 2020-04-21 10:02:21 +01:00
iommu.rs vm-migration: Define the Snapshottable and Transportable traits 2020-04-02 13:24:25 +01:00
lib.rs vmm: Update KVM userspace mapping when PCI BAR remapping 2020-04-20 16:01:25 +02:00
mem.rs vmm: Cleanup warning from build 2020-04-07 09:45:31 +02:00
net_util.rs vm-virtio: Implement the Snapshottable trait for Net 2020-04-21 21:25:03 +02:00
net.rs vm-virtio: Implement the Snapshottable trait for Net 2020-04-21 21:25:03 +02:00
pmem.rs vm-virtio: Implement Snapshottable trait for Pmem 2020-04-22 14:45:02 +02:00
queue.rs vm-virtio: Extend Queue helpers 2020-04-21 21:25:03 +02:00
rng.rs vm-virtio: Implement the Snapshottable trait for Rng 2020-04-17 19:29:41 +02:00