From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-8.5 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SIGNED_OFF_BY,SPF_HELO_NONE, SPF_PASS,URIBL_BLOCKED,USER_AGENT_SANE_1 autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id DBA09C433E5 for ; Fri, 24 Jul 2020 12:34:24 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id C53052065F for ; Fri, 24 Jul 2020 12:34:24 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726689AbgGXMeX (ORCPT ); Fri, 24 Jul 2020 08:34:23 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57194 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726258AbgGXMeX (ORCPT ); Fri, 24 Jul 2020 08:34:23 -0400 Received: from theia.8bytes.org (8bytes.org [IPv6:2a01:238:4383:600:38bc:a715:4b6d:a889]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 08190C0619D3; Fri, 24 Jul 2020 05:34:23 -0700 (PDT) Received: by theia.8bytes.org (Postfix, from userid 1000) id B18DF7DD; Fri, 24 Jul 2020 14:34:21 +0200 (CEST) Date: Fri, 24 Jul 2020 14:34:20 +0200 From: Joerg Roedel To: Lu Baolu Cc: Koba Ko , Jun Miao , iommu@lists.linux-foundation.org, linux-kernel@vger.kernel.org, Ashok Raj , stable@vger.kernel.org Subject: Re: [PATCH v2 1/1] iommu/vt-d: Skip TE disabling on quirky gfx dedicated iommu Message-ID: <20200724123420.GU27672@8bytes.org> References: <20200723013437.2268-1-baolu.lu@linux.intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20200723013437.2268-1-baolu.lu@linux.intel.com> User-Agent: Mutt/1.10.1 (2018-07-13) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Jul 23, 2020 at 09:34:37AM +0800, Lu Baolu wrote: > The VT-d spec requires (10.4.4 Global Command Register, TE field) that: > > Hardware implementations supporting DMA draining must drain any in-flight > DMA read/write requests queued within the Root-Complex before completing > the translation enable command and reflecting the status of the command > through the TES field in the Global Status register. > > Unfortunately, some integrated graphic devices fail to do so after some > kind of power state transition. As the result, the system might stuck in > iommu_disable_translation(), waiting for the completion of TE transition. > > This provides a quirk list for those devices and skips TE disabling if > the qurik hits. > > Fixes: https://bugzilla.kernel.org/show_bug.cgi?id=208363 > Fixes: https://bugzilla.kernel.org/show_bug.cgi?id=206571 > Tested-by: Koba Ko > Tested-by: Jun Miao > Cc: Ashok Raj > Cc: stable@vger.kernel.org > Signed-off-by: Lu Baolu Applied for v5.9, thanks.