if ( pg->shadow_flags &
((SHF_page_type_mask & ~SHF_L1_ANY) | SHF_out_of_sync)
|| sh_page_has_multiple_shadows(pg)
- || is_pv_vcpu(v)
+ || !is_hvm_vcpu(v)
|| !v->domain->arch.paging.shadow.oos_active )
return 0;
v->arch.paging.mode->shadow.detach_old_tables(v);
#ifdef CONFIG_HVM
- if ( !is_pv_domain(d) )
+ if ( is_hvm_domain(d) )
{
const struct paging_mode *old_mode = v->arch.paging.mode;
// PV guests in 64-bit mode use two different page tables for user vs
// supervisor permissions, making the guest's _PAGE_USER bit irrelevant.
// It is always shadowed as present...
- if ( (GUEST_PAGING_LEVELS == 4) && !is_pv_32bit_domain(d)
- && is_pv_domain(d) )
+ if ( (GUEST_PAGING_LEVELS == 4) && !is_hvm_domain(d) &&
+ !is_pv_32bit_domain(d) )
{
sflags |= _PAGE_USER;
}
unsigned int t = SH_type_l2_shadow;
/* Tag compat L2 containing hypervisor (m2p) mappings */
- if ( is_pv_32bit_vcpu(v) &&
+ if ( is_pv_32bit_domain(d) &&
guest_l4_table_offset(gw->va) == 0 &&
guest_l3_table_offset(gw->va) == 3 )
t = SH_type_l2h_shadow;
return 0;
}
- cpl = is_pv_vcpu(v) ? (regs->ss & 3) : hvm_get_cpl(v);
+ cpl = is_hvm_domain(d) ? hvm_get_cpl(v) : (regs->ss & 3);
rewalk:
#endif
/* Don't do anything on an uninitialised vcpu */
- if ( is_pv_domain(d) && !v->is_initialised )
+ if ( !is_hvm_domain(d) && !v->is_initialised )
{
ASSERT(v->arch.cr3 == 0);
return;
};
paging_log_dirty_init(d, &sh_none_ops);
- return is_pv_domain(d) ? 0 : -EOPNOTSUPP;
+ return is_hvm_domain(d) ? -EOPNOTSUPP : 0;
}
static int _page_fault(struct vcpu *v, unsigned long va,