]> xenbits.xensource.com Git - xen.git/commitdiff
x86/shadow: don't open-code shadow_remove_all_shadows()
authorJan Beulich <jbeulich@suse.com>
Fri, 29 Jul 2022 06:49:48 +0000 (08:49 +0200)
committerJan Beulich <jbeulich@suse.com>
Fri, 29 Jul 2022 06:49:48 +0000 (08:49 +0200)
Let's use the existing inline wrapper instead of repeating respective
commentary at every site.

Signed-off-by: Jan Beulich <jbeulich@suse.com>
Acked-by: Andrew Cooper <andrew.cooper3@citrix.com>
xen/arch/x86/mm/shadow/common.c
xen/arch/x86/mm/shadow/hvm.c
xen/arch/x86/mm/shadow/multi.c

index ca4afb74e4b5ddf04f89a9f2ae8e2a8c46b8ebc8..0247f0c84ea01684c012a853db238859ed25a14b 100644 (file)
@@ -389,7 +389,7 @@ static int oos_remove_write_access(struct vcpu *v, mfn_t gmfn,
          * the page.  If that doesn't work either, the guest is granting
          * his pagetables and must be killed after all.
          * This will flush the tlb, so we can return with no worries. */
-        sh_remove_shadows(d, gmfn, 0 /* Be thorough */, 1 /* Must succeed */);
+        shadow_remove_all_shadows(d, gmfn);
         return 1;
     }
 
index 27dd99f1a12e0dc743dd8caba23f68f2f0b10f2a..9438a1a7adafec57c78d8d4c4d7f4e71d4fde642 100644 (file)
@@ -783,7 +783,7 @@ sh_remove_all_shadows_and_parents(struct domain *d, mfn_t gmfn)
 /* Even harsher: this is a HVM page that we thing is no longer a pagetable.
  * Unshadow it, and recursively unshadow pages that reference it. */
 {
-    sh_remove_shadows(d, gmfn, 0, 1);
+    shadow_remove_all_shadows(d, gmfn);
     /* XXX TODO:
      * Rework this hashtable walker to return a linked-list of all
      * the shadows it modified, then do breadth-first recursion
index 869d7baed0456100c86dec9bff0d7721b81b9df6..8626cebc3d769b805c6a5a6ffdd5a7f732630cc5 100644 (file)
@@ -2637,7 +2637,7 @@ static int cf_check sh_page_fault(
         SHADOW_PRINTK("user-mode fault to PT, unshadowing mfn %#lx\n",
                       mfn_x(gmfn));
         perfc_incr(shadow_fault_emulate_failed);
-        sh_remove_shadows(d, gmfn, 0 /* thorough */, 1 /* must succeed */);
+        shadow_remove_all_shadows(d, gmfn);
         trace_shadow_emulate_other(TRC_SHADOW_EMULATE_UNSHADOW_USER,
                                       va, gfn);
         goto done;
@@ -2723,7 +2723,7 @@ static int cf_check sh_page_fault(
             v->arch.paging.last_write_emul_ok = 0;
         }
 #endif
-        sh_remove_shadows(d, gmfn, 0 /* thorough */, 1 /* must succeed */);
+        shadow_remove_all_shadows(d, gmfn);
         trace_shadow_emulate_other(TRC_SHADOW_EMULATE_UNSHADOW_EVTINJ,
                                    va, gfn);
         return EXCRET_fault_fixed;