Skip to contentSkip to conversation

uapi header dependencies?

DISCUSSION Juergen Gross 2 participants 2 messages Jun 13, 2018 1 message not in the archive

lore
Share & tools
lore

A message that is not in the archive (sent off-list or not yet received): [email protected]

#1 lore raw
Quoted 3 lines · Jan Beulich

Jürgen, Boris,

aren't headers in uapi/ directories supposed to be self contained?

Hmm, there are many uapi headers including stuff from outside uapi. I guess it is okay to include headers which are accessible in the kernel _and_ under /usr/include or to put such includes under #ifdef __KERNEL__

Quoted 4 lines

The addition done by David in fbc872c38c clearly isn't, as there's no domid_t anywhere in other uapi/ headers afaict. No idea how to reasonably adjust this; I'd in particular dislike using __u16 there, but perhaps that's the only option we have.

include/uapi/xen/privcmd.h is especially evil: it is including the kernel-only xen/interface/xen.h

Xen tools avoid the resulting problems by using a private copy of that file without the offending #include. OMG!

Juergen

_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xenproject.org/mailman/listinfo/xen-devel

#2 lore raw
Quoted 11 lines
Quoted 1 line
Quoted 1 line · On 13.06.18 at 17:03, <[email protected]> wrote:
Quoted 3 lines · Jan Beulich

Jürgen, Boris,

aren't headers in uapi/ directories supposed to be self contained?

Hmm, there are many uapi headers including stuff from outside uapi. I guess it is okay to include headers which are accessible in the kernel _and_ under /usr/include or to put such includes under #ifdef __KERNEL__

Quoted 7 lines
Quoted 4 lines

The addition done by David in fbc872c38c clearly isn't, as there's no domid_t anywhere in other uapi/ headers afaict. No idea how to reasonably adjust this; I'd in particular dislike using __u16 there, but perhaps that's the only option we have.

include/uapi/xen/privcmd.h is especially evil: it is including the kernel-only xen/interface/xen.h

Oh, indeed - apparently in order to obtain domid_t and xen_pfn_t (which is precisely what is missing from evtchn.h). What a mess.

Jan

_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xenproject.org/mailman/listinfo/xen-devel