[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-id: <B8EFE96D1287C24090BAD9D858E15E61761EFF@sisaex02sj>
Date: Fri, 09 Aug 2013 16:41:58 +0000
From: Shuah Khan <shuah.kh@...sung.com>
To: "joro@...tes.org" <joro@...tes.org>
Cc: Shuah Khan <shuah.kh@...sung.com>,
"alex.williamson@...hat.com" <alex.williamson@...hat.com>,
"Varun.Sethi@...escale.com" <Varun.Sethi@...escale.com>,
"aik@...abs.ru" <aik@...abs.ru>,
"joe@...ches.com" <joe@...ches.com>,
"rostedt@...dmis.org" <rostedt@...dmis.org>,
"fweisbec@...il.com" <fweisbec@...il.com>,
"mingo@...hat.com" <mingo@...hat.com>,
"tony@...mide.com" <tony@...mide.com>,
"ohad@...ery.com" <ohad@...ery.com>,
"andreas.herrmann@...xeda.com" <andreas.herrmann@...xeda.com>,
"will.deacon@....com" <will.deacon@....com>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
"iommu@...ts.linux-foundation.org" <iommu@...ts.linux-foundation.org>,
"shuahkhan@...il.com" <shuahkhan@...il.com>,
Shuah Khan <shuah.kh@...sung.com>
Subject: Re: [PATCH v2] iommu: Add event tracing feature to iommu
On 07/30/2013 08:57 AM, Shuah Khan wrote:
> Add tracing feature to iommu to report various iommu events. Classes
> iommu_group, iommu_device, iommu_map_unmap, and iommu_amd_event are defined.
>
> iommu_group class events can be enabled to trigger when devices get added
> to and removed from an iommu group. Trace information includes iommu group
> id and device name.
>
> iommu:add_device_to_group
> iommu:remove_device_from_group
>
> iommu_device class events can be enabled to trigger when devices are attached
> to and detached from a domain. Trace information includes device name.
>
> iommu:attach_device_to_domain
> iommu:detach_device_from_domain
>
> iommu_map_unmap class events can be enabled to trigger when iommu map and
> unmap iommu ops. Trace information includes iova, physical address (map event
> only), and size.
>
> iommu:unmap
> iommu:map
>
> iommu_amd_event class can be enabled to trigger when AMD IOMMU driver finds
> events when it polls the IOMMU Event Log. Trace information includes the
> event string derived from the event type in human friendly form, event type,
> id of the domain the device is placed in, device (bus number, slot number,
> and function number), address associated with the event, and flags.
>
> iommu:amd_event
>
> Testing:
> The following is trace is generated when intel-iommu driver adds devices to
> to iommu groups during boot-time during its initialization:
>
> swapper/0-1 [003] .... 1.854793: add_device_to_group: IOMMU: groupID=0 device=0000:00:00.0
> swapper/0-1 [003] .... 1.854797: add_device_to_group: IOMMU: groupID=1 device=0000:00:02.0
>
> Added trace calls to iommu_prepare_identity_map() for testing some of the
> conditions that are hard to trigger. Here is the trace from the testing:
> swapper/0-1 [003] .... 1.854099: amd_event: IOMMU:ILLEGAL_DEV_TABLE_ENTRY 0x01 00:00.0 d=0x0010 a=0x00000000cb800000 f=0x0002
> swapper/0-1 [003] .... 1.854101: remove_device_from_group: IOMMU: groupID=0 device=0000:00:02.0
> swapper/0-1 [003] .... 1.854102: attach_device_to_domain: IOMMU: device=0000:00:02.0
> swapper/0-1 [003] .... 1.854102: detach_device_from_domain: IOMMU: device=0000:00:02.0
> swapper/0-1 [003] .... 1.854102: map: IOMMU: iova=0x00000000cb800000 paddr=0x00000000cf9fffff size=0x400
> swapper/0-1 [003] .... 1.854102: unmap: IOMMU: iova=0x00000000cb800000 size=0x400
>
Any comments on this patch? Is this a reasonable approach?
-- Shuah
Shuah Khan, Linux Kernel Developer - Open Source Group Samsung Research
America (Silicon Valley) shuah.kh@...sung.com | (970) 672-0658
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists