OSDN Git Service

iommu/iommu-debug: Add secure_attach debugfs file
authorMitchel Humpherys <mitchelh@codeaurora.org>
Fri, 31 Jul 2015 02:40:21 +0000 (19:40 -0700)
committerDavid Keitel <dkeitel@codeaurora.org>
Tue, 22 Mar 2016 18:13:45 +0000 (11:13 -0700)
commit6f964907135cb60421ba48fafceb2d2c9d6cc995
tree453c480b057268d49eb5559bc363b98d61016a9d
parent75cd28f90d05320e7bebb1c67b8a514618898a6d
iommu/iommu-debug: Add secure_attach debugfs file

It can be useful to perform tests on secure domains.  Add support for
this with a "secure_attach" file that will also set the
DOMAIN_ATTR_SECURE_VMID to the value written to the file.

Example usage:

    # cd /sys/kernel/debug/iommu/tests/<device>
    # echo 0xA > secure_attach
    # echo 0x1000,0x1000,0x1000,1 > map
    # echo 0x1000,0x1000 > unmap
    # echo 0 > secure_attach

Change-Id: I0181e360f3e98e0e47a3af8c6adb71c9c4a3c9b5
Signed-off-by: Mitchel Humpherys <mitchelh@codeaurora.org>
drivers/iommu/iommu-debug.c