On Thu, 14 Mar 2024, George Dunlap wrote:
> On Thu, Mar 14, 2024 at 7:36 AM Jan Beulich <jbeul...@suse.com> wrote:
> >
> > On 14.03.2024 00:23, Stefano Stabellini wrote:
> > > Xen makes assumptions about the size of integer types on the various
> > > architectures. Document these assumptions.
> >
> > This all reads as if we required exact widths. Is that really the case?
> 
> At least one thing here is that *all compilers on the architecture*
> need to have the same idea.  If not, we absolutely need to change
> "unsigned int" to "uint32_t" in any public interface.

Minor NIT to say "all compilers we intend to support on the
architecture". I am sure there are compilers that don't respect these
assumptions out there but we won't support them.


> A second thing is not only assumptions about minimum number of bits,
> but about storage size and alignment.  Again, if we don't assume that
> "unsigned int" is exactly 4 bytes, then we should go through and
> change it to "uint32_t" anywhere that the size or alignment matter.

Yes, exactly.

Actually I forgot to add the alignment information. I'll do that in the
next version of the patch.

Reply via email to