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

Re: [Xen-devel] [PATCH 10/17] xenpaging: update machine_to_phys_mapping[

To: xen-devel@xxxxxxxxxxxxxxxxxxx
Subject: Re: [Xen-devel] [PATCH 10/17] xenpaging: update machine_to_phys_mapping[] during page-in
From: Olaf Hering <olaf@xxxxxxxxx>
Date: Tue, 14 Dec 2010 23:58:37 +0100
Delivery-date: Tue, 14 Dec 2010 15:00:02 -0800
Dkim-signature: v=1; a=rsa-sha1; c=relaxed/relaxed; t=1292367518; l=1057; s=domk; d=aepfle.de; h=In-Reply-To:Content-Type:MIME-Version:References:Subject:To:From: Date:X-RZG-CLASS-ID:X-RZG-AUTH; bh=m3fXb1qiwujTLst2//Y6LfcQ8dE=; b=TgCuzkmUdWLkCZYShnxVPFTWa/fJR+G4FNP1isHnuRxGUt8afGJY0/8J6GTjd80V+k3 ajaySP5n9bflii2cRa1KmE2XqI5+tWxeJ631X6I6wWTfYTVjGGrRH/JHFvPUsMOELQr5j X2QCrNlE1QPLURDDruUAdGYHAoFddarum5U=
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <20101206205911.611555011@xxxxxxxxx>
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/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
References: <20101206205907.848643876@xxxxxxxxx> <20101206205911.611555011@xxxxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
User-agent: Mutt/1.5.20 (2009-06-14)
On Mon, Dec 06, Olaf Hering wrote:

> Update the machine_to_phys_mapping[] array during page-in. The gfn is
> now at a different page and the array has still INVALID_M2P_ENTRY in the
> index.

Does anyone know what the "best" location for this array update is?
p2m_mem_paging_prep() allocates a new page for the guest and assigns a
gfn to that mfn. So in theory the array could be updated right away,
even if the gfn will still have a p2m_ram_paging_* type until
p2m_mem_paging_resume() is called.

Olaf

> --- xen-unstable.hg-4.1.22459.orig/xen/arch/x86/mm/p2m.c
> +++ xen-unstable.hg-4.1.22459/xen/arch/x86/mm/p2m.c
> @@ -2827,6 +2827,7 @@ void p2m_mem_paging_resume(struct p2m_do
>      mfn = gfn_to_mfn(p2m, rsp.gfn, &p2mt);
>      p2m_lock(p2m);
>      set_p2m_entry(p2m, rsp.gfn, mfn, 0, p2m_ram_rw);
> +    set_gpfn_from_mfn(mfn_x(mfn), gfn);
>      audit_p2m(p2m, 1);
>      p2m_unlock(p2m);
>  
> 
> 
> _______________________________________________
> Xen-devel mailing list
> Xen-devel@xxxxxxxxxxxxxxxxxxx
> http://lists.xensource.com/xen-devel
> 

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

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