iommu.lists.linux-foundation.org archive mirror
 help / color / mirror / Atom feed
* IOASID set token
@ 2020-07-02  6:29 Jacob Pan
  2020-07-02 13:48 ` Jacob Pan
  0 siblings, 1 reply; 6+ messages in thread
From: Jacob Pan @ 2020-07-02  6:29 UTC (permalink / raw)
  To: Jean-Philippe Brucker, Raj, Ashok; +Cc: Tian, Kevin, Lu, Baolu, iommu, Wu, Hao

Hi Jean,

Have a question for you on whether we can have a fixed token type for
ioasid_set.

Currently, ioasid_set has an arbitrary token. For VT-d vSVA usage, we
choose mm as ioasid_set token to identify PASIDs within a guest. We have
multiple in-kernel users of PASIDs such as VFIO, KVM, and VDCM. When an
IOASID set is created, there is not a good way to communicate about the
token choices. So we have to let VDCM and KVM *assume* mm is used as
token, then retrieve ioasid_set based on the token.

This assumption of "mm as token" is not a reliable SW architecture. So
we are thinking if we can have an explicit ioasid_set token type where
mm is used. After all, PASID and mm are closely related.

The code change might be the following:
1. add a flag to indicate token type when ioasid_set is allocated, e.g.
IOASID_SET_TYPE_MM
IOASID_SET_TYPE_ANY
2. other users of the ioasid_set can query if an mm token exists based
on the flag IOASID_SET_TYPE_MM, then retrieve the ioasid_set.

Existing ioasid_set user can still use arbitrary token under the flag
IOASID_SET_TYPE_ANY

Would this be an issue for ARM usage?

Thanks,

Jacob
_______________________________________________
iommu mailing list
iommu@lists.linux-foundation.org
https://lists.linuxfoundation.org/mailman/listinfo/iommu

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2020-07-07 15:31 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-07-02  6:29 IOASID set token Jacob Pan
2020-07-02 13:48 ` Jacob Pan
2020-07-06 10:30   ` Jean-Philippe Brucker
2020-07-06 20:51     ` Jacob Pan
2020-07-07 10:07       ` Jean-Philippe Brucker
2020-07-07 15:38         ` Jacob Pan

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).