]> xenbits.xensource.com Git - people/sstabellini/xen-unstable.git/.git/commitdiff
x86/PV32: avoid TLB flushing after mod_l3_entry()
authorJan Beulich <jbeulich@suse.com>
Fri, 9 Apr 2021 07:19:18 +0000 (09:19 +0200)
committerJan Beulich <jbeulich@suse.com>
Fri, 9 Apr 2021 07:19:18 +0000 (09:19 +0200)
32-bit guests may not depend upon the side effect of using ordinary
4-level paging when running on a 64-bit hypervisor. For L3 entry updates
to take effect, they have to use a CR3 reload. Therefore there's no need
to issue a paging structure invalidating TLB flush in this case.

Signed-off-by: Jan Beulich <jbeulich@suse.com>
Acked-by: Roger Pau Monné <roger.pau@citrix.com>
xen/arch/x86/mm.c

index 44e4c4cf1fc0d1bbb448dc9ef7a9b1497104d3aa..69d04ad809c0f340ba1d9cefd2d434303a84d2ea 100644 (file)
@@ -4069,7 +4069,8 @@ long do_mmu_update(
                                       cmd == MMU_PT_UPDATE_PRESERVE_AD, v);
                     if ( !rc &&
                          (page->u.inuse.type_info & PGT_count_mask) >
-                         1 + !!(page->u.inuse.type_info & PGT_pinned) )
+                         1 + !!(page->u.inuse.type_info & PGT_pinned) &&
+                         !is_pv_32bit_domain(pt_owner) )
                         flush_linear_pt = true;
                     break;