Skip to content

Commit 7de5bdc

Browse files
Xiao Guangrongavikivity
authored andcommitted
KVM: MMU: remove unnecessary check
Checking the return of kvm_mmu_get_page is unnecessary since it is guaranteed by memory cache Signed-off-by: Xiao Guangrong <[email protected]> Signed-off-by: Avi Kivity <[email protected]>
1 parent 92b5265 commit 7de5bdc

File tree

1 file changed

+0
-5
lines changed

1 file changed

+0
-5
lines changed

arch/x86/kvm/mmu.c

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2616,11 +2616,6 @@ static int __direct_map(struct kvm_vcpu *vcpu, gpa_t v, int write,
26162616
sp = kvm_mmu_get_page(vcpu, pseudo_gfn, iterator.addr,
26172617
iterator.level - 1,
26182618
1, ACC_ALL, iterator.sptep);
2619-
if (!sp) {
2620-
pgprintk("nonpaging_map: ENOMEM\n");
2621-
kvm_release_pfn_clean(pfn);
2622-
return -ENOMEM;
2623-
}
26242619

26252620
mmu_spte_set(iterator.sptep,
26262621
__pa(sp->spt)

0 commit comments

Comments
 (0)