Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 5e991f14 authored by Mitchel Humpherys's avatar Mitchel Humpherys Committed by Patrick Daly
Browse files

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: default avatarMitchel Humpherys <mitchelh@codeaurora.org>
Signed-off-by: default avatarPatrick Daly <pdaly@codeaurora.org>
parent b7dfda76
Loading
Loading
Loading
Loading
+12 −0
Original line number Diff line number Diff line
@@ -22,6 +22,7 @@
#include <linux/slab.h>
#include <linux/module.h>
#include <linux/uaccess.h>
#include <soc/qcom/secure_buffer.h>

#ifdef CONFIG_IOMMU_DEBUG_TRACKING

@@ -39,8 +40,19 @@ struct iommu_debug_attachment {
static int iommu_debug_attachment_info_show(struct seq_file *s, void *ignored)
{
	struct iommu_debug_attachment *attach = s->private;
	int secure_vmid;

	seq_printf(s, "Domain: 0x%p\n", attach->domain);

	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;
}