On Mon, Nov 18, 2024 at 4:40 AM Nikita Kalyazin <kalyazin@xxxxxxxxxx> wrote: > > Async PF [1] allows to run other processes on a vCPU while the host > handles a stage-2 fault caused by a process on that vCPU. When using > VM-exit-based stage-2 fault handling [2], async PF functionality is lost > because KVM does not run the vCPU while a fault is being handled so no > other process can execute on the vCPU. This patch series extends > VM-exit-based stage-2 fault handling with async PF support by letting > userspace handle faults instead of the kernel, hence the "async PF user" > name. > > I circulated the idea with Paolo, Sean, David H, and James H at the LPC, > and the only concern I heard was about injecting the "page not present" > event via #PF exception in the CoCo case, where it may not work. In my > implementation, I reused the existing code for doing that, so the async > PF user implementation is on par with the present async PF > implementation in this regard, and support for the CoCo case can be > added separately. > > Please note that this series is applied on top of the VM-exit-based > stage-2 fault handling RFC [2]. Thanks, Nikita! I'll post a new version of [2] very soon. The new version contains the simplifications we talked about at LPC but is conceptually the same (so this async PF series is motivated the same way), and it shouldn't have many/any conflicts with the main bits of this series. > [2] https://lore.kernel.org/kvm/CADrL8HUHRMwUPhr7jLLBgD9YLFAnVHc=N-C=8er-x6GUtV97pQ@xxxxxxxxxxxxxx/T/