[Skiboot] [PATCH skiboot] npu2: Clear XTS_BDF_MAP when destroying context for next init_context
arbab at linux.ibm.com
Tue Oct 16 02:05:39 AEDT 2018
On Mon, Oct 15, 2018 at 05:32:27PM +1100, Alexey Kardashevskiy wrote:
>Once programmed into the NPU, the NPU2_XTS_PID_MAP register content does
>not change and if we try calling opal_npu_init_context() with a different
>MSR (which is going to happen when GPU+NPU virtualization becomes
>available), that will fail.
>This clears XTS_BDF_MAP when the context is destroyed.
Doesn't this mean that we will now need to keep a refcount for items in
the map? Otherwise you could get
PID A creates context w/MSR foo -> BDF wildcard entry created
PID B creates context w/MSR foo
PID C creates context w/MSR foo
PID B destroys context -> BDF wildcard entry removed
More information about the Skiboot