[vbox-dev] [PATCH] drm vbox_ttm build fix

Klaus Espenlaub klaus.espenlaub at oracle.com
Thu Nov 7 19:14:26 GMT 2019


it's now addressed in trunk and all still supported branches. Next test
builds (anything after r134528) will have this. To be on the safe side
better wait for a little higher revision to be certain that the Guest
Additions ISO in the package is also updated.

Just to point it out: "our" way was official until Linux 4.12 (our
driver is modeled as closely to drivers/gpu/drm/ast as possible). It
also took the Linux devs "a few years" to fix an in-kernel driver which
had a quirky include hack for ages :)

Since our driver needs to stay working with old kernels (which had a
giant mess with the ttm related headers - there were loads of #include
<ttm/...> issues everywhere before it was cleaned up as part of 4.13,
all the way back to 2.6.31) we can't drop the extra include path
trickery. It shouldn't do harm, though.

Klaus

On 19.10.2019 14:23, Frank Batschulat wrote:
> Yeah, right. I didn't liked it the current way either.
> I'll correct the include path in trunk, 6.x and 5.x soon,
> issue 3) is the red herring here.
> 
> On Sat, 19 Oct 2019 13:57:10 +0200, Gianfranco Costamagna
> <locutusofborg at debian.org> wrote:
> 
>>  Hello Frank,
>> src/VBox/Additions/linux/drm/vbox_drv.h:#include <drm/ttm/ttm_bo_api.h>
>> src/VBox/Additions/linux/drm/vbox_drv.h:#include
>> <drm/ttm/ttm_bo_driver.h>
>> src/VBox/Additions/linux/drm/vbox_drv.h:#include
>> <drm/ttm/ttm_placement.h>
>> src/VBox/Additions/linux/drm/vbox_drv.h:#include <drm/ttm/ttm_memory.h>
>> src/VBox/Additions/linux/drm/vbox_drv.h:#include <drm/ttm/ttm_module.h>
>> src/VBox/Additions/linux/drm/vbox_ttm.c:#include <ttm/ttm_page_alloc.h>
>>
>> while the workaround might work for you, it has 2+ issues:1) it makes
>> the includes not consistent across the code2) it is not what kernel
>> developers suggest to do3) breaks other build systems using standard
>> tools to build kernel modules(e.g. Debian dkms, and Yocto builds)
>> can you please also apply the patch?
>> thanks!
>>
>>
>>     Il giovedì 17 ottobre 2019, 13:30:38 CEST, Frank Batschulat
>> <frank.batschulat at oracle.com> ha scritto:
>> Gianfranco, pls. refer to
>>
>> https://www.virtualbox.org/ticket/18869
>>
>> On 17.10.19 12:51, Gianfranco Costamagna wrote:
>>> Hello, this patch was already acked but seems to have missed the
>>> 6.0.14 release
>>> Bug-Debian: https://bugs.debian.org/934483
>>> Last-Update: 2019-08-21
>>>
>>> --- virtualbox-6.0.10-dfsg.orig/src/VBox/Additions/linux/drm/vbox_ttm.c
>>> +++ virtualbox-6.0.10-dfsg/src/VBox/Additions/linux/drm/vbox_ttm.c
>>> @@ -33,7 +33,7 @@
>>>     *          Michael Thayer <michael.thayer at oracle.com>
>>>     */
>>>    #include "vbox_drv.h"
>>> -#include <ttm/ttm_page_alloc.h>
>>> +#include <drm/ttm/ttm_page_alloc.h>
>>>
>>>    #if LINUX_VERSION_CODE < KERNEL_VERSION(3, 18, 0) &&
>>> !defined(RHEL_72)
>>>    #define PLACEMENT_FLAGS(placement) (placement)
>>>
>>>
>>>
>>> MIT licensed, and fixes a build failure with some new kernels, by
>>> unifying the include header in all the places
>>> thanks
>>> Gianfranco



More information about the vbox-dev mailing list