All of lore.kernel.org
 help / color / mirror / Atom feed
* RFC: IOMMU/AMD: Error Handling
@ 2013-04-29 19:45 ` Suravee Suthikulanit
  0 siblings, 0 replies; 20+ messages in thread
From: Suravee Suthikulanit @ 2013-04-29 19:45 UTC (permalink / raw)
  To: Jörg Rödel,
	iommu-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org
  Cc: linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org

Joerg,

We are in the process of implementing AMD IOMMU error handling, and I 
would like some comments from you and the community.

Currently, the AMD IOMMU driver only reports events from the event log 
in the dmesg, and does not try to handle them in case of errors.  AMD 
IOMMU errors can be categorized as device-specific errors and IOMMU errors.

1. For IOMMU errors such as:
     - DEV_TAB_HADWARE_ERROR
     - PAGE_TAB_ERROR
     - COMMAND_HARDWARE_ERROR
If the error is detected during IOMMU initialization, we could disable 
IOMMU and proceed.  If the error occurs after IOMMU is initialized, we 
won't be able to recover from this, and might need to result in panic.

2. For device-specific errors such as:
     - ILLEGAL_DEV_TABLE_ENTRY
     - IO_PAGE_FAULT
     - INVALDE_DEVICE_REQUEST
We think the AMD IOMMU driver should try to isolate the device. This 
involves blocking device transactions at IOMMU DTE and tries to disable 
the device (e.g. calling the remove(struct pci_dev *pdev) interface 
generally provides by device drivers).  This could prevents the device 
from continuing to fail and to risk of system instability.

3. In case of posted memory write transaction, device driver might not 
be aware that the transaction has failed and blocked at IOMMU. If there 
is no HW IOMMU, I believe this is handled by PCI error handling code.  
If the IOMMU hardware reporth such case, could this potentially leverage 
the Linux IOMMU fault handling interface, iommu_set_fault_handler() and 
report_iommu_fault(),  to communicate to device driver or PCI driver?

Any feedback or comments are appreciated.

Thank you,
Suravee

^ permalink raw reply	[flat|nested] 20+ messages in thread

end of thread, other threads:[~2013-04-30 16:02 UTC | newest]

Thread overview: 20+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-04-29 19:45 RFC: IOMMU/AMD: Error Handling Suravee Suthikulanit
2013-04-29 19:45 ` Suravee Suthikulanit
     [not found] ` <517ECDDA.3000606-5C7GfCeVMHo@public.gmane.org>
2013-04-29 20:10   ` Don Dutile
2013-04-29 20:10     ` Don Dutile
2013-04-29 20:34     ` Duran, Leo
     [not found]       ` <BA42942F2D0DED45AFB0A6216D1E951D44CBE1F9-Vo+W8YXarrgxlywnonMhLEEOCMrvLtNR@public.gmane.org>
2013-04-29 21:42         ` Don Dutile
2013-04-29 21:42           ` Don Dutile
2013-04-29 22:31           ` Duran, Leo
     [not found]           ` <517EE940.8010005-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2013-04-30 14:56             ` Suravee Suthikulanit
2013-04-30 14:56               ` Suravee Suthikulanit
     [not found]               ` <517FDB96.7060602-5C7GfCeVMHo@public.gmane.org>
2013-04-30 15:09                 ` Don Dutile
2013-04-30 15:09                   ` Don Dutile
2013-04-30 15:21                 ` Joerg Roedel
2013-04-30 15:21                   ` Joerg Roedel
     [not found]     ` <517ED3A9.2050508-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2013-04-30 14:49       ` Suravee Suthikulanit
2013-04-30 14:49         ` Suravee Suthikulanit
     [not found]         ` <517FD9E8.8070802-5C7GfCeVMHo@public.gmane.org>
2013-04-30 15:06           ` Don Dutile
2013-04-30 15:06             ` Don Dutile
     [not found]             ` <517FDDF6.8090707-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2013-04-30 16:02               ` Alex Williamson
2013-04-30 16:02                 ` Alex Williamson

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.