[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [xen master] x86/shadow: sh_remove_all_mappings() is HVM-only
commit ba6d62ad71798b76b1c10b42e7d1c38d0429e45f Author: Jan Beulich <jbeulich@xxxxxxxx> AuthorDate: Mon Jan 9 14:29:13 2023 +0100 Commit: Jan Beulich <jbeulich@xxxxxxxx> CommitDate: Mon Jan 9 14:29:13 2023 +0100 x86/shadow: sh_remove_all_mappings() is HVM-only All callers live in hvm.c. Moving the function there is undesirable, as hash walking is local to common.c and probably better remains so. Hence move an #endif, allowing to drop an #ifdef. Signed-off-by: Jan Beulich <jbeulich@xxxxxxxx> Acked-by: Andrew Cooper <andrew.cooper3@xxxxxxxxxx> --- xen/arch/x86/mm/shadow/common.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/xen/arch/x86/mm/shadow/common.c b/xen/arch/x86/mm/shadow/common.c index d561f08822..6f2685d4cf 100644 --- a/xen/arch/x86/mm/shadow/common.c +++ b/xen/arch/x86/mm/shadow/common.c @@ -2035,7 +2035,6 @@ int sh_remove_write_access(struct domain *d, mfn_t gmfn, /* We killed at least one writeable mapping, so must flush TLBs. */ return 1; } -#endif /* CONFIG_HVM */ /**************************************************************************/ /* Remove all mappings of a guest frame from the shadow tables. @@ -2047,12 +2046,10 @@ int sh_remove_all_mappings(struct domain *d, mfn_t gmfn, gfn_t gfn) /* Dispatch table for getting per-type functions */ static const hash_domain_callback_t callbacks[SH_type_unused] = { -#ifdef CONFIG_HVM [SH_type_l1_32_shadow] = SHADOW_INTERNAL_NAME(sh_rm_mappings_from_l1, 2), [SH_type_fl1_32_shadow] = SHADOW_INTERNAL_NAME(sh_rm_mappings_from_l1, 2), [SH_type_l1_pae_shadow] = SHADOW_INTERNAL_NAME(sh_rm_mappings_from_l1, 3), [SH_type_fl1_pae_shadow] = SHADOW_INTERNAL_NAME(sh_rm_mappings_from_l1, 3), -#endif [SH_type_l1_64_shadow] = SHADOW_INTERNAL_NAME(sh_rm_mappings_from_l1, 4), [SH_type_fl1_64_shadow] = SHADOW_INTERNAL_NAME(sh_rm_mappings_from_l1, 4), }; @@ -2107,6 +2104,7 @@ int sh_remove_all_mappings(struct domain *d, mfn_t gmfn, gfn_t gfn) return 1; } +#endif /* CONFIG_HVM */ /**************************************************************************/ /* Remove all shadows of a guest frame from the shadow tables */ -- generated by git-patchbot for /home/xen/git/xen.git#master
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |