[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] [PATCH V2 2/3] x86/mm: allocate logdirty_ranges for altp2ms
>>> On 23.10.18 at 15:19, <rcojocaru@xxxxxxxxxxxxxxx> wrote: > --- a/xen/arch/x86/mm/p2m-ept.c > +++ b/xen/arch/x86/mm/p2m-ept.c > @@ -1348,6 +1348,8 @@ int ept_p2m_init(struct p2m_domain *p2m) > void ept_p2m_uninit(struct p2m_domain *p2m) > { > struct ept_data *ept = &p2m->ept; > + > + p2m_free_logdirty(p2m); This and ... > free_cpumask_var(ept->invalidate); > } > > @@ -1434,11 +1436,20 @@ void setup_ept_dump(void) > register_keyhandler('D', ept_dump_p2m_table, "dump VT-x EPT tables", 0); > } > > -void p2m_init_altp2m_ept(struct domain *d, unsigned int i) > +int p2m_init_altp2m_ept(struct domain *d, unsigned int i) > { > struct p2m_domain *p2m = d->arch.altp2m_p2m[i]; > struct p2m_domain *hostp2m = p2m_get_hostp2m(d); > struct ept_data *ept; > + int rc = p2m_init_logdirty(p2m); > + > + if ( rc ) > + return rc; > + > + rc = rangeset_merge(p2m->logdirty_ranges, hostp2m->logdirty_ranges); > + > + if ( rc ) > + return rc; ... all of this logically belong into p2m.c, as it's not code which is EPT-specific. This would also eliminate the need to make the two functions non-static. Also I think the rangeset_merge() invocation would deserve a brief comment noting that this "merge" is really just a "copy". Jan _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxxxxxxxxx https://lists.xenproject.org/mailman/listinfo/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |