Signed-off-by: Simon Horman <horms@verge.net.au>
Signed-off-by: Tim Deegan <Tim.Deegan@citrix.com>
};
ASSERT(!(all && fast));
+ ASSERT(mfn_valid(gmfn));
/* Although this is an externally visible function, we do not know
* whether the shadow lock will be held when it is called (since it
* fault was a non-user write to a present page. */
if ( is_hvm_domain(d)
&& unlikely(!hvm_wp_enabled(v))
- && regs->error_code == (PFEC_write_access|PFEC_page_present) )
+ && regs->error_code == (PFEC_write_access|PFEC_page_present)
+ && mfn_valid(gmfn) )
{
perfc_incr(shadow_fault_emulate_wp);
goto emulate;