[PATCH] drm/i915/gvt: Enable gvt debugfs with mmio comparison on all vGPUs.
Colin Xu
Colin.Xu at intel.com
Tue Jun 5 08:41:14 UTC 2018
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.
--
Best Regards,
Colin Xu
More information about the intel-gvt-dev
mailing list