···36183618 * Skip write-flooding detected for the sp whose level is 1, because36193619 * it can become unsync, then the guest page is not write-protected.36203620 */36213621- if (sp->role.level == 1)36213621+ if (sp->role.level == PT_PAGE_TABLE_LEVEL)36223622 return false;3623362336243624 return ++sp->write_flooding_count >= 3;
+1-1
arch/x86/kvm/paging_tmpl.h
···658658{659659 int offset = 0;660660661661- WARN_ON(sp->role.level != 1);661661+ WARN_ON(sp->role.level != PT_PAGE_TABLE_LEVEL);662662663663 if (PTTYPE == 32)664664 offset = sp->role.quadrant << PT64_LEVEL_BITS;