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 08/10] xen/mmu: Bugfix. Fill the top entry page w

To: Konrad Rzeszutek Wilk <konrad.wilk@xxxxxxxxxx>
Subject: [Xen-devel] Re: [PATCH 08/10] xen/mmu: Bugfix. Fill the top entry page with appropriate middle layer pointers.
From: Jeremy Fitzhardinge <jeremy@xxxxxxxx>
Date: Tue, 21 Dec 2010 14:38:30 -0800
Cc: Konrad Rzeszutek Wilk <konrad@xxxxxxxxxx>, xen-devel@xxxxxxxxxxxxxxxxxxx, linux-kernel@xxxxxxxxxxxxxxx, Jan Beulich <JBeulich@xxxxxxxxxx>, hpa@xxxxxxxxx
Delivery-date: Tue, 21 Dec 2010 14:45:31 -0800
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <1292967460-15709-9-git-send-email-konrad.wilk@xxxxxxxxxx>
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: <1292967460-15709-1-git-send-email-konrad.wilk@xxxxxxxxxx> <1292967460-15709-9-git-send-email-konrad.wilk@xxxxxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
User-agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.13) Gecko/20101209 Fedora/3.1.7-0.35.b3pre.fc14 Lightning/1.0b3pre Thunderbird/3.1.7
On 12/21/2010 01:37 PM, Konrad Rzeszutek Wilk wrote:
> If we swapped over from using an p2m_mid_identical to p2m_mid_missing
> (earlier call to set_phys_to_machine) and then started going through the
> PFNs in descending order to program a new MFN (balloon worker), we would
> end up in this code path. At that point we would set up new page filled with
> pointers to p2m_identity instead of p2m_missing. This had the disastrous
> effect that get_phys_to_machine on that PFN would return an 1-1 mapping
> instead of INVALID_P2M_ENTRY resulting in hitting a BUG check in balloon 
> driver.
>
Are you going to fold this into the appropriate patch later?

> Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@xxxxxxxxxx>
> ---
>  arch/x86/xen/mmu.c |    5 ++++-
>  1 files changed, 4 insertions(+), 1 deletions(-)
>
> diff --git a/arch/x86/xen/mmu.c b/arch/x86/xen/mmu.c
> index 92f4fec..a917439 100644
> --- a/arch/x86/xen/mmu.c
> +++ b/arch/x86/xen/mmu.c
> @@ -480,7 +480,10 @@ static bool alloc_p2m(unsigned long pfn)
>               if (!mid)
>                       return false;
>  
> -             p2m_mid_init(mid, p2m_identity);
> +             if (mid == p2m_mid_identity)
> +                     p2m_mid_init(mid, p2m_identity);
> +             else
> +                     p2m_mid_init(mid, p2m_missing);
>  
>               if (cmpxchg(top_p, mid_orig, mid) != mid_orig)
>                       free_p2m_page(mid);


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

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