Received: by 2002:a05:6902:102b:0:0:0:0 with SMTP id x11csp686424ybt; Mon, 6 Jul 2020 20:31:22 -0700 (PDT) X-Google-Smtp-Source: ABdhPJy7YfveLrLyG9vsaNfTKJ2SqakAyUYrhZc+JnpIgdZD7vIYsZwr05c403cJ8ZoYVD6dhcPf X-Received: by 2002:a05:6402:363:: with SMTP id s3mr47044848edw.238.1594092681831; Mon, 06 Jul 2020 20:31:21 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1594092681; cv=none; d=google.com; s=arc-20160816; b=ISqV5xT5Tipx0UAqekmet/PS2uBPO1zOuddICNmZTiBi0P6YgoTpWxPi/KTgbXIjfe G+hlkPe+WnDa0QUEeLF8DHkbqxeubBSs8qVwyiUEGClfGPentScjTSvtpTv52pUatAzX TCIycl4UvaJvy/bcEkWg6BwY4aPd3a7AeXjVmDdbYH2zP2l7pm4fKOg73x3C1+lXYPrg p2v11STzjouCzdaaGSoy/gezAC0mGjSb/hL2R5muJUCemeuFGo2nJX12QhmOKr+CVuhn Xevkr5FcsGW3gWJbJ9dMFOf73MXfZRMZZWV7PYiwbXxrb+QaDpHuK5rIW0dk/o9vzt6X ieBA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version; bh=JWJ62s8035AwMjPdpYDA6UZDbxEpjF3hLCFmfSbPnhw=; b=lPBfmTWHqnMsOE9mWC/AHoLwVQ2Ze6h1RbSApZZglRkWgcfgV6OPXysDtwgRntGai+ QPJ0av07KQol0TnNc0G3Wn0lDrRFSbjQtr+wf1XNghqbrXzxDL4eF/gQ/N7jSqgSS+aR M6jsKu6MY/qbu/luYLwEuV2SprrOs9M6yYTkI4AjPkoIHcb5SC4qfG15kFkirzZvwfs1 3KoxW8tWz6zJ4WFz1vDlEWkxQNwGKJXoJYl/iauGts+4alE0gyJsvAuoNpKkhCFI3jcd wJcOAmPDs6D77bmNWmdKuA9Fy0g+qZX8YVoI6EN8CJ6GrpQhHqczNvKBp5Id8d8b3P/Z AFHg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=canonical.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id r13si7308212edq.209.2020.07.06.20.30.58; Mon, 06 Jul 2020 20:31:21 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=canonical.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727094AbgGGD2P (ORCPT + 99 others); Mon, 6 Jul 2020 23:28:15 -0400 Received: from youngberry.canonical.com ([91.189.89.112]:48646 "EHLO youngberry.canonical.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727072AbgGGD2O (ORCPT ); Mon, 6 Jul 2020 23:28:14 -0400 Received: from mail-oo1-f69.google.com ([209.85.161.69]) by youngberry.canonical.com with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.86_2) (envelope-from ) id 1jseHD-0006Av-QU for linux-kernel@vger.kernel.org; Tue, 07 Jul 2020 03:28:11 +0000 Received: by mail-oo1-f69.google.com with SMTP id a24so12104379oos.10 for ; Mon, 06 Jul 2020 20:28:11 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=JWJ62s8035AwMjPdpYDA6UZDbxEpjF3hLCFmfSbPnhw=; b=V3/QZj3W/zdgj0f98OmlItDCrrws5o10QqS584150iTgF+FljXAo2DXTvxSWmsTNfi ZqPfWKtpBr2CXI6vBvXLprMeXoLhIhnA8GiQhaOkc/NPAk9PH4aB6bZ/YfFEmFd5MmFt 516Gq6n91tOt+nbExwMnhKi/D7YIiPmP7LgEYJRT5tP3Tdve+dxPosPC2uTjyraoHQ7w +/hFWcLFf4234pQBiexL8d98Eavd4vkk2gT2JuPGFr5us8F5qeTVwqmMBZrH1mN+AXW+ YPZT+1CYfGyPCgHqnKLLe6m4P6r1OgyyYUU/sO7E9rif2gaY66Ak+tXZMYfnAbEdT+JL TtQA== X-Gm-Message-State: AOAM530JXbLeI0Gyyij26tAzRsA0Fs3OPhxVoubqSqEJn09K+pomMM9E eyrKWzcTowd1kGBzyVrFQRtxu9HO9a63jRu10ruO04lc54SRRbpw10T8OeXyKpx5X6pGPvF51RF VyUKRV4ITAptiDABEcg111KtLN4fvtXHW6y7aoe5Z9rRlgvCZ8+U1h0Erdw== X-Received: by 2002:aca:8ce:: with SMTP id 197mr1899322oii.17.1594092490693; Mon, 06 Jul 2020 20:28:10 -0700 (PDT) X-Received: by 2002:aca:8ce:: with SMTP id 197mr1899310oii.17.1594092490392; Mon, 06 Jul 2020 20:28:10 -0700 (PDT) MIME-Version: 1.0 References: <111dde48-8018-6d74-5df8-1534143f4de6@linux.intel.com> <66cacbab-b04d-33f3-053e-4d554ac7c662@linux.intel.com> In-Reply-To: <66cacbab-b04d-33f3-053e-4d554ac7c662@linux.intel.com> From: Koba Ko Date: Tue, 7 Jul 2020 11:27:59 +0800 Message-ID: Subject: Re: [Issue]platform/x86: iommu: System can't shutdown because iommu driver keeps checking the status of DMA_GSTS_TES To: Lu Baolu Cc: David Woodhouse , Joerg Roedel , iommu@lists.linux-foundation.org, Linux Kernel Mailing List , Kai Heng Feng , "Raj, Ashok" , "Sun, Jian" Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Dear Baolu, On Tue, Jun 30, 2020 at 3:52 PM Lu Baolu wrote: > > Hi Koba, > > On 2020/6/30 15:31, Koba Ko wrote: > > On Mon, Jun 15, 2020 at 3:20 PM Lu Baolu wrote: > >> > >> Hi Koba Ko, > >> > >> On 2020/6/15 11:19, Koba Ko wrote: > >>> hi All, > >>> I have a machine and there's only intel gpu. > >>> the secureboot and vt-d is enabled in BIOS. > >>> On the Ubuntu desktop, I do s2idle first and restart the machine. > >>> The machine can't restart successfully, so I need to press the > >>> power button to shutdown. > >>> I tried each of the following and the issue can't be triggered. > >>> 1. disable secure boot in BIOS. > >>> 2. intel_iommu=off. > >>> 3. intel_iomm=igfx_off. > >>> 4. nomodeset > >>> 5. i915.modeset=0. > >>> > >>> After I investigate further, find inte_iommu keeps checking the status > >>> of DMA_GSTS_TES. > >>> During the procedure of restart, the driver would disable iommu > >>> translation and > >>> check status of DMA_GSTS_TES until status of DMA_GSTS_TES is 0. > >>> > >>> If you need more information, I can provide it. > >> > >> Do you mind telling what platform is it? > >> > >> Best regards, > >> baolu > > Hi Baolu, > > Sorry, i missed your email. > > I'm running on TGL. > > My colleague has reported this on bugzilla. > > Have tested your patch and it works fine. > > https://bugzilla.kernel.org/show_bug.cgi?id=208363 > > > > Could you explain more about these patches!? Why do we need a flag > > for active iommu!? > > > > We're still investigating this issue. If we find out more, I'll let you > know. Thanks a lot for the reporting. > > Best regards, > baolu > Sorry for disturbing, Do you have any updates for this issue?! https://bugzilla.kernel.org/show_bug.cgi?id=208363 Koba KO