[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [PATCH v2 1/2] xen/domain: Annotate struct domain as page aligned
On Mon, 3 Mar 2025, Andrew Cooper wrote: > struct domain is always a page aligned allocation. Update it's type to > reflect this, so we can safely reuse the lower bits in the pointer for > auxiliary information. > > No functional change. > > Signed-off-by: Andrew Cooper <andrew.cooper3@xxxxxxxxxx> Reviewed-by: Stefano Stabellini <sstabellini@xxxxxxxxxx> > --- > CC: Anthony PERARD <anthony.perard@xxxxxxxxxx> > CC: Michal Orzel <michal.orzel@xxxxxxx> > CC: Jan Beulich <jbeulich@xxxxxxxx> > CC: Julien Grall <julien@xxxxxxx> > CC: Roger Pau Monné <roger.pau@xxxxxxxxxx> > CC: Stefano Stabellini <sstabellini@xxxxxxxxxx> > CC: Dario Faggioli <dfaggioli@xxxxxxxx> > CC: Juergen Gross <jgross@xxxxxxxx> > CC: George Dunlap <gwd@xxxxxxxxxxxxxx> > > v2: > * New > > Interestingly this does cause two changes in the resulting binary, both caused > by GCC electing to use a more complicated addressing mode to save one ADD > instruction. > --- > xen/include/xen/sched.h | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/xen/include/xen/sched.h b/xen/include/xen/sched.h > index 037c83fda219..8412b45178ca 100644 > --- a/xen/include/xen/sched.h > +++ b/xen/include/xen/sched.h > @@ -645,7 +645,7 @@ struct domain > unsigned int num_llc_colors; > const unsigned int *llc_colors; > #endif > -}; > +} __aligned(PAGE_SIZE); > > static inline struct page_list_head *page_to_list( > struct domain *d, const struct page_info *pg) > -- > 2.39.5 >
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |