diff options
author | Changbin Du <[email protected]> | 2017-03-06 17:08:30 +0800 |
---|---|---|
committer | Zhenyu Wang <[email protected]> | 2017-03-06 17:29:02 +0800 |
commit | c2e04fdab33181b53b5a2f9662b7b607b720f79f (patch) | |
tree | 14319135e5d499e622869243efda7f67ad239ba8 /tools/perf/scripts/python/export-to-postgresql.py | |
parent | 8f1117abb408808af9cc4c948925c726bec4755a (diff) |
drm/i915/gvt: protect RO and Rsvd bits of virtual vgpu configuration space
Per PCI specification, Configuration Register has different types (RO,
RW, RW1C, Rsvd). For RO Register bits are read-only and cannot be
altered by software. For RW1C Register bits indicate status when read.
A Set bit indicates a status event which is Cleared by writing a 1b.
Writing a 0b to RW1C bits has no effect. Reserved Register is for future
implementations, and they are read-only and must return zero when read.
Current vGPU configuration write emulation just copy the value as it is.
So we haven't emulated RO, RW1C and Rsvd Registers correctly. This patch
is following the Spec to correct emulation logic. We add a function
vgpu_cfg_mem_write to wrap the access to vGPU configuration memory.
The write function uses a RW Register bitmap to avoid RO bits be
overwritten, and emulate RW1C behavior for the particular status Register.
v2:
new = src[i] --> new = src[i] & mask (zhenyu)
Signed-off-by: Changbin Du <[email protected]>
Cc: Xiaoguang Chen <[email protected]>
Cc: Zhiyuan Lv <[email protected]>
Cc: Min He <[email protected]>
Reviewed-by: Zhenyu Wang <[email protected]>
Signed-off-by: Zhenyu Wang <[email protected]>
Diffstat (limited to 'tools/perf/scripts/python/export-to-postgresql.py')
0 files changed, 0 insertions, 0 deletions