[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-changelog] [xen-unstable] [XEN] Extend fix from 12403:680b37789200 to other emulation paths.
# HG changeset patch # User Tim Deegan <Tim.Deegan@xxxxxxxxxxxxx> # Node ID a07d6a05792e5cfc8ca08a4db44e79ae1b5bee96 # Parent bb76a76985febd022dd27c7456abccd12529aa7b [XEN] Extend fix from 12403:680b37789200 to other emulation paths. Signed-off-by: Tim Deegan <Tim.Deegan@xxxxxxxxxxxxx> --- xen/arch/x86/mm/shadow/multi.c | 6 +++--- 1 files changed, 3 insertions(+), 3 deletions(-) diff -r bb76a76985fe -r a07d6a05792e xen/arch/x86/mm/shadow/multi.c --- a/xen/arch/x86/mm/shadow/multi.c Tue Nov 14 17:00:05 2006 +0000 +++ b/xen/arch/x86/mm/shadow/multi.c Tue Nov 14 17:11:45 2006 +0000 @@ -3778,7 +3778,7 @@ sh_x86_emulate_write(struct vcpu *v, uns shadow_validate_guest_pt_write(v, mfn, addr, bytes_on_page); bytes -= bytes_on_page; /* If we are writing zeros to this page, might want to unshadow */ - if ( *(u32 *)addr == 0 ) + if ( likely(bytes_on_page >= 4) && (*(u32 *)addr == 0) ) check_for_early_unshadow(v, mfn); sh_unmap_domain_page(addr); } @@ -3823,7 +3823,7 @@ sh_x86_emulate_cmpxchg(struct vcpu *v, u vaddr, prev, old, new, *(unsigned long *)addr, bytes); /* If we are writing zeros to this page, might want to unshadow */ - if ( *(u8 *)addr == 0 ) + if ( likely(bytes >= 4) && (*(u32 *)addr == 0) ) check_for_early_unshadow(v, mfn); sh_unmap_domain_page(addr); @@ -3858,7 +3858,7 @@ sh_x86_emulate_cmpxchg8b(struct vcpu *v, rv = X86EMUL_CMPXCHG_FAILED; /* If we are writing zeros to this page, might want to unshadow */ - if ( *(u8 *)addr == 0 ) + if ( *(u32 *)addr == 0 ) check_for_early_unshadow(v, mfn); sh_unmap_domain_page(addr); _______________________________________________ Xen-changelog mailing list Xen-changelog@xxxxxxxxxxxxxxxxxxx http://lists.xensource.com/xen-changelog
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |