[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [xen master] x86/shadow: don't open-code shadow_remove_all_shadows()
commit 5b04fe78646a8222626996113c9d1e598cb84831 Author: Jan Beulich <jbeulich@xxxxxxxx> AuthorDate: Fri Jul 29 08:49:48 2022 +0200 Commit: Jan Beulich <jbeulich@xxxxxxxx> CommitDate: Fri Jul 29 08:49:48 2022 +0200 x86/shadow: don't open-code shadow_remove_all_shadows() Let's use the existing inline wrapper instead of repeating respective commentary at every site. Signed-off-by: Jan Beulich <jbeulich@xxxxxxxx> Acked-by: Andrew Cooper <andrew.cooper3@xxxxxxxxxx> --- xen/arch/x86/mm/shadow/common.c | 2 +- xen/arch/x86/mm/shadow/hvm.c | 2 +- xen/arch/x86/mm/shadow/multi.c | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/xen/arch/x86/mm/shadow/common.c b/xen/arch/x86/mm/shadow/common.c index ca4afb74e4..0247f0c84e 100644 --- a/xen/arch/x86/mm/shadow/common.c +++ b/xen/arch/x86/mm/shadow/common.c @@ -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; } diff --git a/xen/arch/x86/mm/shadow/hvm.c b/xen/arch/x86/mm/shadow/hvm.c index 27dd99f1a1..9438a1a7ad 100644 --- a/xen/arch/x86/mm/shadow/hvm.c +++ b/xen/arch/x86/mm/shadow/hvm.c @@ -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 diff --git a/xen/arch/x86/mm/shadow/multi.c b/xen/arch/x86/mm/shadow/multi.c index 869d7baed0..8626cebc3d 100644 --- a/xen/arch/x86/mm/shadow/multi.c +++ b/xen/arch/x86/mm/shadow/multi.c @@ -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; -- generated by git-patchbot for /home/xen/git/xen.git#master
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |