[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [PATCH v2 06/12] x86/p2m: hardware-log-dirty related hooks are HVM-only
Exclude functions using them from !HVM builds, thus making it possible to exclude the hooks as well. By moving an #endif in p2m.c (instead of introducing yet another one) p2m_{get,set}_ioreq_server() get excluded for !HVM builds as well. Signed-off-by: Jan Beulich <jbeulich@xxxxxxxx> --- v2: New. --- a/xen/arch/x86/mm/p2m.c +++ b/xen/arch/x86/mm/p2m.c @@ -369,8 +369,6 @@ void p2m_memory_type_changed(struct doma p2m_unlock(hostp2m); } -#endif /* CONFIG_HVM */ - int p2m_set_ioreq_server(struct domain *d, unsigned int flags, struct ioreq_server *s) @@ -464,6 +462,8 @@ void p2m_flush_hardware_cached_dirty(str } } +#endif /* CONFIG_HVM */ + /* * Force a synchronous P2M TLB flush if a deferred flush is pending. * --- a/xen/include/asm-x86/p2m.h +++ b/xen/include/asm-x86/p2m.h @@ -261,10 +261,10 @@ struct p2m_domain { bool_t *sve); int (*recalc)(struct p2m_domain *p2m, unsigned long gfn); +#ifdef CONFIG_HVM void (*enable_hardware_log_dirty)(struct p2m_domain *p2m); void (*disable_hardware_log_dirty)(struct p2m_domain *p2m); void (*flush_hardware_cached_dirty)(struct p2m_domain *p2m); -#ifdef CONFIG_HVM void (*change_entry_type_global)(struct p2m_domain *p2m, p2m_type_t ot, p2m_type_t nt); @@ -630,6 +630,9 @@ int guest_physmap_add_page(struct domain /* Set a p2m range as populate-on-demand */ int guest_physmap_mark_populate_on_demand(struct domain *d, unsigned long gfn, unsigned int order); + +#ifdef CONFIG_HVM + /* Enable hardware-assisted log-dirty. */ void p2m_enable_hardware_log_dirty(struct domain *d); @@ -639,6 +642,12 @@ void p2m_disable_hardware_log_dirty(stru /* Flush hardware cached dirty GFNs */ void p2m_flush_hardware_cached_dirty(struct domain *d); +#else + +static inline void p2m_flush_hardware_cached_dirty(struct domain *d) {} + +#endif + /* Change types across all p2m entries in a domain */ void p2m_change_entry_type_global(struct domain *d, p2m_type_t ot, p2m_type_t nt);
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |