[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-changelog] [xen-unstable] hvm: Fix CR0.WP=0 emulation. Don't take write emulation path for MMIO.
# HG changeset patch # User Keir Fraser <keir.fraser@xxxxxxxxxx> # Date 1260777142 0 # Node ID 3d505c9f1b7344e2debe4f1a905c6d42a179b93d # Parent c61953922215ecde526468d5a2ebe5147eee7529 hvm: Fix CR0.WP=0 emulation. Don't take write emulation path for MMIO. Signed-off-by: Simon Horman <horms@xxxxxxxxxxxx> Signed-off-by: Tim Deegan <Tim.Deegan@xxxxxxxxxx> --- xen/arch/x86/mm/shadow/common.c | 1 + xen/arch/x86/mm/shadow/multi.c | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) diff -r c61953922215 -r 3d505c9f1b73 xen/arch/x86/mm/shadow/common.c --- a/xen/arch/x86/mm/shadow/common.c Mon Dec 14 07:46:57 2009 +0000 +++ b/xen/arch/x86/mm/shadow/common.c Mon Dec 14 07:52:22 2009 +0000 @@ -2752,6 +2752,7 @@ void sh_remove_shadows(struct vcpu *v, m }; 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 diff -r c61953922215 -r 3d505c9f1b73 xen/arch/x86/mm/shadow/multi.c --- a/xen/arch/x86/mm/shadow/multi.c Mon Dec 14 07:46:57 2009 +0000 +++ b/xen/arch/x86/mm/shadow/multi.c Mon Dec 14 07:52:22 2009 +0000 @@ -3305,7 +3305,8 @@ static int sh_page_fault(struct vcpu *v, * 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; _______________________________________________ Xen-changelog mailing list Xen-changelog@xxxxxxxxxxxxxxxxxxx http://lists.xensource.com/xen-changelog
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |