drm/vmwgfx: Introduce VMware mks-guest-stats
authorMartin Krastev <krastevm@vmware.com>
Wed, 9 Jun 2021 17:23:00 +0000 (13:23 -0400)
committerZack Rusin <zackr@vmware.com>
Sat, 12 Jun 2021 04:00:53 +0000 (00:00 -0400)
commit7a7a933edd6c3a6d5d64e08093f2d564104cefcd
treef2dbbf349e68a86b5e078c6e2e91dd806a6887f7
parentd92223ead97cd697abe76c5b7a78160d6910a90d
drm/vmwgfx: Introduce VMware mks-guest-stats

VMware mks-guest-stats mechanism allows the collection of performance stats from
guest userland GL contexts, as well as from vmwgfx kernelspace, via a set of sw-
defined performance counters. The userspace performance counters are (de)registerd
with vmware-vmx-stats hypervisor via new iocts. The vmwgfx kernelspace counters
are controlled at build-time via a new config DRM_VMWGFX_MKSSTATS.

* Add vmw_mksstat_{add|remove|reset}_ioctl controlling the tracking of
  mks-guest-stats in guest winsys contexts
* Add DRM_VMWGFX_MKSSTATS config to drivers/gpu/drm/vmwgfx/Kconfig controlling
  the instrumentation of vmwgfx for kernelspace mks-guest-stats counters
* Instrument vmwgfx vmw_execbuf_ioctl to collect mks-guest-stats according to
  DRM_VMWGFX_MKSSTATS

Signed-off-by: Martin Krastev <krastevm@vmware.com>
Reviewed-by: Zack Rusin <zackr@vmware.com>
Signed-off-by: Zack Rusin <zackr@vmware.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20210609172307.131929-3-zackr@vmware.com
drivers/gpu/drm/vmwgfx/Kconfig
drivers/gpu/drm/vmwgfx/device_include/svga_types.h
drivers/gpu/drm/vmwgfx/device_include/vm_basic_types.h [deleted file]
drivers/gpu/drm/vmwgfx/vmwgfx_drv.c
drivers/gpu/drm/vmwgfx/vmwgfx_drv.h
drivers/gpu/drm/vmwgfx/vmwgfx_execbuf.c
drivers/gpu/drm/vmwgfx/vmwgfx_mksstat.h [new file with mode: 0644]
drivers/gpu/drm/vmwgfx/vmwgfx_msg.c
include/uapi/drm/vmwgfx_drm.h