Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 884a0ff0 authored by Xiao Guangrong's avatar Xiao Guangrong Committed by Avi Kivity
Browse files

KVM: MMU: cleanup invlpg code



Using is_last_spte() to cleanup invlpg code

Signed-off-by: default avatarXiao Guangrong <xiaoguangrong@cn.fujitsu.com>
Signed-off-by: default avatarMarcelo Tosatti <mtosatti@redhat.com>
parent 5e1b3ddb
Loading
Loading
Loading
Loading
+1 −3
Original line number Original line Diff line number Diff line
@@ -474,9 +474,7 @@ static void FNAME(invlpg)(struct kvm_vcpu *vcpu, gva_t gva)
		level = iterator.level;
		level = iterator.level;
		sptep = iterator.sptep;
		sptep = iterator.sptep;


		if (level == PT_PAGE_TABLE_LEVEL  ||
		if (is_last_spte(*sptep, level)) {
		    ((level == PT_DIRECTORY_LEVEL && is_large_pte(*sptep))) ||
		    ((level == PT_PDPE_LEVEL && is_large_pte(*sptep)))) {
			struct kvm_mmu_page *sp = page_header(__pa(sptep));
			struct kvm_mmu_page *sp = page_header(__pa(sptep));
			int offset, shift;
			int offset, shift;