&& (ft == ft_demand_write))
#endif /* OOS */
) )
- {
- if ( shadow_mode_trap_reads(d) )
- {
- // if we are trapping both reads & writes, then mark this page
- // as not present...
- //
- sflags &= ~_PAGE_PRESENT;
- }
- else
- {
- // otherwise, just prevent any writes...
- //
- sflags &= ~_PAGE_RW;
- }
- }
+ sflags &= ~_PAGE_RW;
// PV guests in 64-bit mode use two different page tables for user vs
// supervisor permissions, making the guest's _PAGE_USER bit irrelevant.
&& !(mfn_is_out_of_sync(gmfn)
&& !(regs->error_code & PFEC_user_mode))
#endif
- )
+ && (ft == ft_demand_write) )
{
- if ( ft == ft_demand_write )
- {
- perfc_incr(shadow_fault_emulate_write);
- goto emulate;
- }
- else if ( shadow_mode_trap_reads(d) && ft == ft_demand_read )
- {
- perfc_incr(shadow_fault_emulate_read);
- goto emulate;
- }
+ perfc_incr(shadow_fault_emulate_write);
+ goto emulate;
}
/* Need to hand off device-model MMIO to the device model */
#define shadow_mode_external(_d) (paging_mode_shadow(_d) && \
paging_mode_external(_d))
-/* Xen traps & emulates all reads of all page table pages:
- * not yet supported */
-#define shadow_mode_trap_reads(_d) ({ (void)(_d); 0; })
-
/*****************************************************************************
* Entry points into the shadow code */