Received: by 2002:a25:23cc:0:0:0:0:0 with SMTP id j195csp786790ybj; Thu, 7 May 2020 07:38:17 -0700 (PDT) X-Google-Smtp-Source: APiQypJETHnAnF2HNAKRmzKbSIHMRWHyNLhgGmnRuZqOBq5r6lj6/TCX7XmakBvmH73Uf2gnRnv3 X-Received: by 2002:a17:906:cd0d:: with SMTP id oz13mr12381694ejb.82.1588862297428; Thu, 07 May 2020 07:38:17 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1588862297; cv=none; d=google.com; s=arc-20160816; b=Q7fihFM8dve32GGVkNLJkj9rTzmpzI2yOyKVKclABShsoB9lSIv2XmRTyuovUwEVEr 1s9tm6Nx9I6SRXnJtrXC/VOXf1JRI4tm9Ogu0On/REBcKbIDAY/slODtSrBUPSmuS1Pn RM15TROu+LfnT1jYDheyEswrfr2j3jRgGxswjqpgsVAAawbE62MeqxlCgAIH/KHbTW8g fE0yQU/EiTyHIvEUVoJzqyzJ/HcG89hPf6BesefENYgTcE15OoPQcqrAnOcOtlmiZZ6i eu/zsNV7V4qBxAC2wr792H5EJLZ9A1WEvpWQer06+xIeveig26FMwWe+osor530lXhRH 00Jw== 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:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=OXM50czL6lIWscTa9yPaejytNHZuNfDbkSOnOEMAk00=; b=KfvHmKB5+QUAsnlsS058VVrdd/FGnixjPjYxhQlE6vHfd+Nl8auY5AOQujCzt1IV2U aoWn1tDVj4ZYHZ9XLbB1/RpzxYhoZLz24IHsK33tEDni8OYiDs5IdUZPBMjDYEs/CjxY /f3pC2X7FFgiBIEDZn1dluqy8pcwyakZCkACiFaIAJEjA0pzP9PciNZHITRg7GFyyDi9 b22TogpN+WTkeLHofV0wpununcUoLSvc8XEXhJ/euCaUMDbDMxST11srxvdhqbGvtBRO Elkxo+h8T0yXqSF5cdBejFD17Wqh6ao1cdk4TJnCuv9QtRQ1LEyxyDomYtONo8NRHaS5 Yk2Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b="d8x9nK/S"; 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=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id a28si3213893edj.505.2020.05.07.07.37.52; Thu, 07 May 2020 07:38:17 -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; dkim=pass header.i=@kernel.org header.s=default header.b="d8x9nK/S"; 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=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728135AbgEGO2c (ORCPT + 99 others); Thu, 7 May 2020 10:28:32 -0400 Received: from mail.kernel.org ([198.145.29.99]:55124 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728111AbgEGO20 (ORCPT ); Thu, 7 May 2020 10:28:26 -0400 Received: from sasha-vm.mshome.net (c-73-47-72-35.hsd1.nh.comcast.net [73.47.72.35]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 621FD2084D; Thu, 7 May 2020 14:28:25 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1588861706; bh=HSNsxHAnlLNekFFIcEI75oB9aFG1/56ExB3fMWB0mus=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=d8x9nK/SXAQ47sM4DIVEbHn2LEQ0B+cHuo1V9R2ntoW/fp/DREBrfCeEzNqhZ5Uu1 FVCVHMtj0RVgUXNoi3TDJfHqfC+RE4Mno5QZ2mCz6Q9UJBhX2PXg3zFspmNs2BrZHX yuR+lg67ewV2S8WSzWdAoFcv5GBXQCpRBBZO7aL8= From: Sasha Levin To: linux-kernel@vger.kernel.org, stable@vger.kernel.org Cc: Suravee Suthikulpanit , Joerg Roedel , Sasha Levin , iommu@lists.linux-foundation.org Subject: [PATCH AUTOSEL 5.6 46/50] iommu/amd: Fix legacy interrupt remapping for x2APIC-enabled system Date: Thu, 7 May 2020 10:27:22 -0400 Message-Id: <20200507142726.25751-46-sashal@kernel.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20200507142726.25751-1-sashal@kernel.org> References: <20200507142726.25751-1-sashal@kernel.org> MIME-Version: 1.0 X-stable: review X-Patchwork-Hint: Ignore Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Suravee Suthikulpanit [ Upstream commit b74aa02d7a30ee5e262072a7d6e8deff10b37924 ] Currently, system fails to boot because the legacy interrupt remapping mode does not enable 128-bit IRTE (GA), which is required for x2APIC support. Fix by using AMD_IOMMU_GUEST_IR_LEGACY_GA mode when booting with kernel option amd_iommu_intr=legacy instead. The initialization logic will check GASup and automatically fallback to using AMD_IOMMU_GUEST_IR_LEGACY if GA mode is not supported. Fixes: 3928aa3f5775 ("iommu/amd: Detect and enable guest vAPIC support") Signed-off-by: Suravee Suthikulpanit Link: https://lore.kernel.org/r/1587562202-14183-1-git-send-email-suravee.suthikulpanit@amd.com Signed-off-by: Joerg Roedel Signed-off-by: Sasha Levin --- drivers/iommu/amd_iommu_init.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/iommu/amd_iommu_init.c b/drivers/iommu/amd_iommu_init.c index 6be3853a5d978..2b9a67ecc6ac4 100644 --- a/drivers/iommu/amd_iommu_init.c +++ b/drivers/iommu/amd_iommu_init.c @@ -2936,7 +2936,7 @@ static int __init parse_amd_iommu_intr(char *str) { for (; *str; ++str) { if (strncmp(str, "legacy", 6) == 0) { - amd_iommu_guest_ir = AMD_IOMMU_GUEST_IR_LEGACY; + amd_iommu_guest_ir = AMD_IOMMU_GUEST_IR_LEGACY_GA; break; } if (strncmp(str, "vapic", 5) == 0) { -- 2.20.1