OSDN Git Service

drm/amdgpu: SR-IOV data exchange between PF&VF
authorHorace Chen <horace.chen@amd.com>
Mon, 9 Oct 2017 08:17:16 +0000 (16:17 +0800)
committerAlex Deucher <alexander.deucher@amd.com>
Thu, 19 Oct 2017 19:26:59 +0000 (15:26 -0400)
commit2dc8f81e4f822cfe8f6475da968ab2dd5881b8d8
tree6598c1b183930a262552b4609172d97c690fc543
parent0ae94444c08a0adf2fab4aab26be0646ee445a19
drm/amdgpu: SR-IOV data exchange between PF&VF

SR-IOV need to exchange some data between PF&VF through shared VRAM

PF will copy some necessary firmware and information to the shared
VRAM. It also requires some information from VF. PF will send a
key through mailbox2 to help guest calculate checksum so that it can
verify whether the data is correct.

So check the data on the specified offset of the shared VRAM, if the
checksum is right, read values from it and write some VF information
next to the data from PF.

Signed-off-by: Horace Chen <horace.chen@amd.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
drivers/gpu/drm/amd/amdgpu/amdgpu_virt.c
drivers/gpu/drm/amd/amdgpu/amdgpu_virt.h
drivers/gpu/drm/amd/amdgpu/mxgpu_ai.c