From nobody Tue Dec 16 08:51:39 2025 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 1CD67C07E9D for ; Mon, 26 Sep 2022 11:00:21 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S237026AbiIZLAR (ORCPT ); Mon, 26 Sep 2022 07:00:17 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53550 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236936AbiIZK63 (ORCPT ); Mon, 26 Sep 2022 06:58:29 -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 D96FE4F195; Mon, 26 Sep 2022 03:30:13 -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 E73DC609FB; Mon, 26 Sep 2022 10:28:45 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id EF013C433C1; Mon, 26 Sep 2022 10:28:44 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1664188125; bh=HleWthHZ63vSu9N7ZdV3d/LwdA/rLSMfpYydZ5gH5u8=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=ENuj4Ulp1mwYXmSXXkCcZdxXbM6KmKOrb+uLHpxhcX/i1xxbwG1XP3MU2kawpPuTU xIq4sBPKE6noXBDn2FzhrSfrizt/w/wL3jWPOBVlH7oCc6iOfLoXZVFuyqzkskKN25 z/mBhx9d+TWJk/ZK7JQTXIYNSPkJIY6A5S+PdZgg= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Raghunathan Srinivasan , Yi Liu , Jerry Snitselaar , Kevin Tian , Lu Baolu , Joerg Roedel Subject: [PATCH 5.10 048/141] iommu/vt-d: Check correct capability for sagaw determination Date: Mon, 26 Sep 2022 12:11:14 +0200 Message-Id: <20220926100756.191250278@linuxfoundation.org> X-Mailer: git-send-email 2.37.3 In-Reply-To: <20220926100754.639112000@linuxfoundation.org> References: <20220926100754.639112000@linuxfoundation.org> User-Agent: quilt/0.67 MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Type: text/plain; charset="utf-8" From: Yi Liu commit 154897807050c1161cb2660e502fc0470d46b986 upstream. Check 5-level paging capability for 57 bits address width instead of checking 1GB large page capability. Fixes: 53fc7ad6edf2 ("iommu/vt-d: Correctly calculate sagaw value of IOMMU") Cc: stable@vger.kernel.org Reported-by: Raghunathan Srinivasan Signed-off-by: Yi Liu Reviewed-by: Jerry Snitselaar Reviewed-by: Kevin Tian Reviewed-by: Raghunathan Srinivasan Link: https://lore.kernel.org/r/20220916071212.2223869-2-yi.l.liu@intel.com Signed-off-by: Lu Baolu Signed-off-by: Joerg Roedel Signed-off-by: Greg Kroah-Hartman --- drivers/iommu/intel/iommu.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) --- a/drivers/iommu/intel/iommu.c +++ b/drivers/iommu/intel/iommu.c @@ -569,7 +569,7 @@ static unsigned long __iommu_calculate_s { unsigned long fl_sagaw, sl_sagaw; =20 - fl_sagaw =3D BIT(2) | (cap_fl1gp_support(iommu->cap) ? BIT(3) : 0); + fl_sagaw =3D BIT(2) | (cap_5lp_support(iommu->cap) ? BIT(3) : 0); sl_sagaw =3D cap_sagaw(iommu->cap); =20 /* Second level only. */