Received: by 2002:a05:6902:102b:0:0:0:0 with SMTP id x11csp176705ybt; Thu, 9 Jul 2020 19:04:48 -0700 (PDT) X-Google-Smtp-Source: ABdhPJw6DG1kOBvvpoDsmw1yBedNqtaKYUAI7bm5yFmezZ12mg5Y82uf/6l3NUVguQfG7bFnITpG X-Received: by 2002:a17:906:4a17:: with SMTP id w23mr61805373eju.360.1594346688376; Thu, 09 Jul 2020 19:04:48 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1594346688; cv=none; d=google.com; s=arc-20160816; b=BoO6c9fyPEq5kGeGhBkV9A1FxXJMt4QwUhrIl6zq1visW3FgMx8xTc6C8WG2+nwEvt Qima4uVV7J+/B2TbIcqVqdtKUz2fZhOU0JX627RYPQ0lIiKA534rFAQuh0ZSwrbeQP+X hwUod0Y0smMjG7QK47EjHwEuW0PRLJiccl7VDSzDVNn2yp/O7Uro+VOvLbjaIX6phmnH aWr7zUD+jRXVmMV6qHdWQcDhtg7tQG2IBGGXwFe2IqhorhMrKF9Rl5Pd8BxrT7XtTWPJ BauOcEaN8Rzh++S9WPIz6qhTN4pkAHYSIK9GbPZOlJbM8m6D9nizG72yDCF0PRO7duW7 TBng== 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=SQxlxH8w1XRv/PIUz5GYKxBrNAiYJPuPTh1GdFkqGIs=; b=WxU7AorcHU6xk9v3KosadtRTi+ElwJvXduHTRh8rrgx+1e4B3RsuhPgfQyNoV44om9 pr6Sh2+Y6YKbFIuYOEUKZOsmBzgIwKZDCPoPo/YRwSNQuu1zOSpl8Z2bAAFjAaH0vkrQ nUQ8noHpEmIQ2mYwIECjvWf9MTbB4Fl5o6iub7UEtoswTbvxAc0rv266JWvfg4h4eZaj tNi6IstQF5EHFi3qfEiB1wi/r3W+gbrItUxgG31JruyY6NZvKO4DDTP+dOyRQwVXs5vi 9tRcFBsYpRiT+ZGLIAziJOy/wzGKFHTXFJERn0uUuBUTBv3/kDsjfmijKGogqr+Lf+7u aewA== 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 s23si3067328eju.242.2020.07.09.19.04.24; Thu, 09 Jul 2020 19:04:48 -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 S1726725AbgGJCDx (ORCPT + 99 others); Thu, 9 Jul 2020 22:03:53 -0400 Received: from youngberry.canonical.com ([91.189.89.112]:55171 "EHLO youngberry.canonical.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726323AbgGJCDx (ORCPT ); Thu, 9 Jul 2020 22:03:53 -0400 Received: from mail-ot1-f71.google.com ([209.85.210.71]) by youngberry.canonical.com with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.86_2) (envelope-from ) id 1jtiOE-0001KK-EI for linux-kernel@vger.kernel.org; Fri, 10 Jul 2020 02:03:50 +0000 Received: by mail-ot1-f71.google.com with SMTP id z23so2419496ote.14 for ; Thu, 09 Jul 2020 19:03:50 -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=SQxlxH8w1XRv/PIUz5GYKxBrNAiYJPuPTh1GdFkqGIs=; b=R1SsomCbWD0FtkQ82r6U7c0fb4WPmA6LSZMGrs3+BY/WQAd8YCM1noxSWEMP24+TWc S/jbQ6tiSETwtbM5rPDESByyy7Q5fj5SPAmV/qjl13NmPIMCQg93DojIBlqTnDw6+awk iUW3tYXLoXg1qHS4rFQxcVkXiD5yiKv/xWKIt1aESQ8qEpkq8LXlDPMLEEfeDNoqEsxX ZLO4gzbAG0cP+nYzAHgYzQDv6pAKv88X7vdFbzYN3zZPAr7KQkvgUMRZe/RkvrwCaBIB lKcI5RrKjMmWcw1ZtBAFri9KnJYi8cgf3oXpEkJCSf4oTKIBa0GrTXQ863DxXTyQIvkW enew== X-Gm-Message-State: AOAM530M1FvR8B5MKwnR+AjrBUjRyAqLZsDQYvk5ebi99HWJtUOk3hR2 fkxTo1sE5gEQ2ms8p2/QKcUVUeJjdBOxhAVdZXWjVyJVyPiNEa6ROl9yXIxgPPkEqiAdq4W0UrO naIU76Q45IY97v/II6fs7wtPm4m2KLQXm2TzFq3YbwFwf0SFggcErJR5vMw== X-Received: by 2002:aca:53cc:: with SMTP id h195mr2497084oib.49.1594346629475; Thu, 09 Jul 2020 19:03:49 -0700 (PDT) X-Received: by 2002:aca:53cc:: with SMTP id h195mr2497064oib.49.1594346629211; Thu, 09 Jul 2020 19:03:49 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: From: Koba Ko Date: Fri, 10 Jul 2020 10:03:38 +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: "Limonciello, Mario" Cc: David Woodhouse , Lu Baolu , Joerg Roedel , "iommu@lists.linux-foundation.org" , Kai Heng Feng , Linux Kernel Mailing List , Christian Kellner , Anthony Wong 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 Hi Mario On Fri, Jul 10, 2020 at 4:58 AM Limonciello, Mario wrote: > > > -----Original Message----- > > From: iommu On Behalf Of Koba Ko > > Sent: Sunday, June 14, 2020 10:47 PM > > To: David Woodhouse; Lu Baolu; Joerg Roedel > > Cc: iommu@lists.linux-foundation.org; Kai Heng Feng; Linux Kernel Mailing > > List > > Subject: [Issue]platform/x86: iommu: System can't shutdown because iommu > > driver keeps checking the status of DMA_GSTS_TES > > > > 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. > > Just to explain why this happens, on many of Dell's systems VT-d is only enabled > when secure boot is enabled. > > > 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 the status of DMA_GSTS_TES until status of DMA_GSTS_TES is 0. > > > > If you need more information, I can provide it. > > > > Thanks > > Koba Ko > > _______________________________________________ > > iommu mailing list > > iommu@lists.linux-foundation.org > > https://lists.linuxfoundation.org/mailman/listinfo/iommu > > This is reported on TGL pre-production system, but actually same symptom is also > happening in ICL production systems such as XPS 7390 2-in-1 and XPS 9300. > > Details for the ICL issue are available here: > https://bugzilla.kernel.org/show_bug.cgi?id=206571 > > A user did bisect it back to commit 6c3a44ed3c553c324845744f30bcd1d3b07d61fd in > 5.5. Glancing through the code and comparing the suspend case, I would ask is it > just a case of missing a flush at shutdown (IE iommu_flush_all)? > If dma translation doesn't be disabled during shutdown, the machine would be powered off successfully. I have tried to flush before disabled and this can't affect the result of the issue. koba ko