[Intel-gfx] [PATCH] drm/i915/tgl: Add sysfs interface to control class-of-service

Joonas Lahtinen joonas.lahtinen at linux.intel.com
Mon Sep 9 11:50:20 UTC 2019


Quoting Prathap Kumar Valsan (2019-08-26 01:48:01)
> To provide shared last-level-cache isolation to cpu workloads running
> concurrently with gpu workloads, the gpu allocation of cache lines needs
> to be restricted to certain ways. Currently GPU hardware supports four
> class-of-service(CLOS) levels and there is an associated way-mask for
> each CLOS.
> 
> Hardware supports reading supported way-mask configuration for GPU using
> a bios pcode interface. The supported way-masks and the one currently
> active is communicated to userspace via a sysfs file--closctrl. Admin user
> can then select a new mask by writing the mask value to the file.
> 
> Note of Caution: Restricting cache ways using this mechanism presents a
> larger attack surface for side-channel attacks.

I wonder if this is enough to justify some further protection before
enabling?

> Example usage:
> The active way-mask is highlighted within square brackets.
> > cat /sys/class/drm/card0/closctrl
> [0xffff] 0xff00 0xc000 0x8000

How about two files for easier scripting interface?

/sys/class/drm/card0/llc_clos
/sys/class/drm/card0/llc_clos_modes

Regards, Joonas


More information about the Intel-gfx mailing list