On 10.02.2026 18:30, Alejandro Vallejo wrote: > --- a/xen/arch/x86/include/asm/mem_sharing.h > +++ b/xen/arch/x86/include/asm/mem_sharing.h > @@ -9,10 +9,12 @@ > #ifndef __MEM_SHARING_H__ > #define __MEM_SHARING_H__ > > -#include <public/domctl.h> > -#include <public/memory.h> > +struct xen_domctl_mem_sharing_op; > > #ifdef CONFIG_MEM_SHARING > +#include <xen/sched.h> > + > +struct xen_mem_sharing_op; > > #define mem_sharing_enabled(d) ((d)->arch.hvm.mem_sharing.enabled) > > @@ -92,8 +94,6 @@ int mem_sharing_fork_reset(struct domain *d, bool > reset_state, > int mem_sharing_notify_enomem(struct domain *d, unsigned long gfn, > bool allow_sleep); > int mem_sharing_memop(XEN_GUEST_HANDLE_PARAM(xen_mem_sharing_op_t) arg); > -int mem_sharing_domctl(struct domain *d, > - struct xen_domctl_mem_sharing_op *mec); > > /* > * Scans the p2m and relinquishes any shared pages, destroying > @@ -103,6 +103,7 @@ int mem_sharing_domctl(struct domain *d, > int relinquish_shared_pages(struct domain *d); > > #else > +struct domctl;
DYM struct domain? If so (can adjust while committing): Reviewed-by: Jan Beulich <[email protected]> Cc-ing Tamas at least for awareness; I think ./MAINTAINERS should enumerate this file in the X86 MEMORY SHARING section. > --- a/xen/arch/x86/include/asm/p2m.h > +++ b/xen/arch/x86/include/asm/p2m.h > @@ -806,12 +806,10 @@ static inline void p2m_pt_init(struct p2m_domain *p2m) > {} > void *map_domain_gfn(struct p2m_domain *p2m, gfn_t gfn, mfn_t *mfn, > p2m_query_t q, uint32_t *pfec); > > -#if P2M_AUDIT > -extern void audit_p2m(struct domain *d, > - uint64_t *orphans, > - uint64_t *m2p_bad, > - uint64_t *p2m_bad); > -#endif /* P2M_AUDIT */ > +void audit_p2m(struct domain *d, > + uint64_t *orphans, > + uint64_t *m2p_bad, > + uint64_t *p2m_bad); If already you adjust this beyond dropping the #ifdef, I think we also want to make use of line length, to better match e.g. the other prototype in patch context above. I'm likely to take the liberty of doing so while committing. Jan
