qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[PATCH v5 16/20] include: add MEMTXATTRS_MACHINE helper


From: Alex Bennée
Subject: [PATCH v5 16/20] include: add MEMTXATTRS_MACHINE helper
Date: Fri, 11 Nov 2022 18:25:31 +0000

We will need this shortly for machine specific transactions for the PC
IOAPIC.

Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
---
 include/exec/memattrs.h | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/include/exec/memattrs.h b/include/exec/memattrs.h
index 8359fc448b..b92f11aaa4 100644
--- a/include/exec/memattrs.h
+++ b/include/exec/memattrs.h
@@ -104,6 +104,14 @@ typedef struct MemTxAttrs {
                              {.requester_type = MTRT_PCI,   \
                              .requester_id = pci_requester_id(dev)})
 
+/*
+ * Helper for setting a machine specific sourced transaction. The
+ * details of how to decode the requester_id are machine specific.
+ */
+#define MEMTXATTRS_MACHINE(id) ((MemTxAttrs) \
+                                {.requester_type = MTRT_MACHINE, \
+                                 .requester_id = id })
+
 /* New-style MMIO accessors can indicate that the transaction failed.
  * A zero (MEMTX_OK) response means success; anything else is a failure
  * of some kind. The memory subsystem will bitwise-OR together results
-- 
2.34.1




reply via email to

[Prev in Thread] Current Thread [Next in Thread]