From: "Jan Beulich" Subject: =?utf-8?q?=5BPATCH_4/4=5D_x86/shadow=3A_make_some_log?= =?utf-8?q?=E2=80=91dirty_handling_functions_static?= Date: Wed, 28 Jan 2015 08:12:19 +0000 Message-ID: <54C8A7F4020000780005A2DA@mail.emea.novell.com> References: <54C8A524020000780005A27E@mail.emea.novell.com> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=__Part9EAB0FF3.1__=" Return-path: Received: from mail6.bemta4.messagelabs.com ([85.158.143.247]) by lists.xen.org with esmtp (Exim 4.72) (envelope-from ) id 1YGNjb-0003iQ-Em for xen-devel@lists.xenproject.org; Wed, 28 Jan 2015 08:12:23 +0000 In-Reply-To: <54C8A524020000780005A27E@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. --=__Part9EAB0FF3.1__= Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: quoted-printable Content-Disposition: inline Noticed while introducing the stub replacement for disabling shadow paging support at build time. Signed-off-by: Jan Beulich --- a/xen/arch/x86/mm/shadow/common.c +++ b/xen/arch/x86/mm/shadow/common.c @@ -41,6 +41,10 @@ =20 DEFINE_PER_CPU(uint32_t,trace_shadow_path_flags); =20 +static int sh_enable_log_dirty(struct domain *, bool_t log_global); +static int sh_disable_log_dirty(struct domain *); +static void sh_clean_dirty_bitmap(struct domain *); + /* Set up the shadow-specific parts of a domain struct at start of day. * Called for every domain from arch_domain_create() */ int shadow_domain_init(struct domain *d, unsigned int domcr_flags) @@ -49,8 +53,8 @@ int shadow_domain_init(struct domain *d, INIT_PAGE_LIST_HEAD(&d->arch.paging.shadow.pinned_shadows); =20 /* Use shadow pagetables for log-dirty support */ - paging_log_dirty_init(d, shadow_enable_log_dirty,=20 - shadow_disable_log_dirty, shadow_clean_dirty_bit= map); + paging_log_dirty_init(d, sh_enable_log_dirty, + sh_disable_log_dirty, sh_clean_dirty_bitmap); =20 #if (SHADOW_OPTIMIZATIONS & SHOPT_OUT_OF_SYNC) d->arch.paging.shadow.oos_active =3D 0; @@ -3422,7 +3426,7 @@ shadow_write_p2m_entry(struct domain *d, /* Shadow specific code which is called in paging_log_dirty_enable(). * Return 0 if no problem found. */ -int shadow_enable_log_dirty(struct domain *d, bool_t log_global) +static int sh_enable_log_dirty(struct domain *d, bool_t log_global) { int ret; =20 @@ -3450,7 +3454,7 @@ int shadow_enable_log_dirty(struct domai } =20 /* shadow specfic code which is called in paging_log_dirty_disable() */ -int shadow_disable_log_dirty(struct domain *d) +static int sh_disable_log_dirty(struct domain *d) { int ret; =20 @@ -3464,7 +3468,7 @@ int shadow_disable_log_dirty(struct doma /* This function is called when we CLEAN log dirty bitmap. See=20 * paging_log_dirty_op() for details.=20 */ -void shadow_clean_dirty_bitmap(struct domain *d) +static void sh_clean_dirty_bitmap(struct domain *d) { paging_lock(d); /* Need to revoke write access to the domain's pages again. --- a/xen/include/asm-x86/shadow.h +++ b/xen/include/asm-x86/shadow.h @@ -77,15 +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 -/* shadow code to call when log dirty is enabled */ -int shadow_enable_log_dirty(struct domain *d, bool_t log_global); - -/* shadow code to call when log dirty is disabled */ -int shadow_disable_log_dirty(struct domain *d); - -/* shadow code to call when bitmap is being cleaned */ -void shadow_clean_dirty_bitmap(struct domain *d); - /* 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. */ --=__Part9EAB0FF3.1__= Content-Type: text/plain; name="x86-shadow-log-dirty-static.patch" Content-Transfer-Encoding: quoted-printable Content-Disposition: attachment; filename="x86-shadow-log-dirty-static.patch" x86/shadow: make some log-dirty handling functions static=0A=0ANoticed = while introducing the stub replacement for disabling shadow=0Apaging = support at build time.=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@@ -41,6 +41,10 @@=0A =0A DEFINE_PER_CPU(uint32_t,trace_shadow_p= ath_flags);=0A =0A+static int sh_enable_log_dirty(struct domain *, bool_t = log_global);=0A+static int sh_disable_log_dirty(struct domain *);=0A+static= void sh_clean_dirty_bitmap(struct domain *);=0A+=0A /* Set up the = shadow-specific parts of a domain struct at start of day.=0A * Called for = every domain from arch_domain_create() */=0A int shadow_domain_init(struct = domain *d, unsigned int domcr_flags)=0A@@ -49,8 +53,8 @@ int shadow_domain_= init(struct domain *d,=0A INIT_PAGE_LIST_HEAD(&d->arch.paging.shadow.pi= nned_shadows);=0A =0A /* Use shadow pagetables for log-dirty support = */=0A- paging_log_dirty_init(d, shadow_enable_log_dirty, =0A- = shadow_disable_log_dirty, shadow_clean_dirty_bitmap);=0A+ = paging_log_dirty_init(d, sh_enable_log_dirty,=0A+ = sh_disable_log_dirty, sh_clean_dirty_bitmap);=0A =0A #if (SHADOW_OPTIMIZAT= IONS & SHOPT_OUT_OF_SYNC)=0A d->arch.paging.shadow.oos_active =3D = 0;=0A@@ -3422,7 +3426,7 @@ shadow_write_p2m_entry(struct domain *d,=0A /* = Shadow specific code which is called in paging_log_dirty_enable().=0A * = Return 0 if no problem found.=0A */=0A-int shadow_enable_log_dirty(struct = domain *d, bool_t log_global)=0A+static int sh_enable_log_dirty(struct = domain *d, bool_t log_global)=0A {=0A int ret;=0A =0A@@ -3450,7 = +3454,7 @@ int shadow_enable_log_dirty(struct domai=0A }=0A =0A /* shadow = specfic code which is called in paging_log_dirty_disable() */=0A-int = shadow_disable_log_dirty(struct domain *d)=0A+static int sh_disable_log_dir= ty(struct domain *d)=0A {=0A int ret;=0A =0A@@ -3464,7 +3468,7 @@ int = shadow_disable_log_dirty(struct doma=0A /* This function is called when we = CLEAN log dirty bitmap. See =0A * paging_log_dirty_op() for details. =0A = */=0A-void shadow_clean_dirty_bitmap(struct domain *d)=0A+static void = sh_clean_dirty_bitmap(struct domain *d)=0A {=0A paging_lock(d);=0A = /* Need to revoke write access to the domain's pages again.=0A--- = a/xen/include/asm-x86/shadow.h=0A+++ b/xen/include/asm-x86/shadow.h=0A@@ = -77,15 +77,6 @@ void shadow_teardown(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-/* shadow code to call when log dirty = is enabled */=0A-int shadow_enable_log_dirty(struct domain *d, bool_t = log_global);=0A-=0A-/* shadow code to call when log dirty is disabled = */=0A-int shadow_disable_log_dirty(struct domain *d);=0A-=0A-/* shadow = code to call when bitmap is being cleaned */=0A-void shadow_clean_dirty_bit= map(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 --=__Part9EAB0FF3.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 --=__Part9EAB0FF3.1__=--