KVM: MMU: use page table level macro
Its much cleaner to use PT_PAGE_TABLE_LEVEL than its numeric value. Signed-off-by: Davidlohr Bueso <dave@gnu.org> Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>
This commit is contained in:

committed by
Marcelo Tosatti

parent
a0c9a822bf
commit
f71fa31f9f
@@ -3618,7 +3618,7 @@ static bool detect_write_flooding(struct kvm_mmu_page *sp)
|
||||
* Skip write-flooding detected for the sp whose level is 1, because
|
||||
* it can become unsync, then the guest page is not write-protected.
|
||||
*/
|
||||
if (sp->role.level == 1)
|
||||
if (sp->role.level == PT_PAGE_TABLE_LEVEL)
|
||||
return false;
|
||||
|
||||
return ++sp->write_flooding_count >= 3;
|
||||
|
Reference in New Issue
Block a user