Skip to content

RFC x86/intel_rdt: Restoration of Cache Pseudo-Locked regions

Reinette Chatre lkml 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 RFC Latest7 patches 5 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/7x86/intel_rdt: Expose useful functions to all RDT codearch/x86/kernel/cpu/intel_rdt.h arch/x86/kernel/cpu/intel_rdt_rdtgroup.c+4 -20 replies
2/7x86/intel_rdt: Enable a pseudo-locked region to be restoredarch/x86/kernel/cpu/intel_rdt_pseudo_lock.c+111 -00 replies
3/7x86/intel_rdt: Enable user to trigger pseudo-locked region restoreDocumentation/x86/intel_rdt_ui.txt arch/x86/kernel/cpu/intel_rdt_pseudo_lock.c+56 -70 replies
4/7x86/intel_rdt: Support restore of all pseudo-locked regionsarch/x86/kernel/cpu/intel_rdt_pseudo_lock.c+42 -00 replies
5/7x86/intel_rdt: Trigger pseudo-lock restore after wbinvd callarch/x86/include/asm/special_insns.h arch/x86/kernel/cpu/intel_rdt_pseudo_lock.c+13 -20 replies
6/7mtd: replace direct wbinvd invoke with kernel apidrivers/mtd/maps/nettel.c+3 -30 replies
7/7video: fbdev: i810: replace direct wbinvd invoke with kernel apidrivers/video/fbdev/i810/i810_main.h+1 -10 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [RFC PATCH 0/7] x86/intel_rdt: Restoration of Cache Pseudo-Locked regions

Dear Maintainers,

A Cache Pseudo-Locked region is vulnerable to certain instructions (INVD, WBINVD, CLFLUSH) or deeper C-states (that could shrink or power off the cache) evicting the pseudo-locked memory. The current support for pseudo-locked regions already restrict deeper C-states on cores associated with the pseudo-locked regions, but the vulnerability to some instructions remain.

This work does not prevent the instructions to which Cache Pseudo-Locked regions are vulnerable, instead, this work support the restoration of Cache Pseudo-Locked regions that can be triggered manually by the user or automatically after the WBINVD instruction has been issued.

A new debugfs file "pseudo_lock_restore" is associated with each pseudo-locked region and can be used to manually trigger the memory associated with the region to be pseudo-locked to cache again.

The system-wide "native_wbinvd()" is modified to trigger the restoration of all Cache Pseudo-Locked regions after the WBINVD instruction returns and effort is made to avoid any unnecessary work in this flow.

Within the kernel two locations with direct invocations of the WBINVD instruction are coverted to native_wbinvd() and compile tested. Neither location is likely to be used on the platforms supporting Cache Pseudo-Locking.

I am sending this as RFC to maintainers of core first to obtain feedback on the approach before including the maintainers of other subsystems changed.

Your feedback on this proposal would be greatly appreciated.

Reinette

Reinette Chatre (7):
x86/intel_rdt: Expose useful functions to all RDT code x86/intel_rdt: Enable a pseudo-locked region to be restored x86/intel_rdt: Enable user to trigger pseudo-locked region restore x86/intel_rdt: Support restore of all pseudo-locked regions x86/intel_rdt: Trigger pseudo-lock restore after wbinvd call
mtd: replace direct wbinvd invoke with kernel api
video: fbdev: i810: replace direct wbinvd invoke with kernel api

 Documentation/x86/intel_rdt_ui.txt          |  18 +-
 arch/x86/include/asm/special_insns.h        |  13 +-
 arch/x86/kernel/cpu/intel_rdt.h             |   2 +
 arch/x86/kernel/cpu/intel_rdt_pseudo_lock.c | 198 +++++++++++++++++++-
 arch/x86/kernel/cpu/intel_rdt_rdtgroup.c    |   4 +-
 drivers/mtd/maps/nettel.c                   |   6 +-
 drivers/video/fbdev/i810/i810_main.h        |   2 +-
 7 files changed, 229 insertions(+), 14 deletions(-)
Signature · 1 line
2.17.0