x86/shadow: make sh_remove_write_access() helper HVM only
PATCH 1/1 x86/shadow: make sh_remove_write_access() helper HVM only
Despite the inline attribute at least some clang versions warn about trace_shadow_wrmap_bf() being unused in !HVM builds. Include the helper in the #ifdef region.
Fixes 8b8d011ad868 ("x86/shadow: the guess_wrmap() hook is needed for HVM only")
Reported-by Andrew Cooper <[email protected]>
Signed-off-by Jan Beulich <[email protected]>
xen/arch/x86/mm/shadow/common.c +1 -1
@@ -1756,6 +1756,7 @@ void sh_destroy_shadow(struct domain *d, } } +#ifdef CONFIG_HVM static inline void trace_shadow_wrmap_bf (mfn_t gmfn) {if ( tb_init_done )
@@ -1767,7 +1768,6 @@ static inline void trace_shadow_wrmap_bf } } -#ifdef CONFIG_HVM /**************************************************************************/ /* Remove all writeable mappings of a guest frame from the shadow tables * Returns non-zero if we need to flush TLBs.
Quoted 7 lines · Jan Beulich
Despite the inline attribute at least some clang versions warn about
trace_shadow_wrmap_bf()being unused in !HVM builds. Include the helper in the #ifdef region.Fixes 8b8d011ad868 ("x86/shadow: the guess_wrmap() hook is needed for HVM only")Reported-by Andrew Cooper <[email protected]>Signed-off-by Jan Beulich <[email protected]>
Reviewed-by Andrew Cooper <[email protected]>
Quoted 7 lines · Jan Beulich
Despite the inline attribute at least some clang versions warn about
trace_shadow_wrmap_bf()being unused in !HVM builds. Include the helper in the #ifdef region.Fixes 8b8d011ad868 ("x86/shadow: the guess_wrmap() hook is needed for HVM only")Reported-by Andrew Cooper <[email protected]>Signed-off-by Jan Beulich <[email protected]>
Acked-by Tim Deegan <[email protected]>