The function will skip stamping the page when the page is used as page
table in shadow mode. Since it is called both in PV code and common
code we need to export it.

Signed-off-by: Wei Liu <wei.l...@citrix.com>
---
I tried to move it to a header to keep in static inline but couldn't
find a place that works.

This function depends on asm/flushtlb.h and asm/shadow.h;
asm/flushtlb.h depends on xen/mm.h; xen/mm.h depends on asm/mm.h.

The best location would be asm/mm.h, but that creates a circular
dependency.

Moving it to flushtlb.h (and include shadow.h there) breaks
compilation of other files that include flushtlb.h.
---
 xen/arch/x86/mm.c        | 2 +-
 xen/include/asm-x86/mm.h | 2 ++
 2 files changed, 3 insertions(+), 1 deletion(-)

diff --git a/xen/arch/x86/mm.c b/xen/arch/x86/mm.c
index e0dfa58f95..db6b703c56 100644
--- a/xen/arch/x86/mm.c
+++ b/xen/arch/x86/mm.c
@@ -521,7 +521,7 @@ void update_cr3(struct vcpu *v)
     make_cr3(v, cr3_mfn);
 }
 
-static inline void set_tlbflush_timestamp(struct page_info *page)
+void set_tlbflush_timestamp(struct page_info *page)
 {
     /*
      * Record TLB information for flush later. We do not stamp page tables
diff --git a/xen/include/asm-x86/mm.h b/xen/include/asm-x86/mm.h
index dca1831382..f6399f531b 100644
--- a/xen/include/asm-x86/mm.h
+++ b/xen/include/asm-x86/mm.h
@@ -628,4 +628,6 @@ static inline bool arch_mfn_in_directmap(unsigned long mfn)
     return mfn <= (virt_to_mfn(eva - 1) + 1);
 }
 
+void set_tlbflush_timestamp(struct page_info *page);
+
 #endif /* __ASM_X86_MM_H__ */
-- 
2.11.0


_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel

Reply via email to