[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [PATCH 1/5] tools/debugger: Fix PAGE_SIZE redefinition error
At 14:36 +0300 on 30 Apr (1619793419), Costin Lupu wrote: > Hi Tim, > > On 4/29/21 10:58 PM, Tim Deegan wrote: > > Hi, > > > > At 15:05 +0300 on 27 Apr (1619535916), Costin Lupu wrote: > >> If PAGE_SIZE is already defined in the system (e.g. in > >> /usr/include/limits.h header) then gcc will trigger a redefinition error > >> because of -Werror. This commit also protects PAGE_SHIFT definitions for > >> keeping consistency. > > > > Thanks for looking into this! I think properly speaking we should fix > > this by defining KDD_PAGE_SHIFT and KDD_PAGE_SIZE in kdd.h and using > > those everywhere we currently use PAGE_SIZE/PAGE_SHIFT. in kdd.c and > > kdd-xen.c. If for some reason we ever ended up with a system-defined > > PAGE_SIZE that wasn't 4096u then we would not want to use it here > > because it would break our guest operations. > > As discussed for another patch of the series, an agreed solution that > would apply for other libs as well would be to use XC_PAGE_* macros > instead of PAGE_* macros. I've just sent a v2 doing that. Please let me > know if you think it would be better to introduce the KDD_PAGE_* > definitions instead. Sorry to be annoying, but yes, please do introduce the KDD_ versions. All the xen-specific code in KDD lives in kdd-xen.c; kdd.c shouldn't include any xen headers. Cheers, Tim.
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |