OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.

 


Help: OASIS Mailing Lists Help | MarkMail Help

virtio-comment message

[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]


Subject: [PATCH v3 4/9] virtio-iommu: Add PASID field to DETACH


Some page table extensions (Intel scalable mode and some AMD
implementations) require populating host-managed PASID tables with
ATTACH_TABLE and DETACH requests. To mirror the PASID parameter in the
ATTACH_TABLE request, add a PASID parameter to DETACH.

This could later be used if we generalize PASID support to the ATTACH
request, but there is not plan for that at the moment.

Signed-off-by: Jean-Philippe Brucker <jean-philippe@linaro.org>

---
v2->v3: Update meaning of F_PASID to match the VT-d table format.
---
 device-types/iommu/description.tex | 28 ++++++++++++++++++----------
 1 file changed, 18 insertions(+), 10 deletions(-)

diff --git a/device-types/iommu/description.tex b/device-types/iommu/description.tex
index 45930d9..be01fb1 100644
--- a/device-types/iommu/description.tex
+++ b/device-types/iommu/description.tex
@@ -481,27 +481,34 @@ \subsubsection{DETACH request}
   struct virtio_iommu_req_head head;
   le32 domain;
   le32 endpoint;
-  u8   reserved[8];
+  le32 flags;
+  le32 pasid;
   struct virtio_iommu_req_tail tail;
 };
+
+#define VIRTIO_IOMMU_DETACH_F_PASID   (1 << 0)
 \end{lstlisting}
 
-Detach an endpoint from a domain. When this request completes,
-the endpoint cannot access any mapping from that domain anymore.
-However the endpoint may then be in bypass mode and access the
-guest-physical address space.
+Detach an address space from an endpoint. When this request
+completes, the endpoint cannot access any mapping from the
+address space anymore. However the endpoint may then be in bypass
+mode and access the guest-physical address space.
 
 After all endpoints have been successfully detached from a domain, it
 ceases to exist and its ID can be reused by the driver for another domain.
 
+When flag VIRTIO_IOMMU_DETACH_F_PASID is set, field \field{pasid}
+contains the identifier of the address space to detach from the
+device. This is only supported with some table formats, attached
+with a VIRTIO_IOMMU_T_ATTACH_TABLE request.
+
 \drivernormative{\paragraph}{DETACH request}{Device Types / IOMMU Device / Device operations / DETACH request}
 
-The driver SHOULD set \field{reserved} to zero.
+The driver SHOULD set field \field{pasid} and flag
+VIRTIO_IOMMU_DETACH_F_PASID to zero if PASID is not supported.
 
 \devicenormative{\paragraph}{DETACH request}{Device Types / IOMMU Device / Device operations / DETACH request}
 
-The device MUST ignore \field{reserved}.
-
 If the endpoint identified by \field{endpoint} doesn't exist, then the
 device MUST reject the request and set \field{status} to
 VIRTIO_IOMMU_S_NOENT.
@@ -511,8 +518,9 @@ \subsubsection{DETACH request}
 then the device MAY set the request \field{status} to
 VIRTIO_IOMMU_S_INVAL.
 
-The device MUST ensure that after being detached from a domain, the
-endpoint cannot access any mapping from that domain.
+The device MUST ensure that after being detached from an address
+space, the endpoint cannot access any mapping from that address
+space.
 
 \subsubsection{MAP request}\label{sec:Device Types / IOMMU Device / Device operations / MAP request}
 
-- 
2.43.0



[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]