FROMLIST: virt: gunyah: Implement guestmemfd
Memory provided to Gunyah virtual machines are provided by a Gunyah guestmemfd. Because memory provided to virtual machines may be unmapped at stage-2 from the host (i.e. in the hypervisor's page tables for the host), special care needs to be taken to ensure that the kernel doesn't have a page mapped when it is lent to the guest. Without this tracking, a kernel panic could be induced by userspace tricking the kernel into accessing guest-private memory. Introduce the basic guestmemfd ops and ioctl. Userspace should be able to access the memory unless it is provided to the guest virtual machine: this is necessary to allow userspace to preload binaries such as the kernel Image prior to running the VM. Subsequent commits will wire up providing the memory to the guest. Bug: 338347082 Link: https://lore.kernel.org/all/20240222-gunyah-v17-23-1e9da6763d38@quicinc.com/ Change-Id: Ifa869957b3b0c1e83ac94c44f9cf5acfee8aa4bc Signed-off-by:Elliot Berman <quic_eberman@quicinc.com>
Loading
Please sign in to comment