[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-devel] [PATCH] bypass passthrough MMIO mfns in vram dirty logic
This patch fixes the fatal page fault when vram dirty logic handles MMIO of passthrough devices. Signed-off-by: Qing He <qing.he@xxxxxxxxx> --- diff -r 810d8c3ac992 xen/arch/x86/mm/shadow/multi.c --- a/xen/arch/x86/mm/shadow/multi.c Thu May 08 16:58:33 2008 +0100 +++ b/xen/arch/x86/mm/shadow/multi.c Tue May 13 00:19:08 2008 +0800 @@ -1268,6 +1268,9 @@ static inline void shadow_vram_get_l1e(s if ( !d->dirty_vram ) return; mfn = shadow_l1e_get_mfn(new_sl1e); + + if ( !mfn_valid(mfn) ) return; /* m2p for mmio_direct may not exist */ + gfn = mfn_to_gfn(d, mfn); if ( (gfn >= d->dirty_vram->begin_pfn) && (gfn < d->dirty_vram->end_pfn) ) { @@ -1293,6 +1296,9 @@ static inline void shadow_vram_put_l1e(s if ( !d->dirty_vram ) return; mfn = shadow_l1e_get_mfn(old_sl1e); + + if ( !mfn_valid(mfn) ) return; + gfn = mfn_to_gfn(d, mfn); if ( (gfn >= d->dirty_vram->begin_pfn) && (gfn < d->dirty_vram->end_pfn) ) { Attachment:
vram-dirty-bypass-mmio-direct.patch _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxxxxxxxx http://lists.xensource.com/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |