aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/kvm/paging_tmpl.h
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/kvm/paging_tmpl.h')
-rw-r--r--drivers/kvm/paging_tmpl.h15
1 files changed, 2 insertions, 13 deletions
diff --git a/drivers/kvm/paging_tmpl.h b/drivers/kvm/paging_tmpl.h
index cf4b74cc75b5..03c474aaedde 100644
--- a/drivers/kvm/paging_tmpl.h
+++ b/drivers/kvm/paging_tmpl.h
@@ -246,8 +246,6 @@ static u64 *FNAME(fetch)(struct kvm_vcpu *vcpu, gva_t addr,
246 } 246 }
247 shadow_page = kvm_mmu_get_page(vcpu, table_gfn, addr, level-1, 247 shadow_page = kvm_mmu_get_page(vcpu, table_gfn, addr, level-1,
248 metaphysical, shadow_ent); 248 metaphysical, shadow_ent);
249 if (!shadow_page)
250 return ERR_PTR(-ENOMEM);
251 shadow_addr = shadow_page->page_hpa; 249 shadow_addr = shadow_page->page_hpa;
252 shadow_pte = shadow_addr | PT_PRESENT_MASK | PT_ACCESSED_MASK 250 shadow_pte = shadow_addr | PT_PRESENT_MASK | PT_ACCESSED_MASK
253 | PT_WRITABLE_MASK | PT_USER_MASK; 251 | PT_WRITABLE_MASK | PT_USER_MASK;
@@ -347,17 +345,8 @@ static int FNAME(page_fault)(struct kvm_vcpu *vcpu, gva_t addr,
347 /* 345 /*
348 * Look up the shadow pte for the faulting address. 346 * Look up the shadow pte for the faulting address.
349 */ 347 */
350 for (;;) { 348 FNAME(walk_addr)(&walker, vcpu, addr);
351 FNAME(walk_addr)(&walker, vcpu, addr); 349 shadow_pte = FNAME(fetch)(vcpu, addr, &walker);
352 shadow_pte = FNAME(fetch)(vcpu, addr, &walker);
353 if (IS_ERR(shadow_pte)) { /* must be -ENOMEM */
354 printk("%s: oom\n", __FUNCTION__);
355 nonpaging_flush(vcpu);
356 FNAME(release_walker)(&walker);
357 continue;
358 }
359 break;
360 }
361 350
362 /* 351 /*
363 * The page is not mapped by the guest. Let the guest handle it. 352 * The page is not mapped by the guest. Let the guest handle it.