Re: [PATCH 3/3] KVM: always make in-place conversion a compile-time constant when possible
From: Paolo Bonzini
Date: Wed Oct 21 2026 - 03:15:30 EST
On 10/21/26 09:07, Xiaoyao Li wrote:
On 10/20/2026 9:14 PM, Paolo Bonzini wrote:
Remove the unnecessary static call indirection and make
gmem_in_place_conversion a constant if CONFIG_KVM_PRIVATE_MEMATTR_VM
is false.
Require that CONFIG_KVM_PRIVATE_MEMATTR_VM is y only if
kvm_arch_has_private_mem is also defined.
This reads like the patch is going to make such a requirement. However, it doesn't.
It does in the sense that, if you set CONFIG_KVM_PRIVATE_MEMATTR_VM=y without defining kvm_arch_has_private_mem, you'll get a useless gmem_in_place_conversion module parameter.
Also, if CONFIG_KVM_GUEST_MEMFD=n, you'll get an undefined symbol kvm_gmem_is_private_gfn(). Previously, you wouldn't get the undefined symbol if kvm_arch_has_private_mem was not defined.
Paolo