diff options
author | Mitchel Humpherys <mitchelh@codeaurora.org> | 2015-07-30 19:25:54 -0700 |
---|---|---|
committer | David Keitel <dkeitel@codeaurora.org> | 2016-03-22 11:13:44 -0700 |
commit | 75cd28f90d05320e7bebb1c67b8a514618898a6d (patch) | |
tree | 91d8b9ec445349ff1602f7804e25244f358db260 /drivers/iommu/iommu-debug.c | |
parent | 880ae03739cb6e7f06ccabbb62016fc024718d35 (diff) |
iommu/iommu-debug: Show secure VMID in attach info
It can be useful to know a domain's secure VMID value. Add this
information to the attach info debugfs file.
Change-Id: Ic8a73000b8337639f95376b13ef58a0e2a089dde
Signed-off-by: Mitchel Humpherys <mitchelh@codeaurora.org>
Diffstat (limited to 'drivers/iommu/iommu-debug.c')
-rw-r--r-- | drivers/iommu/iommu-debug.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/drivers/iommu/iommu-debug.c b/drivers/iommu/iommu-debug.c index de7ffa7f3bc4..3aef661c3340 100644 --- a/drivers/iommu/iommu-debug.c +++ b/drivers/iommu/iommu-debug.c @@ -21,6 +21,7 @@ #include <linux/platform_device.h> #include <linux/slab.h> #include <linux/uaccess.h> +#include <soc/qcom/secure_buffer.h> #ifdef CONFIG_IOMMU_DEBUG_TRACKING @@ -40,6 +41,7 @@ static int iommu_debug_attachment_info_show(struct seq_file *s, void *ignored) struct iommu_debug_attachment *attach = s->private; phys_addr_t pt_phys; int coherent_htw_disable; + int secure_vmid; seq_printf(s, "Domain: 0x%p\n", attach->domain); if (iommu_domain_get_attr(attach->domain, DOMAIN_ATTR_PT_BASE_ADDR, @@ -60,6 +62,15 @@ static int iommu_debug_attachment_info_show(struct seq_file *s, void *ignored) else seq_printf(s, "%d\n", coherent_htw_disable); + seq_puts(s, "SECURE_VMID: "); + if (iommu_domain_get_attr(attach->domain, + DOMAIN_ATTR_SECURE_VMID, + &secure_vmid)) + seq_puts(s, "(Unknown)\n"); + else + seq_printf(s, "%s (0x%x)\n", + msm_secure_vmid_to_string(secure_vmid), secure_vmid); + return 0; } |