x86/process: Clear hardware feedback history for AMD processors
authorPerry Yuan <perry.yuan@amd.com>
Mon, 9 Jun 2025 20:05:14 +0000 (15:05 -0500)
committerBorislav Petkov (AMD) <bp@alien8.de>
Mon, 7 Jul 2025 20:30:36 +0000 (22:30 +0200)
commit9e8f6bf782a96d45a25ef9bc17db06bafb6b3e21
treea30f272f466019151c8a3e328d972bebb78b2d7b
parent263e66f9c35922d0cfd961df6d7a492820143792
x86/process: Clear hardware feedback history for AMD processors

Incorporate a mechanism within the context switching code to reset the
hardware history for AMD processors. Specifically, when a task is switched in,
the class ID is read and the hardware workload classification history of the
CPU firmware is reset. Then, the workload classification for the next running
thread is begun.

  [ bp: Massage commit message. ]

Signed-off-by: Perry Yuan <perry.yuan@amd.com>
Co-developed-by: Mario Limonciello <mario.limonciello@amd.com>
Signed-off-by: Mario Limonciello <mario.limonciello@amd.com>
Signed-off-by: Borislav Petkov (AMD) <bp@alien8.de>
Acked-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
Link: https://lore.kernel.org/20250609200518.3616080-10-superm1@kernel.org
arch/x86/kernel/process_64.c