Re: [PATCH v3 14/24] KVM: Change the return type of gfn_handler_t() from bool to int
From: Yan Zhao
Date: Fri Jan 16 2026 - 01:45:46 EST
On Thu, Jan 15, 2026 at 04:21:14PM -0800, Sean Christopherson wrote:
> On Tue, Jan 06, 2026, Yan Zhao wrote:
> > Modify the return type of gfn_handler_t() from bool to int. A negative
> > return value indicates failure, while a return value of 1 signifies success
> > with a flush required, and 0 denotes success without a flush required.
> >
> > This adjustment prepares for a later change that will enable
> > kvm_pre_set_memory_attributes() to fail.
>
> No, just don't support S-EPT hugepages with per-VM memory attributes. This type
> of complexity isn't worth carrying for a feature we want to deprecate.
Got it! Will disable TDX huge page if vm_memory_attributes is true.