lkml.org 
[lkml]   [2021]   [Aug]   [12]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH 2/2] KVM: x86/mmu: Don't step down in the TDP iterator when zapping all SPTEs
From
Date
On 12/08/21 19:07, Sean Christopherson wrote:
> Yeah, I was/am on the fence too, I almost included a blurb in the cover letter
> saying as much. I'll do that for v2 and let Paolo decide.

I think it makes sense to have it. You can even use the ternary operator

/*
* When zapping everything, all entries at the top level
* ultimately go away, and the levels below go down with them.
* So do not bother iterating all the way down to the leaves.
*/
int min_level = zap_all ? root->role.level : PG_LEVEL_4K;

Paolo

\
 
 \ /
  Last update: 2021-08-12 19:15    [W:0.067 / U:0.148 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site