sched: Define and initialize a flag to identify valid PASID in the task
authorPeter Zijlstra <peterz@infradead.org>
Mon, 7 Feb 2022 23:02:50 +0000 (15:02 -0800)
committerBorislav Petkov <bp@suse.de>
Tue, 15 Feb 2022 10:31:43 +0000 (11:31 +0100)
commita3d29e8291b622780eb6e4e3eeaf2b24ec78fd43
tree3f0f57f936a5e8bfce5debfb0902168cf37c5a5e
parentdc7507ddce593cbd9c93330024a5658db6f8ef73
sched: Define and initialize a flag to identify valid PASID in the task

Add a new single bit field to the task structure to track whether this task
has initialized the IA32_PASID MSR to the mm's PASID.

Initialize the field to zero when creating a new task with fork/clone.

Signed-off-by: Peter Zijlstra <peterz@infradead.org>
Co-developed-by: Fenghua Yu <fenghua.yu@intel.com>
Signed-off-by: Fenghua Yu <fenghua.yu@intel.com>
Signed-off-by: Borislav Petkov <bp@suse.de>
Reviewed-by: Tony Luck <tony.luck@intel.com>
Reviewed-by: Thomas Gleixner <tglx@linutronix.de>
Link: https://lore.kernel.org/r/20220207230254.3342514-8-fenghua.yu@intel.com
include/linux/sched.h
kernel/fork.c