Re: [PATCH v4 03/12] kvm: Provide explicit error for kvm_create_guest_memfd()
Philippe Mathieu-Daudé <[email protected]>
| Newsgroups | gmane.comp.emulators.qemu |
|---|---|
| Message-ID | <[email protected]> |
On 17/8/26 14:44, Peter Xu wrote: > On Mon, Aug 17, 2026 at 06:05:45AM +0200, Philippe Mathieu-Daudé wrote: >> I'd rather avoid kvm_enabled() checks in kvm-specific API (accel/kvm/). >> >> If ram_block_rebind() is KVM-specific, why expose it as RAMBlock API? > > I only started to remember why this patch existed.. after this series > applied, kvm_create_guest_memfd() can be invoked from hostmem code, so we > need this patch to fail on old kernels that do not support init shared (old > kernel case, user triggerable). OK, then please add a comment in the code, otherwise after also forgetting the why I'd be tempted to remove it, the pattern is odd :o)