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] Allow PV superpages to work with live migration

To: Dave McCracken <dcm@xxxxxxxx>
Subject: Re: [Xen-devel] [PATCH] Allow PV superpages to work with live migration
From: Tim Deegan <Tim.Deegan@xxxxxxxxxx>
Date: Tue, 18 May 2010 13:35:53 +0100
Cc: Jeremy Fitzhardinge <jeremy@xxxxxxxx>, Xen Developers List <xen-devel@xxxxxxxxxxxxxxxxxxx>, Keir Fraser <Keir.Fraser@xxxxxxxxxxxxx>
Delivery-date: Tue, 18 May 2010 05:36:48 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <201005171410.47235.dcm@xxxxxxxx>
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: <201005171410.47235.dcm@xxxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
User-agent: Mutt/1.5.18 (2008-05-17)
At 20:10 +0100 on 17 May (1274127046), Dave McCracken wrote:
> 
> PV superpages currently do not work with live migration.  They fall over dead 
> when the shadow page table is enabled for dirty tracking.  The HVM support 
> for 
> superpages in this code has been tested and found to work just fine for PV 
> superpages.  This patch modifies the test macro to allow the code to work 
> with 
> PV superpages.

It rather overshoots. :)  This enables PSE even for HVM guests which
have explicitly disabled it.   I think you want

    return (is_hvm_vcpu(v) ? (GUEST_PAGING_LEVELS != 2
                              || !hvm_paging_enabled(v)
                              || (v->arch.hvm_vcpu.guest_cr[4] & X86_CR4_PSE))
                           : opt_allow_hugepage);

Cheers,

Tim.

Content-Description: xen-unstable-smigrate-1.patch
> --- xen-unstable//xen/include/asm-x86/guest_pt.h      2010-04-19 
> 09:23:24.000000000 -0500
> +++ xen-hmigrate//xen/include/asm-x86/guest_pt.h      2010-05-17 
> 14:00:34.000000000 -0500
> @@ -186,10 +186,11 @@ guest_supports_superpages(struct vcpu *v
>      /* The _PAGE_PSE bit must be honoured in HVM guests, whenever
>       * CR4.PSE is set or the guest is in PAE or long mode. 
>       * It's also used in the dummy PT for vcpus with CR4.PG cleared. */
> -    return (is_hvm_vcpu(v) && 
> -            (GUEST_PAGING_LEVELS != 2 
> -             || !hvm_paging_enabled(v)
> -             || (v->arch.hvm_vcpu.guest_cr[4] & X86_CR4_PSE)));
> +    return (opt_allow_hugepage ||
> +         (is_hvm_vcpu(v) && 
> +          (GUEST_PAGING_LEVELS != 2 
> +           || !hvm_paging_enabled(v)
> +           || (v->arch.hvm_vcpu.guest_cr[4] & X86_CR4_PSE))));
>  }
>  
>  static inline int

Content-Description: ATT00001..txt
> _______________________________________________
> Xen-devel mailing list
> Xen-devel@xxxxxxxxxxxxxxxxxxx
> http://lists.xensource.com/xen-devel


-- 
Tim Deegan <Tim.Deegan@xxxxxxxxxx>
Principal Software Engineer, XenServer Engineering
Citrix Systems UK Ltd.  (Company #02937203, SL9 0BG)

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