From: "Jan Beulich" Subject: [PATCH v2 2/5] x86/shadow: don't needlessly expose internal functions Date: Mon, 02 Feb 2015 11:19:24 +0000 Message-ID: <54CF6B4C020000780005BDB5@mail.emea.novell.com> References: <54CF68DF020000780005BD6C@mail.emea.novell.com> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=__Part82B7142C.1__=" Return-path: Received: from mail6.bemta3.messagelabs.com ([195.245.230.39]) by lists.xen.org with esmtp (Exim 4.72) (envelope-from ) id 1YIF2O-0004CF-Sp for xen-devel@lists.xenproject.org; Mon, 02 Feb 2015 11:19:29 +0000 In-Reply-To: <54CF68DF020000780005BD6C@mail.emea.novell.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: xen-devel Cc: Andrew Cooper , Keir Fraser , Tim Deegan List-Id: xen-devel@lists.xenproject.org This is a MIME message. If you are reading this text, you may want to consider changing to a mail reader or gateway that understands how to properly handle MIME multipart messages. --=__Part82B7142C.1__= Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: quoted-printable Content-Disposition: inline ... and drop an unused one. Signed-off-by: Jan Beulich --- a/xen/arch/x86/mm/shadow/common.c +++ b/xen/arch/x86/mm/shadow/common.c @@ -2383,7 +2383,7 @@ int sh_remove_write_access_from_sl1p(str /* Remove all mappings of a guest frame from the shadow tables. * Returns non-zero if we need to flush TLBs. */ =20 -int sh_remove_all_mappings(struct vcpu *v, mfn_t gmfn) +static int sh_remove_all_mappings(struct vcpu *v, mfn_t gmfn) { struct page_info *page =3D mfn_to_page(gmfn); =20 --- a/xen/arch/x86/mm/shadow/private.h +++ b/xen/arch/x86/mm/shadow/private.h @@ -387,6 +387,11 @@ int shadow_write_guest_entry(struct vcpu int shadow_cmpxchg_guest_entry(struct vcpu *v, intpte_t *p, intpte_t *old, intpte_t new, mfn_t gmfn); =20 +/* Update all the things that are derived from the guest's CR0/CR3/CR4. + * Called to initialize paging structures if the paging mode + * has changed, and when bringing up a VCPU for the first time. */ +void shadow_update_paging_modes(struct vcpu *v); + /* Unhook the non-Xen mappings in this top-level shadow mfn. * With user_only =3D=3D 1, unhooks only the user-mode mappings. */ void shadow_unhook_mappings(struct vcpu *v, mfn_t smfn, int user_only); --- a/xen/include/asm-x86/shadow.h +++ b/xen/include/asm-x86/shadow.h @@ -77,23 +77,6 @@ void shadow_teardown(struct domain *d); /* Call once all of the references to the domain have gone away */ void shadow_final_teardown(struct domain *d); =20 -/* Update all the things that are derived from the guest's CR0/CR3/CR4. - * Called to initialize paging structures if the paging mode - * has changed, and when bringing up a VCPU for the first time. */ -void shadow_update_paging_modes(struct vcpu *v); - - -/* Remove all mappings of the guest page from the shadows.=20 - * This is called from common code. It does not flush TLBs. */ -int sh_remove_all_mappings(struct vcpu *v, mfn_t target_mfn); -static inline void=20 -shadow_drop_references(struct domain *d, struct page_info *p) -{ - if ( unlikely(shadow_mode_enabled(d)) ) - /* See the comment about locking in sh_remove_all_mappings */ - sh_remove_all_mappings(d->vcpu[0], _mfn(page_to_mfn(p))); -} - /* Remove all shadows of the guest mfn. */ void sh_remove_shadows(struct vcpu *v, mfn_t gmfn, int fast, int all); static inline void shadow_remove_all_shadows(struct vcpu *v, mfn_t gmfn) --=__Part82B7142C.1__= Content-Type: text/plain; name="x86-shadow-private.patch" Content-Transfer-Encoding: quoted-printable Content-Disposition: attachment; filename="x86-shadow-private.patch" x86/shadow: don't needlessly expose internal functions=0A=0A... and drop = an unused one.=0A=0ASigned-off-by: Jan Beulich =0A=0A---= a/xen/arch/x86/mm/shadow/common.c=0A+++ b/xen/arch/x86/mm/shadow/common.c= =0A@@ -2383,7 +2383,7 @@ int sh_remove_write_access_from_sl1p(str=0A /* = Remove all mappings of a guest frame from the shadow tables.=0A * Returns = non-zero if we need to flush TLBs. */=0A =0A-int sh_remove_all_mappings(str= uct vcpu *v, mfn_t gmfn)=0A+static int sh_remove_all_mappings(struct vcpu = *v, mfn_t gmfn)=0A {=0A struct page_info *page =3D mfn_to_page(gmfn);= =0A =0A--- a/xen/arch/x86/mm/shadow/private.h=0A+++ b/xen/arch/x86/mm/shado= w/private.h=0A@@ -387,6 +387,11 @@ int shadow_write_guest_entry(struct = vcpu=0A int shadow_cmpxchg_guest_entry(struct vcpu *v, intpte_t *p,=0A = intpte_t *old, intpte_t new, mfn_t gmfn);=0A = =0A+/* Update all the things that are derived from the guest's CR0/CR3/CR4.= =0A+ * Called to initialize paging structures if the paging mode=0A+ * has = changed, and when bringing up a VCPU for the first time. */=0A+void = shadow_update_paging_modes(struct vcpu *v);=0A+=0A /* Unhook the non-Xen = mappings in this top-level shadow mfn.=0A * With user_only =3D=3D 1, = unhooks only the user-mode mappings. */=0A void shadow_unhook_mappings(stru= ct vcpu *v, mfn_t smfn, int user_only);=0A--- a/xen/include/asm-x86/shadow.= h=0A+++ b/xen/include/asm-x86/shadow.h=0A@@ -77,23 +77,6 @@ void shadow_tea= rdown(struct domain *d);=0A /* Call once all of the references to the = domain have gone away */=0A void shadow_final_teardown(struct domain = *d);=0A =0A-/* Update all the things that are derived from the guest's = CR0/CR3/CR4.=0A- * Called to initialize paging structures if the paging = mode=0A- * has changed, and when bringing up a VCPU for the first time. = */=0A-void shadow_update_paging_modes(struct vcpu *v);=0A-=0A-=0A-/* = Remove all mappings of the guest page from the shadows. =0A- * This is = called from common code. It does not flush TLBs. */=0A-int sh_remove_all_m= appings(struct vcpu *v, mfn_t target_mfn);=0A-static inline void =0A-shadow= _drop_references(struct domain *d, struct page_info *p)=0A-{=0A- if ( = unlikely(shadow_mode_enabled(d)) )=0A- /* See the comment about = locking in sh_remove_all_mappings */=0A- sh_remove_all_mappings(d->v= cpu[0], _mfn(page_to_mfn(p)));=0A-}=0A-=0A /* Remove all shadows of the = guest mfn. */=0A void sh_remove_shadows(struct vcpu *v, mfn_t gmfn, int = fast, int all);=0A static inline void shadow_remove_all_shadows(struct = vcpu *v, mfn_t gmfn)=0A --=__Part82B7142C.1__= Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ Xen-devel mailing list Xen-devel@lists.xen.org http://lists.xen.org/xen-devel --=__Part82B7142C.1__=--