aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c
diff options
context:
space:
mode:
authorThomas Gleixner <[email protected]>2021-06-11 13:03:16 +0000
committerIngo Molnar <[email protected]>2021-06-24 06:49:03 +0000
commit7f049fbdd57f6ea71dc741d903c19c73b2f70950 (patch)
tree5b11e726fd368def34a736cfa73511ac95ded45e /drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c
parentLinux 5.13-rc7 (diff)
downloadkernel-7f049fbdd57f6ea71dc741d903c19c73b2f70950.tar.gz
kernel-7f049fbdd57f6ea71dc741d903c19c73b2f70950.zip
perf/x86/intel/lbr: Zero the xstate buffer on allocation
XRSTORS requires a valid xstate buffer to work correctly. XSAVES does not guarantee to write a fully valid buffer according to the SDM: "XSAVES does not write to any parts of the XSAVE header other than the XSTATE_BV and XCOMP_BV fields." XRSTORS triggers a #GP: "If bytes 63:16 of the XSAVE header are not all zero." It's dubious at best how this can work at all when the buffer is not zeroed before use. Allocate the buffers with __GFP_ZERO to prevent XRSTORS failure. Fixes: ce711ea3cab9 ("perf/x86/intel/lbr: Support XSAVES/XRSTORS for LBR context switch") Signed-off-by: Thomas Gleixner <[email protected]> Signed-off-by: Ingo Molnar <[email protected]> Link: https://lore.kernel.org/r/[email protected]
Diffstat (limited to 'drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c')
0 files changed, 0 insertions, 0 deletions