lkml.org 
[lkml]   [2020]   [Sep]   [30]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH 17/22] kvm: mmu: Support dirty logging for the TDP MMU
From
Date
On 30/09/20 20:04, Sean Christopherson wrote:
>> + for_each_tdp_mmu_root(kvm, root) {
>> + root_as_id = kvm_mmu_page_as_id(root);
>> + if (root_as_id != slot->as_id)
>> + continue;
> This pattern pops up quite a few times, probably worth adding
>
> #define for_each_tdp_mmu_root_using_memslot(...) \
> for_each_tdp_mmu_root(...) \
> if (kvm_mmu_page_as_id(root) != slot->as_id) {
> } else
>

It's not really relevant that it's a memslot, but

for_each_tdp_mmu_root_using_as_id

makes sense too.

Paolo

\
 
 \ /
  Last update: 2020-09-30 20:10    [W:0.102 / U:4.164 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site