[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] [PATCH v4 1/4] ring.h: introduce macros to handle monodirectional rings with multiple req sizes
On Mon, 27 Mar 2017, Stefano Stabellini wrote: > > > +#ifndef PAGE_SHIFT > > > +#define PAGE_SHIFT 12 > > > +#endif > > > > ??? (I guess this should be another prereq?) > > Yes, the PAGE_SHIFT definition could be a prereq, but I thought that > these 3 lines are small enough that they would be harmless. I am happy > to make it a prereq though, I'll remove it. Thinking more about this, PAGE_SHIFT should come from Xen, rather than Linux or any standard headers, because on systems that support multiple page sizes, the page size of the Xen protocols should always be the same (4096). In other words, on an arm64 server Xen will use 4K pages, Dom0 could use 64K pages, but the 9pfs protocol will still use 4K pages for compatilibity with other guests that might or might not support 64K. This is how 64K pages are implemented in regards to Xen PV protocols today: we assume that 4K is baked into the protocols' ABI. Thus, I think I'll have to keep the PAGE_SHIFT definition here, but maybe I'll rename it to XEN_PAGE_SHIFT instead, to avoid clashes with the system's PAGE_SHIFT that could differ. Something like: #define XEN_PAGE_SHIFT 12 #define XEN_FLEX_RING_SIZE(order) \ (1UL << ((order) + XEN_PAGE_SHIFT - 1)) _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxx https://lists.xen.org/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |