On 30/05/2019 07:18, Petre Pircalabu wrote: > The domain reference can be part of the vm_event_domain structure > because for every call to a vm_event interface function both the latter > and it's corresponding domain are passed as parameters.
It can, but why is adding a backpointer helpful? I ask because I see 5 reads of ved->d, and nothing which ever initialises it. This should be split into two patches. The first which adds the backpointer, with working initialisation, and the second which drops the struct domain parameter from the impacted APIs. ~Andrew > diff --git a/xen/arch/x86/mm/p2m.c b/xen/arch/x86/mm/p2m.c > index 4c99548..625fc9b 100644 > --- a/xen/arch/x86/mm/p2m.c > +++ b/xen/arch/x86/mm/p2m.c > @@ -1704,8 +1704,7 @@ void p2m_mem_paging_populate(struct domain *d, unsigned > long gfn_l) > struct p2m_domain *p2m = p2m_get_hostp2m(d); > > /* We're paging. There should be a ring */ > - int rc = vm_event_claim_slot(d, d->vm_event_paging); > - > + int rc = vm_event_claim_slot(d->vm_event_paging); You've dropped a newline here, which should be retained. ~Andrew _______________________________________________ Xen-devel mailing list [email protected] https://lists.xenproject.org/mailman/listinfo/xen-devel
