On Wed, Feb 28, 2024 at 01:34:15PM +0000, Quentin Perret wrote: > Alternatively, the shared->private conversion happens in the KVM vcpu > run loop, so we'd be in a good position to exit the VCPU_RUN ioctl with a > new exit reason saying "can't donate that page while it's shared" and > have userspace use MADVISE_DONTNEED or munmap, or whatever on the back > of that. But I tend to prefer the rmap option if it's workable as that > avoids adding new KVM userspace ABI. > You'll still probably need the new exit reason saying "can't donate that page while it's shared" if the refcount tests fail. Can use David's iouring as example of some other part of the kernel has a reference to the page. I can't think of anything to do other than exiting to userspace because we don't know how to drop that extra ref. Thanks, Elliot