]> xenbits.xensource.com Git - people/royger/xen.git/commitdiff
x86/mm: move FLUSH_ROOT_PGTBL handling before TLB flush
authorRoger Pau Monne <roger.pau@citrix.com>
Thu, 18 Jul 2024 17:12:08 +0000 (19:12 +0200)
committerRoger Pau Monne <roger.pau@citrix.com>
Thu, 18 Jul 2024 17:54:23 +0000 (19:54 +0200)
Move the handling of FLUSH_ROOT_PGTBL in flush_area_local() ahead of the logic
that does the TLB flushing, in preparation for further changes requiring the
TLB flush to be strictly done after having handled FLUSH_ROOT_PGTBL.

No functional change intended.

Signed-off-by: Roger Pau Monné <roger.pau@citrix.com>
xen/arch/x86/flushtlb.c

index 18748b2bc805a2aae8b0fe513e3b58b84b08573f..fd5ed16ffb5787357c1f908f6511030675fde32f 100644 (file)
@@ -191,6 +191,9 @@ unsigned int flush_area_local(const void *va, unsigned int flags)
 {
     unsigned int order = (flags - 1) & FLUSH_ORDER_MASK;
 
+    if ( flags & FLUSH_ROOT_PGTBL )
+        get_cpu_info()->root_pgt_changed = true;
+
     if ( flags & (FLUSH_TLB|FLUSH_TLB_GLOBAL) )
     {
         if ( order == 0 )
@@ -254,9 +257,6 @@ unsigned int flush_area_local(const void *va, unsigned int flags)
         }
     }
 
-    if ( flags & FLUSH_ROOT_PGTBL )
-        get_cpu_info()->root_pgt_changed = true;
-
     return flags;
 }