From mboxrd@z Thu Jan 1 00:00:00 1970 From: Joerg Roedel Subject: Re: [PATCH v2] iommu/vt-d: Fix broken device issue when using iommu=pt Date: Mon, 25 Aug 2014 11:15:31 +0200 Message-ID: <20140825091531.GG16329@8bytes.org> References: <1408949099-18677-1-git-send-email-wangyijing@huawei.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Content-Disposition: inline In-Reply-To: <1408949099-18677-1-git-send-email-wangyijing-hv44wF8Li93QT0dZR+AlfA@public.gmane.org> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: iommu-bounces-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org Errors-To: iommu-bounces-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org To: Yijing Wang Cc: Sathya Perla , iommu-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org, Subbu Seetharaman , David Woodhouse , Jiang Liu List-Id: iommu@lists.linux-foundation.org [Adding the Emulex driver developers to Cc for some input on the device, and why it might use wrong request ids] On Mon, Aug 25, 2014 at 02:44:59PM +0800, Yijing Wang wrote: > We found some strange devices in HP C7000 and Huawei Storage Server. These > devices can not be enumerated by OS, but they still did DMA read/write > without OS management. Because iommu will not create the DMA mapping for > these devices, the DMA read/write will be blocked by iommu hardware. > > Eg. > in HP C7000: > \-[0000:00]-+-00.0 Intel Corporation Xeon E5/Core i7 DMI2 > +-01.0-[11]-- > +-01.1-[02]-- > +-02.0-[04]--+-00.0 Emulex Corporation OneConnect 10Gb NIC (be3) > | +-00.1 Emulex Corporation OneConnect 10Gb NIC (be3) > | +-00.2 Emulex Corporation OneConnect 10Gb iSCSI Initiator (be3) > | \-00.3 Emulex Corporation OneConnect 10Gb iSCSI Initiator (be3) > +-02.1-[12]-- > Kernel only found four devices in bus 0x04, but we found following DMA errors in dmesg. > > [ 1438.477262] DRHD: handling fault status reg 402 > [ 1438.498278] DMAR:[DMA Write] Request device [04:00.4] fault addr bdf70000 > [ 1438.498280] DMAR:[fault reason 02] Present bit in context entry is clear > [ 1438.566458] DMAR:[DMA Write] Request device [04:00.5] fault addr bdf70000 > [ 1438.566460] DMAR:[fault reason 02] Present bit in context entry is clear > [ 1438.635211] DMAR:[DMA Write] Request device [04:00.6] fault addr bdf70000 > [ 1438.635213] DMAR:[fault reason 02] Present bit in context entry is clear > [ 1438.703849] DMAR:[DMA Write] Request device [04:00.7] fault addr bdf70000 > [ 1438.703851] DMAR:[fault reason 02] Present bit in context entry is clear > > This patch add a kernel boot command parameter iommu=pt_force=domain:busnum > that based iommu identity mapping and force to create identity for all devfn in > the specific bus number to fix this issue. No! If the device really uses request-ids it shouldn't use please add a DMA alias quirk instead. A new kernel parameter will not work out of the box for other users of this device. Joerg