[virglrenderer-devel] [RFC PATCH] vrend and build: Obtain version information and add it to the caps v2
Dave Airlie
airlied at gmail.com
Fri Jun 8 01:40:39 UTC 2018
On 5 June 2018 at 16:18, Gert Wollny <gert.wollny at collabora.com> wrote:
> Am Montag, den 04.06.2018, 10:57 -0700 schrieb Gurchetan Singh:
>> The caps structure is supposed to all 32-bit integers, otherwise we
>> might run into compiler padding/alignment issues (specifically, with
>> "char host_virglrenderer_version[30]").
> I see, but padding and alignment issues can probably be alliviated by
> using the right packing pragma on the host and guest side and by
> changing the strings to a size that is a multiple of four.
>
>> IMO this is not necessary. Most virglrenderer users know (or should
>> know) how to get information
>> about the host environment.
>
> The reason we were talking about to add this here was to make it
> possible to extract this information automatically for recording it
> when the test suites are run.
>
> Currently, there is no clean way to extract the version information
> about virgilrenderer (it's a git hash that can only be extracted from
> the the source directory), and hence, to record this information any
> test environment has to be specifically tailored to the build
> environment.
>
> Also people usually have more then one mesa installed (e.g. the one
> provided by the distribution that is pulled in automatically and the
> one they are working with to develop), so by recording the information
> from inside the guest we can make sure that we refer to the right
> version. In summary, I think that having this version information
> available inside the guest would be a good thing for debugging
> purposes, at least for now, when we have to change both, host and guest
> libraries.
>
> Anyway, I send this as an RFC because I had my doubts about whether the
> caps structure would be the right place to add this, and if my
> arguments for adding the possibility to pass this information to the
> guest are in any way convincing, I'm also open for suggestions on how
> to add this in another way,
I don't like adding this to the caps structure, I'm not sure I like
exposing the host driver
info that far into the guest either. Maybe we could provide something
at the kernel
level (though that might require qemu interface changes), so we can at least
expose it in dmesg or debugfs in the guest, but not directly to guest userspace.
Definitely needs to be 32-bit aligned no matter what.
Dave.
More information about the virglrenderer-devel
mailing list