On Thu, Feb 01, 2024, Anish Moorthy wrote: > On Thu, Feb 1, 2024 at 8:09 AM Sean Christopherson <seanjc@xxxxxxxxxx> wrote: > > > > On Wed, Jan 31, 2024, Anish Moorthy wrote: > > > On Tue, Jan 30, 2024 at 4:26 PM James Houghton <jthoughton@xxxxxxxxxx> wrote: > > > > > > > > Feel free to add: > > > > > > > > Reviewed-by: James Houghton <jthoughton@xxxxxxxxxx> > > > > > > > If we include KVM_MEM_GUEST_MEMFD here, we should point the reader to > > > > KVM_SET_USER_MEMORY_REGION2 and explain that using > > > > KVM_SET_USER_MEMORY_REGION with this flag will always fail. > > > > > > Done and done (I've split the guest memfd doc update off into its own > > > commit too). > > > > > > > > @@ -3070,6 +3074,15 @@ kvm_pfn_t __gfn_to_pfn_memslot(const struct kvm_memory_slot *slot, gfn_t gfn, > > > > > writable = NULL; > > > > > } > > > > > > > > > > + if (!atomic && can_exit_on_missing > > > > > + && kvm_is_slot_exit_on_missing(slot)) { > > > > Operators go on the preceding line: > > Thanks. On a side note, is this actually documented anywhere? I > searched coding-style.rst but couldn't find it. Maybe? But the fact there are very few, if any, patterns like this in KVM should be a big clue that it's not the One True Way. The formal docs will never be 100% complete, and preferences do evolve and change, but if your code sticks out like a sore thumb, odds are good you're doing something wrong.