Received: by 2002:a05:6902:102b:0:0:0:0 with SMTP id x11csp3381451ybt; Tue, 30 Jun 2020 01:02:21 -0700 (PDT) X-Google-Smtp-Source: ABdhPJx2poBUtpfeEszcgUOPf6BxNOEn3s3/NBiu3jOmIUKkiNyWRXJ9ElKlV1l0YdV5cHh5dN6j X-Received: by 2002:a17:906:6dd7:: with SMTP id j23mr2154183ejt.529.1593504141744; Tue, 30 Jun 2020 01:02:21 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1593504141; cv=none; d=google.com; s=arc-20160816; b=zehwi4HSlhBtO/0RwX2RNgD+8vkboaqj/P0UNVikLhtoYoetiUy0pe/KiwlTFY1gd6 qJva3/UkTcsP8MO2+wwwbOhAiOhUoCEQAgfCkDCxRs5iEFjgLUsGfb5B1ER8bOKMrrQ6 F3V56vjnPUNCea1sTRPrusoVjF5ubzdxx6xRPiGF53THrryZOm54HCwGNrLlP12qMCnC bfgldb6KSDc4Z7EgnbKHHIVr+hiFkoia6gSwgvlWUF1a7/rLChUCxOZ8OoLZR0TD3IV+ bDA+Y/1KKpyq2wDCctRbw11lFou0af4Kkxc081dNCTNlJlFBzn+v54oQ7z7rhPMMtjo7 mKag== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:to:subject:cc:ironport-sdr:ironport-sdr; bh=i4Yjyya+QPiwQg/XLELcqXBLSd3jf56N1PK9FGu7Bus=; b=fPVav/WJDtwyWvHsfpKoqLNdZc7FFciw6EAh4CAbPY/BOex7vq2/apD67m61WzVbWX 8fAQol36XCPzGXh5MgAO5ag+oLXiA/5ZbNgRzlSY5trNHfJtRT3YG5OdG9ARC0P9yu1T CN6iE/iff0EMWxh+TJSK3Pk1T3X0422PYJswo3Ia1gnJG30uRh651d7AWPN6atOXBb93 uHfS7Qa7VUSrBEuBR8Ze9ibv7/WQ9htvyYlcBaWHASkWJDYBsBtKEnr1xZWR9LKZqhXQ RsUuQVese2NVESsGDRubIQUmiuFPhT9oIGXMEq/n/C3rJqoeVPhvux/dUUGnM/he0MVf jv3A== 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=intel.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id nk6si1324059ejb.171.2020.06.30.01.01.59; Tue, 30 Jun 2020 01:02: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=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731325AbgF3Hwq (ORCPT + 99 others); Tue, 30 Jun 2020 03:52:46 -0400 Received: from mga01.intel.com ([192.55.52.88]:11359 "EHLO mga01.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1731312AbgF3Hwp (ORCPT ); Tue, 30 Jun 2020 03:52:45 -0400 IronPort-SDR: 4uKteS3ft0b/qoHH5vZf6mopGpvd2k4pABT2Kez7Jk/GZDF3ffKAYxppDZqEHdKO0j1LcWPDzf CkYCeTMizuYA== X-IronPort-AV: E=McAfee;i="6000,8403,9666"; a="164181079" X-IronPort-AV: E=Sophos;i="5.75,296,1589266800"; d="scan'208";a="164181079" X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga008.fm.intel.com ([10.253.24.58]) by fmsmga101.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 30 Jun 2020 00:52:44 -0700 IronPort-SDR: eGGj2t6g5LUU1YhVwky6xRMNCWEVLwnbATlY9tpArRmc7dT1GHG5j1QV6jPn1Wb22N2/pWvd7O F2WuH6iRJGHw== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.75,296,1589266800"; d="scan'208";a="266412260" Received: from blu2-mobl3.ccr.corp.intel.com (HELO [10.249.173.186]) ([10.249.173.186]) by fmsmga008.fm.intel.com with ESMTP; 30 Jun 2020 00:52:41 -0700 Cc: baolu.lu@linux.intel.com, David Woodhouse , Joerg Roedel , iommu@lists.linux-foundation.org, Linux Kernel Mailing List , Kai Heng Feng , "Raj, Ashok" , "Sun, Jian" Subject: Re: [Issue]platform/x86: iommu: System can't shutdown because iommu driver keeps checking the status of DMA_GSTS_TES To: Koba Ko References: <111dde48-8018-6d74-5df8-1534143f4de6@linux.intel.com> From: Lu Baolu Message-ID: <66cacbab-b04d-33f3-053e-4d554ac7c662@linux.intel.com> Date: Tue, 30 Jun 2020 15:52:40 +0800 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:68.0) Gecko/20100101 Thunderbird/68.9.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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