On Thu, 2015-08-06 at 10:34 +0200, Andreas Beckmann wrote:
> On 2015-08-06 01:50, Luca Boccassi wrote:
> > Works on 4.0 and 4.1, but not on 3.16 due to this error:
> > 
> > FATAL: modpost: GPL-incompatible module nvidia.ko uses GPL-only symbol
> > 'xen_start_info'
> > /usr/src/linux-headers-3.16.0-4-common/scripts/Makefile.modpost:90:
> > recipe for target '__modpost' failed
> > 
> > This goes away when I hack away CONFIG_XEN from the headers auto.conf. I
> > do not see anything else that we could disable in nv-linux.h or that we
> > are missing in conftest.h. Any clue where that comes from?
> 
> maybe kernel internals ... I don't see this symbol in the nvidia source,
> so maybe comes from a macro ... let's check ...
> 
> linux-headers-3.16.0-4-common/include/xen/xen.h
> #ifdef CONFIG_XEN_DOM0
> #include <xen/interface/xen.h>
> #include <asm/xen/hypervisor.h>
> 
> #define xen_initial_domain()    (xen_domain() && \
>                                  xen_start_info && xen_start_info->flags
> & SIF_INITDOMAIN)
> #else  /* !CONFIG_XEN_DOM0 */
> #define xen_initial_domain()    (0)
> #endif  /* CONFIG_XEN_DOM0 */
> 
> 
> you could try in nv-linux.h
> 
> #ifndef AUTOCONF_INCLUDED
> ...
> #endif
> +
> +#if CONFIG_this_is_armhf && this_is_kernel_LEQ_3.16.x  // (< 3.17)
> +#undef CONFIG_XEN
> +#endif
> 
> or if that does not work, try #undef CONFIG_XEN_DOM0 (or both)
> 
> no, this is not a proper patch :-)
> 
> 
> that would perform your config_xen hack within the nvidia source
> (and I would restrict it to <= 3.16, while this leaves some gap to 4.0
> where it seems no longer needed, but better let's extend that crude hack
> to more versions later if neccessary)
> 
> 
> If that works, put a disclaimer in the patch description that this makes
> the module build (tested in qemu-builder), but we could not test whether
> the module actually works.
> Recommend to build a kernel without CONFIG_XEN (or with CONFIG_PARAVIRT
> enabled) instead.
> Should be in the other arm xen hack patch, too.

Yes, undefining CONFIG_XEN and CONFIG_XEN_DOM0 works on 3.16 too, as you
suggested. The patch header has been updated as you asked as well.
Thanks for the tip!

Instead of creating a new patch, I updated the other XEN ARM hack patch,
since they are both doing the same thing for the same purpose it makes
sense to group them. Hopefully it will make it easier to junk them one
day soon :-)

Do you have a contact in the kernel team to ping and ask clarifications
about the armmp config (more for curiosity than anything else, at this
point)? Or would you like me to send an email to the list?

Tomorrow or the day after I'll add the instruction for the qemu armhf
setup to the readme so that it's documented (it is really trivial, it's
enough to install qemu-user-static from Sid (>= 1:2.3) and using
DEBOOTSTRAP="qemu-debootstrap" with pdebuild on top of cowbuilder).

Kind regards,
Luca Boccassi

Attachment: signature.asc
Description: This is a digitally signed message part

Reply via email to