[Public]

> -----Original Message-----
> From: Jan Beulich <[email protected]>
> Sent: Thursday, October 30, 2025 8:44 PM
> To: Penny, Zheng <[email protected]>
> Cc: Huang, Ray <[email protected]>; [email protected]; Stefano
> Stabellini <[email protected]>; Julien Grall <[email protected]>; Bertrand
> Marquis <[email protected]>; Orzel, Michal <[email protected]>;
> Volodymyr Babchuk <[email protected]>; Andrew Cooper
> <[email protected]>; Anthony PERARD <[email protected]>;
> Roger Pau Monné <[email protected]>; Shawn Anastasio
> <[email protected]>; Alistair Francis 
> <[email protected]>;
> Bob Eshleman <[email protected]>; Connor Davis
> <[email protected]>; Tamas K Lengyel <[email protected]>; xen-
> [email protected]
> Subject: Re: [PATCH v3 15/28] xen/domctl: wrap domain_kill() with
> CONFIG_MGMT_HYPERCALLS
>
> On 13.10.2025 12:15, Penny Zheng wrote:
> > --- a/xen/arch/x86/mm/mem_sharing.c
> > +++ b/xen/arch/x86/mm/mem_sharing.c
> > @@ -1396,6 +1396,7 @@ int __mem_sharing_unshare_page(struct domain *d,
> >      return rc;
> >  }
> >
> > +#ifdef CONFIG_MGMT_HYPERCALLS
> >  int relinquish_shared_pages(struct domain *d)  {
> >      int rc = 0;
> > @@ -1452,6 +1453,7 @@ int relinquish_shared_pages(struct domain *d)
> >      p2m_unlock(p2m);
> >      return rc;
> >  }
> > +#endif /* CONFIG_MGMT_HYPERCALLS */
> >
> >  static int range_share(struct domain *d, struct domain *cd,
> >                         struct mem_sharing_op_range *range)
>
> Is this necessary? Shouldn't MEM_SHARING as a whole become dependent upon
> MGMT_HYPERCALLS, then also covering XENMEM_sharing_op? (The same will
> already implicitly happen for MEM_PAGING, due to its VM_EVENT dependency.)
>

Yes, Since I didn't see VM_EVENT dependency for MEM_SHARING. I'm not 100% sure 
that whether memory sharing feature is dependent on VM_EVENT. Also as I roughly 
look through the codes in mm/mem_sharing.c, maybe only 
mem_sharing_notify_enomem() utilizes vm event subsystem.

> Jan

Reply via email to