[Skiboot] [PATCH skiboot] npu2: Reset PID wildcard and refcounter when mapped to LPID

Reza Arbab arbab at linux.ibm.com
Fri May 24 00:08:04 AEST 2019


On Thu, May 23, 2019 at 02:22:02PM +1000, Alexey Kardashevskiy wrote:
>Since 105d80f85b "npu2: Use unfiltered mode in XTS tables" we do not
>register every PID in the XTS table so the table has one entry per LPID.
>Then we added a reference counter to keep track of the entry use when
>switching GPU between the host and guest systems (the "Fixes:" tag below).
>
>The POWERNV platform setup creates such entries and references them
>at the boot time when initializing IOMMUs and only removes it when
>a GPU is passed through to a guest. This creates a problem as POWERNV
>boots via kexec and no defererencing happens; the XTS table state remains
>undefined. So when the host kernel boots, skiboot thinks there are valid
>XTS entries and does not update the XTS table which breaks ATS.
>
>This adds the reference counter and the XTS entry reset when a GPU is
>assigned to LPID and we cannot rely on the kernel to clean that up.
>
>Fixes: ba1d95a1d460 ("npu2: Add XTS_BDF_MAP wildcard refcount")
>Signed-off-by: Alexey Kardashevskiy <aik at ozlabs.ru>

Tested-by: Reza Arbab <arbab at linux.ibm.com>

-- 
Reza Arbab



More information about the Skiboot mailing list