On 10/09/2019 13:17, Jan Beulich wrote: > On 10.09.2019 14:01, Ian Jackson wrote: >> c/s f089fddd941 broke the Ocaml ABI by renumering >> XEN_SYSCTL_PHYSCAP_directio without adjusting the Ocaml >> physinfo_cap_flag enumeration. >> >> Add build machinery which will check the ABI correspondence. >> >> This will result in a compile time failure whenever constants get >> renumbered/added without a compatible adjustment to the Ocaml ABI. >> >> Signed-off-by: Andrew Cooper <andrew.coop...@citrix.com> >> Signed-off-by: Ian Jackson <ian.jack...@eu.citrix.com> >> Acked-by: Christian Lindig <christian.lin...@citrix.com> > Just in case you want an extra ack for the tiny sysctl.h addition: > Acked-by: Jan Beulich <jbeul...@suse.com> > >> --- a/xen/include/public/sysctl.h >> +++ b/xen/include/public/sysctl.h >> @@ -90,6 +90,10 @@ struct xen_sysctl_tbuf_op { >> /* The platform supports direct access to I/O devices with IOMMU. */ >> #define _XEN_SYSCTL_PHYSCAP_directio 2 >> #define XEN_SYSCTL_PHYSCAP_directio (1u<<_XEN_SYSCTL_PHYSCAP_directio) >> + >> +/* Max XEN_SYSCTL_PHYSCAP_* constant. Used for ABI checking. */ >> +#define XEN_SYSCTL_PHYSCAP_MAX XEN_SYSCTL_PHYSCAP_directio > I don't particularly like such "max" values put in (public) headers > (as they require constant updating), but I can't see a good > alternative either.
This is the best I could come up with. At least it is in a tools-restricted header. ~Andrew _______________________________________________ Xen-devel mailing list Xen-devel@lists.xenproject.org https://lists.xenproject.org/mailman/listinfo/xen-devel