Re: RFC: A KVM-specific alternative to UserfaultFD

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, Nov 8, 2023 at 12:33 PM Paolo Bonzini <pbonzini@xxxxxxxxxx> wrote:
>
> On 11/8/23 17:56, David Matlack wrote:
> > Thanks for the longer explanation. Yes kvm_read_guest() eventually calls
> > __copy_from_user() which will trigger a page fault and UserfaultFD will
> > notify userspace and wait for the page to become present. In the
> > KVM-specific proposal I outlined, calling kvm_read_guest() will
> > ultimately result in a check of the VM's present bitmap and KVM will
> > nnotify userspace and wait for the page to become present if it's not,
> > before calling __copy_from_user(). So I don't expect a KVM-specific
> > solution to have any increased maintenance burden for VGIC (or any other
> > widgets).
>
> It does mean however that we need a cross-thread notification mechanism,
> instead of just relying on KVM_EXIT_MEMORY_FAULT (or another KVM_EXIT_*).

Yes. Any time KVM directly accesses guest memory (e.g.
kvm_read/write_guest()), it would use a blocking notification
mechanism (part (d) in the proposal). Google uses a netlink socket for
this, but a custom file descriptor would be more reliable.





[Index of Archives]     [KVM ARM]     [KVM ia64]     [KVM ppc]     [Virtualization Tools]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Questions]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux