[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Xen-devel] PV drivers for HVM guests

Muli Ben-Yehuda wrote:
>> A shim layer (i.e., a set of compat macros) that avoids ifdef'ing
>> the core driver code is definitely the way to go.
> FWIW, neither option has a chance of being accepted upstream.

Exactly thats why a shim layer is the way to go (if possible, doesn't
work for all changes but for most).  Did that that quite some time while
maintaining the v4l subsystem.  Making driver source code use the
2.6.latest conventions and have some compat.h header file full of stuff
like this ...

  # define foo gryyz

or (better if possible as it catches distro backports, which does happen
now and then for compiling recent drivers on old distro kernels).

  #ifndef bar
  # define bar xyzzy

nicely separates out the compat bits.  It makes the code more readable
and also is less work when submitting code upstream.



Gerd Hoffmann <kraxel@xxxxxxx>

Xen-devel mailing list



Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.