iommu.lists.linux-foundation.org archive mirror
 help / color / mirror / Atom feed
From: Kim Phillips <kim.phillips@linaro.org>
To: a.motakis@virtualopensystems.com
Cc: kvmarm@lists.cs.columbia.edu, alex.williamson@redhat.com,
	iommu@lists.linux-foundation.org,
	linux-samsung-soc@vger.kernel.org, kvm@vger.kernel.org,
	agraf@suse.de, B08248@freescale.com, tech@virtualopensystems.com
Subject: Re: [RFC PATCH v2 0/7] VFIO for device tree based platform devices (work in progress)
Date: Sun, 1 Dec 2013 12:09:54 +0000	[thread overview]
Message-ID: <20131201120954.1d6cec431a99a7ad5f34da18@linaro.org> (raw)
In-Reply-To: <1380554923-17818-1-git-send-email-a.motakis@virtualopensystems.com>

On Mon, 30 Sep 2013 17:28:36 +0200
Antonios Motakis <a.motakis@virtualopensystems.com> wrote:

> This is a preview of the base work, towards VFIO support on ARM platforms
> with an IOMMU. It forms a base on to which to implement the functionality
> necessary to enable using device tree devices on ARM (and other platforms
> based on device trees) with VFIO.
> 
> This patch series has been subjected to limited testing on the Arndale board
> (with the Exynos 5250 System MMU). More extensive testing will follow as more
> features are implemented.

Hi, I'm trying to attach the vfio-platform driver to an(y) iommu-backed
device on the arndale.  I chose the relatively simple 'tv' device,
isolated it in the arndale device tree (to get rid of any dependency
conflicts), and, when I run Alex' vfio-correctness-tests [1], I get
this:

# echo 14650000.sysmmu > /sys/bus/platform/devices/14650000.sysmmu/driver/unbind
# echo 14650000.sysmmu > /sys/bus/platform/drivers/vfio-platform/bind
# ls -l /sys/bus/platform/devices/14650000.sysmmu/iommu_group
lrwxrwxrwx 1 root root 0 Oct  1 23:14 /sys/bus/platform/devices/14650000.sysmmu/iommu_group -> ../../kernel/iommu_groups/43
# vfio-tests/vfio-correctness-tests 43
[   84.567643] ------------[ cut here ]------------
[   84.572258] WARNING: CPU: 0 PID: 1606 at drivers/iommu/exynos-iommu.c:472 __exynos_sysmmu_enable+0x170/0x184()
[   84.582225] Modules linked in:
[   84.585268] CPU: 0 PID: 1606 Comm: vfio-correctnes Not tainted 3.13.0-rc1-00296-gb703d74-dirty #46
[   84.594219] [<c0014d20>] (unwind_backtrace+0x0/0xf4) from [<c0011648>] (show_stack+0x10/0x14)
[   84.602719] [<c0011648>] (show_stack+0x10/0x14) from [<c0377948>] (dump_stack+0x7c/0xb0)
[   84.610791] [<c0377948>] (dump_stack+0x7c/0xb0) from [<c001dc50>] (warn_slowpath_common+0x6c/0x88)
[   84.619730] [<c001dc50>] (warn_slowpath_common+0x6c/0x88) from [<c001dd08>] (warn_slowpath_null+0x1c/0x24)
[   84.629365] [<c001dd08>] (warn_slowpath_null+0x1c/0x24) from [<c02dace8>] (__exynos_sysmmu_enable+0x170/0x184)
[   84.639348] [<c02dace8>] (__exynos_sysmmu_enable+0x170/0x184) from [<c02dad4c>] (exynos_iommu_attach_device+0x50/0x108)
[   84.650111] [<c02dad4c>] (exynos_iommu_attach_device+0x50/0x108) from [<c02d939c>] (iommu_attach_device+0x64/0xb8)
[   84.660440] [<c02d939c>] (iommu_attach_device+0x64/0xb8) from [<c02d92ec>] (iommu_group_for_each_dev+0x78/0x94)
[   84.670509] [<c02d92ec>] (iommu_group_for_each_dev+0x78/0x94) from [<c0263678>] (vfio_iommu_type1_attach_group+0xd0/0x144)
[   84.681530] [<c0263678>] (vfio_iommu_type1_attach_group+0xd0/0x144) from [<c02629e0>] (vfio_fops_unl_ioctl+0x3ac/0x460)
[   84.692295] [<c02629e0>] (vfio_fops_unl_ioctl+0x3ac/0x460) from [<c00c1f14>] (do_vfs_ioctl+0x3f0/0x5b8)
[   84.701668] [<c00c1f14>] (do_vfs_ioctl+0x3f0/0x5b8) from [<c00c2114>] (SyS_ioctl+0x38/0x60)
[   84.710002] [<c00c2114>] (SyS_ioctl+0x38/0x60) from [<c000e1a0>] (ret_fast_syscall+0x0/0x30)
[   84.718417] ---[ end trace a1400d7981f699ce ]---
[   84.723071] vfio-platform 14650000.sysmmu: exynos_iommu_attach_device: Failed to attach IOMMU with pgtable 0x6eae8000

It's failing this test:

        if (WARN_ON(!client))
                return -ENODEV;

but I haven't been able to figure out why...I have the exynos
iommu v10 patchseries applied, and even though there's not much
documentation available for this device, I figure this simple test is
supposed to 'just work.'  Any ideas?

Thanks,

Kim

[1] git://github.com/awilliam/tests.git

  parent reply	other threads:[~2013-12-01 12:09 UTC|newest]

Thread overview: 47+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-09-30 15:28 [RFC PATCH v2 0/7] VFIO for device tree based platform devices (work in progress) Antonios Motakis
     [not found] ` <1380554923-17818-1-git-send-email-a.motakis-lrHrjnjw1UfHK3s98zE1ajGjJy/sRE9J@public.gmane.org>
2013-09-30 15:28   ` [PATCH 1/7] VFIO_IOMMU_TYPE1 workaround to build for platform devices Antonios Motakis
     [not found]     ` <1380554923-17818-2-git-send-email-a.motakis-lrHrjnjw1UfHK3s98zE1ajGjJy/sRE9J@public.gmane.org>
2013-09-30 17:39       ` Alex Williamson
     [not found]         ` <1380562782.2674.178.camel-85EaTFmN5p//9pzu0YdTqQ@public.gmane.org>
2013-10-01  9:36           ` Antonios Motakis
2013-10-01 19:21         ` Yoder Stuart-B08248
     [not found]           ` <9F6FE96B71CF29479FF1CDC8046E15036D37D9-TcFNo7jSaXOLgTCmFNXF2K4g8xLGJsHaLnY5E4hWTkheoWH0uzbU5w@public.gmane.org>
2013-10-02 11:13             ` Antonios Motakis
2013-10-02 12:55               ` Yoder Stuart-B08248
2013-10-29 15:57               ` Yoder Stuart-B08248
2013-10-02 12:14           ` Alexander Graf
     [not found]             ` <170DCB6D-6185-4C8A-977A-4DADF82DB274-l3A5Bk7waGM@public.gmane.org>
2013-10-29  1:17               ` Don Dutile
2013-09-30 15:28   ` [PATCH 2/7] Initial skeleton of VFIO support for Device Tree based devices Antonios Motakis
2013-09-30 15:37     ` Bhushan Bharat-R65777
     [not found]       ` <6A3DF150A5B70D4F9B66A25E3F7C888D0718A4AC-RL0Hj/+nBVCMXPU/2EZmt64g8xLGJsHaLnY5E4hWTkheoWH0uzbU5w@public.gmane.org>
2013-10-29  1:29         ` Don Dutile
     [not found]           ` <526F0F7F.1040509-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2013-10-29 11:47             ` Alex Williamson
     [not found]               ` <1383047233.4097.124.camel-85EaTFmN5p//9pzu0YdTqQ@public.gmane.org>
2013-10-29 13:37                 ` Bhushan Bharat-R65777
2013-10-29 17:13                 ` Don Dutile
2013-10-29 21:58                   ` Yoder Stuart-B08248
2013-10-29 13:07           ` Yoder Stuart-B08248
     [not found]     ` <1380554923-17818-3-git-send-email-a.motakis-lrHrjnjw1UfHK3s98zE1ajGjJy/sRE9J@public.gmane.org>
2013-09-30 19:41       ` Alex Williamson
     [not found]         ` <1380570100.2674.207.camel-85EaTFmN5p//9pzu0YdTqQ@public.gmane.org>
2013-10-01  9:36           ` Antonios Motakis
2013-09-30 15:28   ` [PATCH 3/7] Return info for device and its memory regions and interrupts Antonios Motakis
     [not found]     ` <1380554923-17818-4-git-send-email-a.motakis-lrHrjnjw1UfHK3s98zE1ajGjJy/sRE9J@public.gmane.org>
2013-09-30 15:49       ` Bhushan Bharat-R65777
     [not found]         ` <6A3DF150A5B70D4F9B66A25E3F7C888D0718A526-RL0Hj/+nBVCMXPU/2EZmt64g8xLGJsHaLnY5E4hWTkheoWH0uzbU5w@public.gmane.org>
2013-10-01  9:35           ` Antonios Motakis
2013-09-30 17:39       ` Alex Williamson
     [not found]         ` <1380562776.2674.177.camel-85EaTFmN5p//9pzu0YdTqQ@public.gmane.org>
2013-10-01  9:35           ` Antonios Motakis
2013-10-01 19:32             ` Yoder Stuart-B08248
     [not found]               ` <9F6FE96B71CF29479FF1CDC8046E15036D3803-TcFNo7jSaXOLgTCmFNXF2K4g8xLGJsHaLnY5E4hWTkheoWH0uzbU5w@public.gmane.org>
2013-10-01 19:41                 ` Alex Williamson
2013-10-02 11:21                 ` Antonios Motakis
2013-10-02 12:12                   ` Alexander Graf
2013-10-02 13:03                   ` Yoder Stuart-B08248
2013-10-02 13:14                     ` Antonios Motakis
2013-11-07 20:38                       ` Stuart Yoder
2013-09-30 15:28   ` [PATCH 4/7] VFIO: DT: Support MMAP of MMIO regions Antonios Motakis
2013-09-30 15:28   ` [PATCH 5/7] VFIO: DT: Read and write support for the device fd Antonios Motakis
2013-09-30 15:28   ` [PATCH 6/7] VFIO: Update documentation for VFIO_IOMMU_TYPE1 driver Antonios Motakis
     [not found]     ` <1380554923-17818-7-git-send-email-a.motakis-lrHrjnjw1UfHK3s98zE1ajGjJy/sRE9J@public.gmane.org>
2013-09-30 17:39       ` Alex Williamson
     [not found]         ` <1380562766.2674.176.camel-85EaTFmN5p//9pzu0YdTqQ@public.gmane.org>
2013-10-01  9:35           ` Antonios Motakis
2013-09-30 15:28   ` [PATCH 7/7] VFIO: VFIO_PLATFORM: Update documentation for platform specific devices Antonios Motakis
2013-09-30 17:42   ` [RFC PATCH v2 0/7] VFIO for device tree based platform devices (work in progress) Alex Williamson
2013-10-01 15:47 ` Christoffer Dall
2013-10-01 17:13   ` Antonios Motakis
2013-12-01 12:09 ` Kim Phillips [this message]
     [not found]   ` <20131201120954.1d6cec431a99a7ad5f34da18-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>
2013-12-02 13:55     ` Antonios Motakis
2013-12-02 13:56     ` Antonios Motakis
2013-12-02 16:08       ` Kim Phillips
     [not found]         ` <20131202160832.8f5ee84355086cdb14d6a431-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>
2013-12-02 16:30           ` Antonios Motakis
2013-12-02 18:08             ` Kim Phillips

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=20131201120954.1d6cec431a99a7ad5f34da18@linaro.org \
    --to=kim.phillips@linaro.org \
    --cc=B08248@freescale.com \
    --cc=a.motakis@virtualopensystems.com \
    --cc=agraf@suse.de \
    --cc=alex.williamson@redhat.com \
    --cc=iommu@lists.linux-foundation.org \
    --cc=kvm@vger.kernel.org \
    --cc=kvmarm@lists.cs.columbia.edu \
    --cc=linux-samsung-soc@vger.kernel.org \
    --cc=tech@virtualopensystems.com \
    /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).