]> xenbits.xensource.com Git - xen.git/commitdiff
[shadow] Disable higher level pagetables early unshadow only when the "process dying...
authorGianluca Guida <gianluca.guida@citrix.com>
Wed, 16 Nov 2011 16:40:05 +0000 (16:40 +0000)
committerGianluca Guida <gianluca.guida@citrix.com>
Wed, 16 Nov 2011 16:40:05 +0000 (16:40 +0000)
This patch fixes a performance problem in fully virtualized guests.

Signed-off-by: Gianluca Guida <gianluca.guida@citrix.com>
Tested-by: Jan Beulich <jbeulich@suse.com>
Committed-by: Keir Fraser <keir@xen.org>
xen-unstable changeset:   24148:3ecc8fef4281
xen-unstable date:        Wed Nov 16 15:19:33 2011 +0000

xen/arch/x86/mm/shadow/multi.c

index a2a33c331b6ca0fa2352f250201ea5c4eccdf74f..ca7635b4163c4868cc00f4c3fe7cf3cc6bbd2bda 100644 (file)
@@ -2710,8 +2710,9 @@ static inline void check_for_early_unshadow(struct vcpu *v, mfn_t gmfn)
            || ( !v->domain->arch.paging.shadow.pagetable_dying_op
                 && v->arch.paging.shadow.last_emulated_mfn_for_unshadow == mfn_x(gmfn) ) )
          && sh_mfn_is_a_page_table(gmfn)
-         && !(mfn_to_page(gmfn)->shadow_flags
-              & (SHF_L2_32|SHF_L2_PAE|SHF_L2H_PAE|SHF_L4_64)) )
+         && (!v->domain->arch.paging.shadow.pagetable_dying_op ||
+             !(mfn_to_page(gmfn)->shadow_flags
+               & (SHF_L2_32|SHF_L2_PAE|SHF_L2H_PAE|SHF_L4_64))) )
     {
         perfc_incr(shadow_early_unshadow);
         sh_remove_shadows(v, gmfn, 1, 0 /* Fast, can fail to unshadow */ );