|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-changelog] [xen master] x86/hap: initialise HAP logdirty function pointers once in hap_domain_init()
commit bc36a12f90c290a09ca515c20dafff6c4436d340
Author: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>
AuthorDate: Mon Aug 11 15:12:20 2014 +0200
Commit: Jan Beulich <jbeulich@xxxxxxxx>
CommitDate: Mon Aug 11 15:12:20 2014 +0200
x86/hap: initialise HAP logdirty function pointers once in hap_domain_init()
rather than repeatedly initialising them each time logdirty is enabled or
the
vram tracking area changes.
Signed-off-by: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>
Reviewed-by: Tim Deegan <tim@xxxxxxx>
---
xen/arch/x86/mm/hap/hap.c | 15 +++++----------
xen/arch/x86/mm/paging.c | 2 --
xen/include/asm-x86/hap.h | 1 -
3 files changed, 5 insertions(+), 13 deletions(-)
diff --git a/xen/arch/x86/mm/hap/hap.c b/xen/arch/x86/mm/hap/hap.c
index 21f57c1..abf3d7a 100644
--- a/xen/arch/x86/mm/hap/hap.c
+++ b/xen/arch/x86/mm/hap/hap.c
@@ -81,7 +81,6 @@ int hap_track_dirty_vram(struct domain *d,
if ( !paging_mode_log_dirty(d) )
{
- hap_logdirty_init(d);
rc = paging_log_dirty_enable(d, 0);
if ( rc )
goto out;
@@ -219,15 +218,6 @@ static void hap_clean_dirty_bitmap(struct domain *d)
flush_tlb_mask(d->domain_dirty_cpumask);
}
-void hap_logdirty_init(struct domain *d)
-{
-
- /* Reinitialize logdirty mechanism */
- paging_log_dirty_init(d, hap_enable_log_dirty,
- hap_disable_log_dirty,
- hap_clean_dirty_bitmap);
-}
-
/************************************************/
/* HAP SUPPORT FUNCTIONS */
/************************************************/
@@ -438,6 +428,11 @@ static void hap_destroy_monitor_table(struct vcpu* v,
mfn_t mmfn)
void hap_domain_init(struct domain *d)
{
INIT_PAGE_LIST_HEAD(&d->arch.paging.hap.freelist);
+
+ /* Use HAP logdirty mechanism. */
+ paging_log_dirty_init(d, hap_enable_log_dirty,
+ hap_disable_log_dirty,
+ hap_clean_dirty_bitmap);
}
/* return 0 for success, -errno for failure */
diff --git a/xen/arch/x86/mm/paging.c b/xen/arch/x86/mm/paging.c
index 32764ba..455000d 100644
--- a/xen/arch/x86/mm/paging.c
+++ b/xen/arch/x86/mm/paging.c
@@ -594,8 +594,6 @@ int paging_domctl(struct domain *d, xen_domctl_shadow_op_t
*sc,
break;
/* Else fall through... */
case XEN_DOMCTL_SHADOW_OP_ENABLE_LOGDIRTY:
- if ( hap_enabled(d) )
- hap_logdirty_init(d);
return paging_log_dirty_enable(d, 1);
case XEN_DOMCTL_SHADOW_OP_OFF:
diff --git a/xen/include/asm-x86/hap.h b/xen/include/asm-x86/hap.h
index 5161927..7876527 100644
--- a/xen/include/asm-x86/hap.h
+++ b/xen/include/asm-x86/hap.h
@@ -56,7 +56,6 @@ int hap_enable(struct domain *d, u32 mode);
void hap_final_teardown(struct domain *d);
void hap_teardown(struct domain *d);
void hap_vcpu_init(struct vcpu *v);
-void hap_logdirty_init(struct domain *d);
int hap_track_dirty_vram(struct domain *d,
unsigned long begin_pfn,
unsigned long nr,
--
generated by git-patchbot for /home/xen/git/xen.git#master
_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |