l3e_get_mfn(pl3e[i]),
PGT_l2_page_table | PGT_pae_xen_l2, d, partial, 1);
}
- else if ( !is_guest_l3_slot(i) ||
- (rc = get_page_from_l3e(pl3e[i], pfn, d, partial)) > 0 )
+ else if ( (rc = get_page_from_l3e(pl3e[i], pfn, d, partial)) > 0 )
continue;
if ( rc == -ERESTART )
current->arch.old_guest_table = page;
}
while ( i-- > 0 )
- {
- if ( !is_guest_l3_slot(i) )
- continue;
unadjust_guest_l3e(pl3e[i], d);
- }
}
unmap_domain_page(pl3e);
pl3e = map_domain_page(_mfn(pfn));
do {
- if ( is_guest_l3_slot(i) )
- {
- rc = put_page_from_l3e(pl3e[i], pfn, partial, 0);
- if ( rc < 0 )
- break;
- partial = 0;
- if ( rc > 0 )
- continue;
- unadjust_guest_l3e(pl3e[i], d);
- }
+ rc = put_page_from_l3e(pl3e[i], pfn, partial, 0);
+ if ( rc < 0 )
+ break;
+ partial = 0;
+ if ( rc > 0 )
+ continue;
+ unadjust_guest_l3e(pl3e[i], d);
} while ( i-- );
unmap_domain_page(pl3e);
struct domain *d = vcpu->domain;
int rc = 0;
- if ( unlikely(!is_guest_l3_slot(pgentry_ptr_to_slot(pl3e))) )
- {
- gdprintk(XENLOG_WARNING, "L3 update in Xen-private area, slot %#lx\n",
- pgentry_ptr_to_slot(pl3e));
- return -EINVAL;
- }
-
/*
* Disallow updates to final L3 slot. It contains Xen mappings, and it
* would be a pain to ensure they remain continuously valid throughout.
( !is_pv_32bit_domain(_d) || \
!((_t) & PGT_pae_xen_l2) || \
((_s) < COMPAT_L2_PAGETABLE_FIRST_XEN_SLOT(_d)) )
-#define is_guest_l3_slot(_s) (1)
#define is_guest_l4_slot(_d, _s) \
( is_pv_32bit_domain(_d) \
? ((_s) == 0) \