]> git.baikalelectronics.ru Git - kernel.git/commit
KVM: X86/MMU: Add sp_has_gptes()
authorLai Jiangshan <jiangshan.ljs@antgroup.com>
Wed, 20 Apr 2022 13:12:03 +0000 (21:12 +0800)
committerPaolo Bonzini <pbonzini@redhat.com>
Fri, 29 Apr 2022 16:50:00 +0000 (12:50 -0400)
commiteb1ee31418a377fda8979b24bf6083cbb898a4b6
treeb2114c64a31d58808569378567fbe382b8b559e4
parent766e010b00798fdfc6ef707aec8eb30d16fa58ca
KVM: X86/MMU: Add sp_has_gptes()

Add sp_has_gptes() which equals to !sp->role.direct currently.

Shadow page having gptes needs to be write-protected, accounted and
responded to kvm_mmu_pte_write().

Use it in these places to replace !sp->role.direct and rename
for_each_gfn_indirect_valid_sp.

Signed-off-by: Lai Jiangshan <jiangshan.ljs@antgroup.com>
Message-Id: <20220420131204.2850-2-jiangshanlai@gmail.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
arch/x86/kvm/mmu/mmu.c