[PATCH v2 12/12] x86/traps: Fix up invalid PASID

Luck, Tony tony.luck at intel.com
Mon Jun 15 21:24:59 UTC 2020


> So what’s the RDMSR for?  Surely you
> have some state somewhere that says “this task has a PASID.”
> Can’t you just make sure that stays in sync with the MSR?  Then, on #GP, if the task already has a PASID, you know the MSR is set.

We have state that says the process ("mm") has been allocated a PASID. But not for each task.

E.g. a process may clone a bunch of tasks, then one of them opens a device that needs
a PASID.   We did internally have patches to go hunt down all those other tasks and
force a PASID onto each. But the code was big and ugly. Also maybe the wrong thing
to do if those threads didn't ever need to access the device.

PeterZ suggested that we can add a bit to the task structure for this purpose.

Fenghua is hesitant about adding an x86 only bit there.

-Tony


More information about the amd-gfx mailing list