Commit 3adbdf81 authored by Miaohe Lin's avatar Miaohe Lin Committed by Paolo Bonzini
Browse files

KVM: x86/mmu: use helper macro SPTE_ENT_PER_PAGE



Use helper macro SPTE_ENT_PER_PAGE to get the number of spte entries
per page. Minor readability improvement.

Signed-off-by: default avatarMiaohe Lin <linmiaohe@huawei.com>
Reviewed-by: default avatarSean Christopherson <seanjc@google.com>
Message-Id: <20220913085452.25561-1-linmiaohe@huawei.com>
Signed-off-by: default avatarPaolo Bonzini <pbonzini@redhat.com>
parent fa3e4203
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -1645,7 +1645,7 @@ static int is_empty_shadow_page(u64 *spt)
	u64 *pos;
	u64 *end;

	for (pos = spt, end = pos + PAGE_SIZE / sizeof(u64); pos != end; pos++)
	for (pos = spt, end = pos + SPTE_ENT_PER_PAGE; pos != end; pos++)
		if (is_shadow_present_pte(*pos)) {
			printk(KERN_ERR "%s: %p %llx\n", __func__,
			       pos, *pos);