From: Keir Fraser Date: Thu, 11 Oct 2007 09:21:08 +0000 (+0100) Subject: More static shadow functions. X-Git-Tag: 3.1.2-rc1~16 X-Git-Url: http://xenbits.xensource.com/gitweb?a=commitdiff_plain;h=dc21f1dc50b4125df039203c4b0f2c007c46f205;p=people%2Fvhanquez%2Fxen.git More static shadow functions. Signed-off-by: Jan Beulich xen-unstable changeset: 16091:19a843def5fdd3853b0b5372c512a5c623954ae7 xen-unstable date: Thu Oct 11 10:21:08 2007 +0100 --- diff --git a/xen/arch/x86/mm/shadow/common.c b/xen/arch/x86/mm/shadow/common.c index ed4f4da03..8ae8174e3 100644 --- a/xen/arch/x86/mm/shadow/common.c +++ b/xen/arch/x86/mm/shadow/common.c @@ -729,7 +729,7 @@ int shadow_cmpxchg_guest_entry(struct vcpu *v, intpte_t *p, * at the same time, which means that to guarantee progress, we must * allow for more than ninety allocated pages per vcpu. We round that * up to 128 pages, or half a megabyte per vcpu. */ -unsigned int shadow_min_acceptable_pages(struct domain *d) +static unsigned int shadow_min_acceptable_pages(struct domain *d) { u32 vcpu_count = 0; struct vcpu *v; @@ -784,7 +784,7 @@ static inline int chunk_is_available(struct domain *d, int order) /* Dispatcher function: call the per-mode function that will unhook the * non-Xen mappings in this top-level shadow mfn */ -void shadow_unhook_mappings(struct vcpu *v, mfn_t smfn) +static void shadow_unhook_mappings(struct vcpu *v, mfn_t smfn) { struct shadow_page_info *sp = mfn_to_shadow_page(smfn); switch ( sp->type ) @@ -1124,7 +1124,7 @@ sh_alloc_p2m_pages(struct domain *d) } // Returns 0 if no memory is available... -struct page_info * +static struct page_info * shadow_alloc_p2m_page(struct domain *d) { struct list_head *entry; @@ -1154,7 +1154,7 @@ shadow_alloc_p2m_page(struct domain *d) return pg; } -void +static void shadow_free_p2m_page(struct domain *d, struct page_info *pg) { ASSERT(page_get_owner(pg) == d); diff --git a/xen/arch/x86/mm/shadow/private.h b/xen/arch/x86/mm/shadow/private.h index 87e72f0c6..962d0962d 100644 --- a/xen/arch/x86/mm/shadow/private.h +++ b/xen/arch/x86/mm/shadow/private.h @@ -363,10 +363,6 @@ void shadow_free(struct domain *d, mfn_t smfn); /* Function to convert a shadow to log-dirty */ void shadow_convert_to_log_dirty(struct vcpu *v, mfn_t smfn); -/* Dispatcher function: call the per-mode function that will unhook the - * non-Xen mappings in this top-level shadow mfn */ -void shadow_unhook_mappings(struct vcpu *v, mfn_t smfn); - /* Install the xen mappings in various flavours of shadow */ void sh_install_xen_entries_in_l4(struct vcpu *v, mfn_t gl4mfn, mfn_t sl4mfn); void sh_install_xen_entries_in_l2(struct vcpu *v, mfn_t gl2mfn, mfn_t sl2mfn); @@ -386,10 +382,6 @@ extern int sh_remove_write_access(struct vcpu *v, mfn_t readonly_mfn, unsigned int level, unsigned long fault_addr); -/* Allocate/free functions for passing to the P2M code. */ -struct page_info *shadow_alloc_p2m_page(struct domain *d); -void shadow_free_p2m_page(struct domain *d, struct page_info *pg); - /* Functions that atomically write PT/P2M entries and update state */ void shadow_write_p2m_entry(struct vcpu *v, unsigned long gfn, l1_pgentry_t *p, mfn_t table_mfn,