diff mbox series

[3/5] exec/memtxattr: add process identifier to the transaction attributes

Message ID eed38091c00bf8869ad6c5dec734a0e7c59c1ea3.1689819032.git.tjeznach@rivosinc.com
State New
Headers show
Series QEMU RISC-V IOMMU Support | expand

Commit Message

Tomasz Jeznach July 20, 2023, 2:32 a.m. UTC
Extend memory transaction attributes with process identifier to allow
per-request address translation logic to use requester_id / process_id
to identify memory mapping (e.g. enabling IOMMU w/ PASID translations).

Signed-off-by: Tomasz Jeznach <tjeznach@rivosinc.com>
---
 include/exec/memattrs.h | 6 ++++++
 1 file changed, 6 insertions(+)
diff mbox series

Patch

diff --git a/include/exec/memattrs.h b/include/exec/memattrs.h
index d04170aa27..61c2dfac14 100644
--- a/include/exec/memattrs.h
+++ b/include/exec/memattrs.h
@@ -64,6 +64,12 @@  typedef struct MemTxAttrs {
     unsigned int target_tlb_bit0 : 1;
     unsigned int target_tlb_bit1 : 1;
     unsigned int target_tlb_bit2 : 1;
+
+    /*
+     * PCI PASID support: Limited to 8 bits process identifier.
+     */
+    unsigned int pasid:8;
+
 } MemTxAttrs;
 
 /* Bus masters which don't specify any attributes will get this,