On Thu, 24 Apr 2025 16:34:50 +0100, Oliver Upton <oliver.upton@xxxxxxxxx> wrote: > > On Thu, Apr 24, 2025 at 03:13:07PM +0100, Karim Manaouil wrote: > > This series introduces the capability of running Gunyah guests via KVM on > > Qualcomm SoCs shipped with Gunyah hypervisor [1] (e.g. RB3 Gen2). > > > > The goal of this work is to port the existing Gunyah hypervisor support from a > > standalone driver interface [2] to KVM, with the aim of leveraging as much of the > > existing KVM infrastructure as possible to reduce duplication of effort around > > memory management (e.g. guest_memfd), irqfd, and other core components. > > > > In short, Gunyah is a Type-1 hypervisor, meaning that it runs independently of any > > high-level OS kernel such as Linux and runs in a higher CPU privilege level than VMs. > > Gunyah is shipped as firmware and guests typically talk with Gunyah via hypercalls. > > KVM is designed to run as Type-2 hypervisor. This port allows KVM to run in EL1 and > > serve as the interface for VM lifecycle management,while offloading virtualization > > to Gunyah. > > If you're keen on running your own hypervisor then I'm sorry, you get to > deal with it soup to nuts. Other hypervisors (e.g. mshv) have their own > kernel drivers for managing the host / UAPI parts of driving VMs. > > The KVM arch interface is *internal* to KVM, not something to be > (ab)used for cramming in a non-KVM hypervisor. KVM and other hypervisors > can still share other bits of truly common infrastructure, like > guest_memfd. > > I understand the value in what you're trying to do, but if you want it > to smell like KVM you may as well just let the user run it at EL2. +1. KVM is not a generic interface for random third party hypervisors. If you want to run KVM on your Qualcomm HW, boot at EL2, and enjoy the real thing -- it is worth it. If Gunyah is what you want, then there is enough code out there to use it with crosvm. But mixing the two is not happening, sorry. M. -- Without deviation from the norm, progress is not possible.