[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[xen staging] x86/shadow: make sh_remove_write_access() helper HVM only



commit 43f1a11f9a5727289e0c89fe5ead4594f3582efa
Author:     Jan Beulich <jbeulich@xxxxxxxx>
AuthorDate: Wed Apr 22 10:50:05 2020 +0200
Commit:     Jan Beulich <jbeulich@xxxxxxxx>
CommitDate: Wed Apr 22 10:50:05 2020 +0200

    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 <andrew.cooper3@xxxxxxxxxx>
    Signed-off-by: Jan Beulich <jbeulich@xxxxxxxx>
    Reviewed-by: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>
    Acked-by: Tim Deegan <tim@xxxxxxx>
---
 xen/arch/x86/mm/shadow/common.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/xen/arch/x86/mm/shadow/common.c b/xen/arch/x86/mm/shadow/common.c
index aad977ccd7..4e135474e1 100644
--- a/xen/arch/x86/mm/shadow/common.c
+++ b/xen/arch/x86/mm/shadow/common.c
@@ -1756,6 +1756,7 @@ void sh_destroy_shadow(struct domain *d, mfn_t smfn)
     }
 }
 
+#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(mfn_t gmfn)
     }
 }
 
-#ifdef CONFIG_HVM
 /**************************************************************************/
 /* Remove all writeable mappings of a guest frame from the shadow tables
  * Returns non-zero if we need to flush TLBs.
--
generated by git-patchbot for /home/xen/git/xen.git#staging



 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.