Re: [PATCH 5.15.y 8/8] KVM: x86/mmu: Ensure hugepage is in by slot before checking max mapping level
From: Sasha Levin
Date: Fri Jun 26 2026 - 13:59:29 EST
> - if (sp->role.direct && !kvm_is_reserved_pfn(pfn) &&
> + if (sp->role.direct && is_gfn_in_memslot(slot, sp->gfn) &&
This drops the !kvm_is_reserved_pfn(pfn) guard instead of adding
is_gfn_in_memslot() alongside it. I think upstream could drop it only because
a8ac499bb6ab ("KVM: x86/mmu: Don't require refcounted "struct page" to create
huge SPTEs") rewrote host_pfn_mapping_level() to stop touching the struct page
but that commit isn't in 5.15. Does it make sense?
--
Thanks,
Sasha