cloud-hypervisor/vmm/src
Yuanchu Xie 5f18ac3bc0 devices: Add pvmemcontrol device
Pvmemcontrol provides a way for the guest to control its physical memory
properties, and enables optimizations and security features. For
example, the guest can provide information to the host where parts of a
hugepage may be unbacked, or sensitive data may not be swapped out, etc.

Pvmemcontrol allows guests to manipulate its gPTE entries in the SLAT,
and also some other properties of the memory map the back's host memory.
This is achieved by using the KVM_CAP_SYNC_MMU capability. When this
capability is available, the changes in the backing of the memory region
on the host are automatically reflected into the guest. For example, an
mmap() or madvise() that affects the region will be made visible
immediately.

There are two components of the implementation: the guest Linux driver
and Virtual Machine Monitor (VMM) device. A guest-allocated shared
buffer is negotiated per-cpu through a few PCI MMIO registers, the VMM
device assigns a unique command for each per-cpu buffer. The guest
writes its pvmemcontrol request in the per-cpu buffer, then writes the
corresponding command into the command register, calling into the VMM
device to perform the pvmemcontrol request.

The synchronous per-cpu shared buffer approach avoids the kick and busy
waiting that the guest would have to do with virtio virtqueue transport.

The Cloud Hypervisor component can be enabled with --pvmemcontrol.

Co-developed-by: Stanko Novakovic <stanko@google.com>
Co-developed-by: Pasha Tatashin <tatashin@google.com>
Signed-off-by: Yuanchu Xie <yuanchu@google.com>
2024-08-05 22:41:56 +00:00
..
api vmm: Add landlock elements to openapi spec 2024-08-05 17:46:30 +00:00
igvm build: use released version of the IGVM crates 2024-04-29 11:13:59 +00:00
acpi.rs
clone3.rs
config.rs devices: Add pvmemcontrol device 2024-08-05 22:41:56 +00:00
console_devices.rs vmm: Use cloned fd to check if dev is a tty 2024-06-12 15:47:19 +00:00
coredump.rs
cpu.rs arch: Change the default topology for x86 guests 2024-06-04 17:08:18 +00:00
device_manager.rs devices: Add pvmemcontrol device 2024-08-05 22:41:56 +00:00
device_tree.rs
gdb.rs
interrupt.rs vmm: Avoid kernel panic when unmasking guest IRQ on AMD 2024-04-07 08:58:03 +00:00
landlock.rs vmm: Limit the visibility of Landlock objects 2024-07-06 04:42:58 +00:00
lib.rs devices: Add pvmemcontrol device 2024-08-05 22:41:56 +00:00
memory_manager.rs vmm: fix documentation formatting 2024-06-12 16:59:20 +00:00
migration.rs
pci_segment.rs vm-device: generalize BusDevice to use a shared reference 2024-08-05 22:41:56 +00:00
seccomp_filters.rs vmm: Add seccomp rules to allow landlock syscalls 2024-07-06 04:42:58 +00:00
serial_manager.rs vmm: refactor DeviceManager to use console_info 2024-06-12 15:47:19 +00:00
sigwinch_listener.rs vmm: move listen_for_sigwinch_on_tty method 2024-06-12 15:47:19 +00:00
vm_config.rs devices: Add pvmemcontrol device 2024-08-05 22:41:56 +00:00
vm.rs vmm: Use Response::ok_or_abandon() in migration logic 2024-07-09 19:53:26 +00:00