lkml.org 
[lkml]   [2015]   [May]   [30]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [Xen-devel] [PATCH 95/98] HACK: fix include/uapi/xen/privcmd.h compilation in userspace
On 30/05/15 16:39, Mikko Rapeli wrote:
> privcmd.h depends on xen/interface/xen.h which is now exported to userspace.
> xen/interface/xen.h then depends on asm/xen/interface.h which is now
> exported to userspace together with its dependencies asm/xen/interface_32.h,
> asm/xen/interface_64.h and asm/pvclock-abi.h on x86 architecture.
>
> Then all of these headers were fixed to use __u8 etc from linux/types.h
> instead of custom types.
>
> Then define uint64_t and uint32_t if needed.
>
> After all these changes these header files now compile in userspace too
> on x86.
>
> HACK since I have no idea if this is correct way to fix this.
>
> Signed-off-by: Mikko Rapeli <mikko.rapeli@iki.fi>

Historical reasons expect xen/interface/xen.h to be a verbatim copy of
the master version kept in the Xen repository.

The only things privcmd.h need from interface/xen.h are domid_t
(uint16_t), and xen_pfn_t (unsigned long, or uint64_t in arm32 iirc),
while the majority of the rest absolutely shouldn't be in Linux’s uapi.

It would probably be best to provide just these two types and nuke the
"#include <xen/interface/xen.h>". Any user of privcmd needs to include
the Xen interface themselves anyway, and will have a different copy
which includes the toolstack half of the interface (missing from the
kernel copy) which is the useful set of definitions for driving the
privcmd ioctl()s.

~Andrew


\
 
 \ /
  Last update: 2015-05-30 20:41    [W:0.527 / U:35.880 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site