[PATCH] drm/i915/gvt: Enable gvt debugfs with mmio comparison on all vGPUs.
Colin Xu
Colin.Xu at intel.com
Thu Jun 7 07:56:08 UTC 2018
On 06/06/2018 11:31 AM, Zhenyu Wang wrote:
> On 2018.06.05 16:41:14 +0800, Colin Xu wrote:
>> On 06/05/2018 03:23 PM, Zhenyu Wang wrote:
>>> On 2018.06.04 16:47:20 +0800, Colin Xu wrote:
>>>> Current mmio_diff_handler can only compare 1 active vGPU with host.
>>>>
>>>> The patch will extend the mmio comparison debugfs capability to all
>>>> active vGPUs, selected by vGPU mask bits.
>>>> - Add mmio_compare_vgpu_mask to enable vGPU selection.
>>>> - Bit 0: select all active vGPU.
>>>> - Bit i: select vGPU id i.
>>>> - Add mmio_compare to show comparison result.
>>>> - Retive mmio_diff since it's functionality is inherited and enhanced.
>>>>
>>>> The new headline of the comparision results is:
>>>> +---+--------+----+--------+--------+-----+
>>>> | * | Offset | HW | vGPU i | vGPU j | ... |
>>>> +---+--------+----+--------+--------+-----+
>>>>
>>>> The leading star of each line indicate diff between preg and vreg(s).
>>>> When only 1 vGPU is selected, per-bits-diff will append to each line.
>>>>
>>>> Sample output:
>>>>
>>>> - 1 vGPU, debugfs_vgpu_mask is 0x1 or 0x2:
>>>> * Offset HW vGPU 1 Diff-Bits
>>>> 0000003c 00000000 00000000
>>>> * 00002030 00000ad8 00000000 3-4,6-7,9,11
>>>>
>>>> - 3 vGPUs, debugfs_vgpu_mask is 0x1:
>>>> * Offset HW vGPU 1 vGPU 2 vGPU 3
>>>> 0000003c 00000000 00000000 00000000 00000000
>>>> * 00002074 002012d0 0000cce8 00000000 00013b20
>>>>
>>>> - 3 vGPUs, debugfs_vgpu_mask is 0xa:
>>>> * Offset HW vGPU 1 vGPU 3
>>>> 0000003c 00000000 00000000 00000000
>>>> * 00002074 0000be30 0000d040 00013b20
>>>>
>>> Current mmio_diff is per-vgpu so you already have all info. So you
>>> can use current mmio_diff to compare between vGPUs if you want. I
>>> don't see a must to change this for kernel interface.
>>>
>> Yes it's an enhancement instead of a "must change".
>> However in some scenarioes the enhancement could do better:
>> - Current mmio_diff only shows diff but omit "match". When compare across
>> vGPU's, the result won't match on offset since the diff offsets will be
>> different. The limit could be removed by uncheck prev vs. vreg diff in
>> current mmio_diff by the way.
>> - Dump separately diffs from dump at the same time. Which may be useful
>> in the case that we need dump vGPU's and host's status at the same time.
>>
>> The main purpose is to keep a code snippet to bring convenience for future
>> debug. Hope it will help someone in future no matter it's merged or not.
>>
> Then instead of removing current mmio_diff file, you can create
> new debugfs helper for that. As you said they could be used for
> different case and possible to re-use current mmio diff code somehow.
The new help function and struct define share most of mmio_diff structure define
with some difference and addition. When only 1 vGPU selected, the new
help function do almost the same as current mmio_diff, except that it also shows
mmio value that preg equals to vreg, while mmio_diff only show mmio at
different value.
So it seems keep them both will have some shared parts in both definition and
capability.
Maybe it's better I don't have to rename mmio_diff, just enhance under current
naming?
>
>
> _______________________________________________
> intel-gvt-dev mailing list
> intel-gvt-dev at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/intel-gvt-dev
--
Best Regards,
Colin Xu
More information about the intel-gvt-dev
mailing list