On Wed, Mar 27, 2013 at 06:51:34PM -0500, suravee.suthikulpanit@xxxxxxx wrote:You are right, it is not needed. I create this interface to provide a way for reviewers to test out how the report will be generated for each type of events/errors.From: Suravee Suthikulpanit <suravee.suthikulpanit@xxxxxxx>Why is this needed? I think the risk of regressions in the
Add IOMMU event log injection interface for testing event flag decoding logic.
This interface allows users to specify device id, event flag, and event types via debugfs.
echo 0x300 > /sys/kernel/debug/amd-iommu-evninj/devid // (e.g. Bus:Dev.fun 3:0.0)
echo 0xfff > /sys/kernel/debug/amd-iommu-evninj/flags // (e.g. Specify flag value)
echo 2 > /sys/kernel/debug/amd-iommu-evninj/type // (e.g. for IO_PAGE_FAULT event)
Once the event is injected, IOMMU driver will parse and print out the event information
in kernel log (dmesg) with the various information depending on the types of event and flag
specified.
event-handling code is to low to justify the need for an event-injection
mechanism.
Joerg