Received: by 2002:a6b:fb09:0:0:0:0:0 with SMTP id h9csp632892iog; Mon, 13 Jun 2022 09:32:25 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwEV1VZzxLrWqpEIHLtAX5wEfa/oX3HKpTfpJ6O7dMoeiLlLGR0EDjVY5lEcKCpbGDfcsTh X-Received: by 2002:a65:6887:0:b0:3fc:a5ef:3701 with SMTP id e7-20020a656887000000b003fca5ef3701mr420039pgt.10.1655137945106; Mon, 13 Jun 2022 09:32:25 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1655137945; cv=none; d=google.com; s=arc-20160816; b=qcRFQFMpK5VmeS5ALXL0PMd9jNBTyZ0ryHeWAiQtBCSUamlROq+E6rElSk1yRutH0t XyOwEC+atNcSmFWsjrXmLKRyAmWcUot3OVsBsaH4wmsMQWfuKMfRN6raHDZYmSBDh8Tj 5ZCQbyq98FmBFm6p3A2YZwYxJw3cR2fywpS571OlTQn8+9+ixnUq2qNFot2A7gJDlAx4 tilZDPrXG1wPyOHCHvOPitVYDgBPeFu9W1cLuC7lTtibA2DAVZ+QCr5hVdqqF3QIAsov j+eIRvKSSZ2nXLuIXQAvlYq/pcro8kb42ckSwd2KAEaygfqq1MZl++5ue7wNJi8op0+i Mk1w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=X9B9+gtcyvOgHb8SUVtqIAA4gGVQEzapDkSywZGMW04=; b=aC/Rpf5D0s89hdiII+fHCsh4yu72MH8niiOHFFAyxOVq7qiJGv6yqiKtD0y9A1WJ7Y n2eK9B2ruAhGYNZK9K/mTI/4bJiywb8kQETHQ2077iz16SjHfd9Qe6XbgVfLlkpu+7ew v95REW43wDe5Nlnp6WtE/ytTLJgA3d0WA95iC/y+Ex+dP1PXaHk6vZovYMJGLSWcVnDk 5kwOaXf/S4Mn0Q9U2uk3yCw38/7Rrtm/HFA9ktkxNCkPZ9rONPvfDRKTzDbOKAC1W2hS LYQapvmeKGu6/vxrOL0uZJX4ezk7AJXhBrhD09rxIFD/rz8onGghOj8cWL4I5VuwZ98e iJcA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=pfsk84X5; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id l71-20020a63914a000000b003fa1591abfdsi10106511pge.867.2022.06.13.09.32.13; Mon, 13 Jun 2022 09:32:25 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=pfsk84X5; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S243287AbiFMKWV (ORCPT + 99 others); Mon, 13 Jun 2022 06:22:21 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43954 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S242956AbiFMKUn (ORCPT ); Mon, 13 Jun 2022 06:20:43 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C7AFCC2D; Mon, 13 Jun 2022 03:17:20 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 932D260AE8; Mon, 13 Jun 2022 10:17:20 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 9A2F0C34114; Mon, 13 Jun 2022 10:17:19 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1655115440; bh=kH8SKf4VDViUQlEzsMYh3YB5EgApZM0I6GdA+2BlqmI=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=pfsk84X5fltx1Og6bWVcAiUWzqP3pOlOWgEyplB5t5fVPe990hl3nUyUJM8S9cwVc Ansq/FPrFKiKkgboR68B+EwiXr02ntS77Np0Xu8r6NPaIR8GsCGMEjVnH+p0v7PmyV eC4LBNmu2wGsdxLbueoKFdQZJHECMHca18AXWq+4= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, "D. Ziegfeld" , =?UTF-8?q?J=C3=B6rg-Volker=20Peetz?= , Joerg Roedel , Sasha Levin Subject: [PATCH 4.9 074/167] iommu/amd: Increase timeout waiting for GA log enablement Date: Mon, 13 Jun 2022 12:09:08 +0200 Message-Id: <20220613094858.247719382@linuxfoundation.org> X-Mailer: git-send-email 2.36.1 In-Reply-To: <20220613094840.720778945@linuxfoundation.org> References: <20220613094840.720778945@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-8.3 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Joerg Roedel [ Upstream commit 42bb5aa043382f09bef2cc33b8431be867c70f8e ] On some systems it can take a long time for the hardware to enable the GA log of the AMD IOMMU. The current wait time is only 0.1ms, but testing showed that it can take up to 14ms for the GA log to enter running state after it has been enabled. Sometimes the long delay happens when booting the system, sometimes only on resume. Adjust the timeout accordingly to not print a warning when hardware takes a longer than usual. There has already been an attempt to fix this with commit 9b45a7738eec ("iommu/amd: Fix loop timeout issue in iommu_ga_log_enable()") But that commit was based on some wrong math and did not fix the issue in all cases. Cc: "D. Ziegfeld" Cc: Jörg-Volker Peetz Fixes: 8bda0cfbdc1a ("iommu/amd: Detect and initialize guest vAPIC log") Signed-off-by: Joerg Roedel Link: https://lore.kernel.org/r/20220520102214.12563-1-joro@8bytes.org Signed-off-by: Sasha Levin --- drivers/iommu/amd_iommu_init.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) --- a/drivers/iommu/amd_iommu_init.c +++ b/drivers/iommu/amd_iommu_init.c @@ -86,7 +86,7 @@ #define ACPI_DEVFLAG_LINT1 0x80 #define ACPI_DEVFLAG_ATSDIS 0x10000000 -#define LOOP_TIMEOUT 100000 +#define LOOP_TIMEOUT 2000000 /* * ACPI table definitions *