[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <aPFVcMdfFlxhgGZh@google.com>
Date: Thu, 16 Oct 2025 13:28:32 -0700
From: Sean Christopherson <seanjc@...gle.com>
To: Miguel Ojeda <miguel.ojeda.sandonis@...il.com>
Cc: Miguel Ojeda <ojeda@...nel.org>, Marc Zyngier <maz@...nel.org>,
Oliver Upton <oliver.upton@...ux.dev>, Paolo Bonzini <pbonzini@...hat.com>,
linux-arm-kernel@...ts.infradead.org, kvmarm@...ts.linux.dev,
kvm@...r.kernel.org, linux-kernel@...r.kernel.org,
Ackerley Tng <ackerleytng@...gle.com>, Shivank Garg <shivankg@....com>,
David Hildenbrand <david@...hat.com>, Fuad Tabba <tabba@...gle.com>, Ashish Kalra <ashish.kalra@....com>,
Vlastimil Babka <vbabka@...e.cz>
Subject: Re: [PATCH v13 00/12] KVM: guest_memfd: Add NUMA mempolicy support
On Thu, Oct 16, 2025, Miguel Ojeda wrote:
> On Thu, Oct 16, 2025 at 7:30 PM Sean Christopherson <seanjc@...gle.com> wrote:
> >
> > Miguel, you got pulled in due to a one-line change to add a new iterator
> > macros in .clang-format.
>
> Thanks!
>
> The macro is not in `include/`, right? That means that, currently,
> when I rerun the command to update the list it will go away.
Oh, I take it .clang-format is auto-generated? Is it a "formal" script, or do
you literally just run the grep command in the comment?
# Taken from:
# git grep -h '^#define [^[:space:]]*for_each[^[:space:]]*(' include/ tools/ \
# | sed "s,^#define \([^[:space:]]*for_each[^[:space:]]*\)(.*$, - '\1'," \
# | LC_ALL=C sort -u
> If that is correct, and you want to have it in the list,
I don't think I care if it's in the list? I honestly don't know for sure, because
it's entirely possible I'm consuming .clang-format without knowing it. I added
the entry based on someone else's request.
Ackerley?
> then we should add e.g. `virt/` there or similar, or we could have a few
> separate lines at the top that are independent of the ones generated
> by the command.
Is it possible, and sensible, to have per-subsystem .clang-format files? KVM
(virt/kvm) and KVM x86 (arch/x86/kvm) both have has several for_each macros,
pretty much all of which are more interesting than kvm_gmem_for_each_file().
Adding arch/x86/kvm to the "script" in .clang-format feels wrong.
E.g.
$ git grep -h '^#define [^[:space:]]*for_each[^[:space:]]*(' arch/x86/kvm/ | \
sed "s,^#define \([^[:space:]]*for_each[^[:space:]]*\)(.*$, - '\1'," | \
LC_ALL=C sort -u
- '__for_each_rmap_spte'
- '__for_each_tdp_mmu_root'
- '__for_each_tdp_mmu_root_yield_safe'
- 'for_each_gfn_valid_sp_with_gptes'
- 'for_each_rmap_spte'
- 'for_each_rmap_spte_lockless'
- 'for_each_shadow_entry'
- 'for_each_shadow_entry_lockless'
- 'for_each_shadow_entry_using_root'
- 'for_each_slot_rmap_range'
- 'for_each_sp'
- 'for_each_tdp_mmu_root_rcu'
- 'for_each_tdp_mmu_root_yield_safe'
- 'for_each_tdp_pte'
- 'for_each_tdp_pte_min_level'
- 'for_each_tdp_pte_min_level_all'
- 'for_each_valid_sp'
- 'for_each_valid_tdp_mmu_root'
- 'for_each_valid_tdp_mmu_root_yield_safe'
- 'kvm_for_each_pmc'
- 'tdp_root_for_each_leaf_pte'
- 'tdp_root_for_each_pte'
Powered by blists - more mailing lists