WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-devel

[Xen-devel] Re: [PATCH] bypass passthrough MMIO mfns in vram dirty logic

To: "He, Qing" <qing.he@xxxxxxxxx>
Subject: [Xen-devel] Re: [PATCH] bypass passthrough MMIO mfns in vram dirty logic
From: Samuel Thibault <samuel.thibault@xxxxxxxxxxxxx>
Date: Mon, 12 May 2008 10:42:32 +0200
Cc: xen-devel@xxxxxxxxxxxxxxxxxxx, Keir Fraser <keir.fraser@xxxxxxxxxxxxx>, Kamala Narasimhan <Kamala.Narasimhan@xxxxxxxxxx>
Delivery-date: Mon, 12 May 2008 02:16:10 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
In-reply-to: <37E52D09333DE2469A03574C88DBF40F01DA6389@xxxxxxxxxxxxxxxxxxxxxxxxxxxx>
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
Mail-followup-to: Samuel Thibault <samuel.thibault@xxxxxxxxxxxxx>, "He, Qing" <qing.he@xxxxxxxxx>, Keir Fraser <keir.fraser@xxxxxxxxxxxxx>, xen-devel@xxxxxxxxxxxxxxxxxxx, Kamala Narasimhan <Kamala.Narasimhan@xxxxxxxxxx>
References: <37E52D09333DE2469A03574C88DBF40F01DA6389@xxxxxxxxxxxxxxxxxxxxxxxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
User-agent: Mutt/1.5.12-2006-07-14
He, Qing, le Mon 12 May 2008 16:31:22 +0800, a écrit :
> This patch fixes the fatal page fault when vram dirty logic handles MMIO
> of passthrough devices.
> 
> Signed-off-by: Qing He <qing.he@xxxxxxxxx>

Signed-off-by: Samuel Thibault <samuel.thibault@xxxxxxxxxxxxx>

> 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) ) {



-- 
Samuel
 tohi.cybercable.fr (212.198.0.3) si une personne se reconnait derriere
 cette adresse que ce soit un pirate ou une victime qu'il se manifeste,
 cette personne pourrait bien etre un petit malin
 -+- Fred in NPC : Mamaaaaan, y a le routeur qui veut me hacker -+-

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel

<Prev in Thread] Current Thread [Next in Thread>