> From: Jason Gunthorpe <jgg@xxxxxxxxxx> > Sent: Wednesday, May 31, 2023 1:09 AM > > > > * 2) all SVA domains share a reserved domain id per recommendation > > * from VT-d spec (section 6.2.3.1) so domain_detach_iommu() is > > * not required; > > The DID should be managed and allocated for the S2 pointer and the > flushing logic should work genericly by tracking the S2's being used > and flushing their DIDs when all the S2s fall out of use. The special > identity S2 just gets a static DID that never falls out of use. > I'm not sure it's worthwhile to fake a identity S2 for the bare metal SVA case. It's far simpler to special case the reserved DID value in the SVM path.