From: Peter Xu <peterx@redhat.com>
To: qemu-devel@nongnu.org
Cc: "Paolo Bonzini" <pbonzini@redhat.com>,
"Eric Auger" <eric.auger@redhat.com>,
"Richard Henderson" <rth@twiddle.net>,
"David Gibson" <david@gibson.dropbear.id.au>,
"Alex Bennée" <alex.bennee@linaro.org>,
peterx@redhat.com, "Alex Williamson" <alex.williamson@redhat.com>,
"Peter Maydell" <peter.maydell@linaro.org>
Subject: [Qemu-devel] [RFC 2/3] memory: add MemTxAttrs to IOMMUTLBEntry
Date: Tue, 5 Jun 2018 21:19:43 +0800 [thread overview]
Message-ID: <20180605131944.14649-3-peterx@redhat.com> (raw)
In-Reply-To: <20180605131944.14649-1-peterx@redhat.com>
It should never be used for translate() calls since the caller should be
the one who passes in the MemTxAttrs. However it could be used when we
want to generate an IOMMU translation notification with specific
translation attributes.
Signed-off-by: Peter Xu <peterx@redhat.com>
---
include/exec/memory.h | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/include/exec/memory.h b/include/exec/memory.h
index 6b0ced554d..12865a4890 100644
--- a/include/exec/memory.h
+++ b/include/exec/memory.h
@@ -72,6 +72,13 @@ struct IOMMUTLBEntry {
hwaddr translated_addr;
hwaddr addr_mask; /* 0xfff = 4k translation */
IOMMUAccessFlags perm;
+ /*
+ * Attributes that were bound to the DMA translation. Note that
+ * this field is meaningless when the IOMMUTLBENtry is generated
+ * by a translate() call. It can be used as a hint when we want
+ * to send IOMMU notifications with specific permission flags.
+ */
+ MemTxAttrs attrs;
};
/*
--
2.17.0
next prev parent reply other threads:[~2018-06-05 13:20 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-06-05 13:19 [Qemu-devel] [RFC 0/3] memory: enhance IOMMU notifier to support USER bit Peter Xu
2018-06-05 13:19 ` [Qemu-devel] [RFC 1/3] memory: add MemTxAttrs to translate function Peter Xu
2018-06-05 13:38 ` Peter Maydell
2018-06-06 0:11 ` David Gibson
2018-06-05 13:19 ` Peter Xu [this message]
2018-06-05 13:39 ` [Qemu-devel] [RFC 2/3] memory: add MemTxAttrs to IOMMUTLBEntry Peter Maydell
2018-06-05 13:19 ` [Qemu-devel] [RFC 3/3] memory: introduce IOMMU_NOTIFIER_USER_[UN]SET Peter Xu
2018-06-05 13:54 ` Peter Maydell
2018-06-05 14:26 ` Peter Xu
2018-06-05 14:42 ` Peter Maydell
2018-06-06 6:56 ` Peter Xu
2018-06-06 7:09 ` Peter Xu
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20180605131944.14649-3-peterx@redhat.com \
--to=peterx@redhat.com \
--cc=alex.bennee@linaro.org \
--cc=alex.williamson@redhat.com \
--cc=david@gibson.dropbear.id.au \
--cc=eric.auger@redhat.com \
--cc=pbonzini@redhat.com \
--cc=peter.maydell@linaro.org \
--cc=qemu-devel@nongnu.org \
--cc=rth@twiddle.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).