Received: by 2002:a25:1985:0:0:0:0:0 with SMTP id 127csp3869002ybz; Mon, 4 May 2020 11:12:01 -0700 (PDT) X-Google-Smtp-Source: APiQypI9yO4YOfd4HcXu1wOHCDkjAC96PiNdxI/cgVeYDetxL207nIJUEREqOsQtwKuhShgT1oBb X-Received: by 2002:a17:906:3291:: with SMTP id 17mr15667557ejw.343.1588615921631; Mon, 04 May 2020 11:12:01 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1588615921; cv=none; d=google.com; s=arc-20160816; b=X80ViW8hVeclYyU3LZM1d4toqqwyGid1FSs+AqcjfToirxUUVMg9GxHTzU81Ciov4W b9OTy0z0/u3lu3ANqE4xP2/ekpL7H+yFwr6ZpSCb4GAyrkCmmwpIN4/MwKkgIextAqny +Y1H2K4A568MDCqiLd8Wm9nc01mSAKvPTeu0wJ/RjicNLn3AYUDLZXpmVKrFg/t+huwH 7DxOy5DrYmqOVDU+ND9tP/XlXim2TjI1OJNl9oDipMR4bVZ6W5adGWY2ND7X6D/Dqh/i VctPYp5o0tvkcwc5AB65aCcCAKWb45PfFDu6CB5OvFuOGXHqX1lbeQAVxqKvoAF6uSpD H3TA== 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 :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=ZCWYGE05ZEkHX0QeHgrbw/QGp/1ZzUUFFHehs2x0Qus=; b=Y/e9rsqQ4WhB38PmFbrmv9yLcfHOv4zh6ryrt4eHbE8ATnTInqZsDqkyTepfLLXwMn GMUiiJ10kQN3dveel4NliWtTumE6VIeUdQSdYocgKdcG2HugXvYK7ESvTIxAlR4a9FUg hTXabn9Zv3upQ/UOm+G4f9p5mXWODp6qLL36/wa5JTcbB6A2KFbZgufEy8bvwkH3TwS1 +NrIWEtmPGawE3uzMmb9gR4pQw9QVWDB6QjagZqMg3P/KUMh/WI3h5Ff3x2AX1f3DJ5s 7/GbduW3qRYGkbK6XwlJ6BhwKKkYkHDQw2yK54aSNIGRrrL0zhKTYd+NqYItKnDxLZJg glRg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=DqZEiteF; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id c12si7347871edr.596.2020.05.04.11.11.34; Mon, 04 May 2020 11:12:01 -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=DqZEiteF; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1732125AbgEDSHV (ORCPT + 99 others); Mon, 4 May 2020 14:07:21 -0400 Received: from mail.kernel.org ([198.145.29.99]:38052 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1732117AbgEDSHR (ORCPT ); Mon, 4 May 2020 14:07:17 -0400 Received: from localhost (83-86-89-107.cable.dynamic.v4.ziggo.nl [83.86.89.107]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id C5B55205ED; Mon, 4 May 2020 18:07:16 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1588615637; bh=GlMvvMMAYJ2KBnvuyjfSwm5W5H+wal8W/8Z6T9uPoJk=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=DqZEiteF6sI2HvCMP+B8GvBhTe0mpfuikZkQXhCZcDtn7hW+up+EfXujFzaCznMAG qaNz3Tmbjo8aiUvsg+OlZwhT45k62AVw0jeOTv+VP3Nn2f+iz3X4ok+NA1v5yBP2U4 U6GlifuS+qVezh/nJfsCwv0FQLzZMzUaM36RfThQ= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Suravee Suthikulpanit , Joerg Roedel Subject: [PATCH 5.6 62/73] iommu/amd: Fix legacy interrupt remapping for x2APIC-enabled system Date: Mon, 4 May 2020 19:58:05 +0200 Message-Id: <20200504165509.925573177@linuxfoundation.org> X-Mailer: git-send-email 2.26.2 In-Reply-To: <20200504165501.781878940@linuxfoundation.org> References: <20200504165501.781878940@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 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 commit b74aa02d7a30ee5e262072a7d6e8deff10b37924 upstream. 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: Greg Kroah-Hartman --- 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 @@ -2936,7 +2936,7 @@ static int __init parse_amd_iommu_intr(c { 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) {