Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp13469159ybl; Sun, 29 Dec 2019 12:38:01 -0800 (PST) X-Google-Smtp-Source: APXvYqzSMndMUNwaT3/Sd90z9riHeUuK5iq0lFcZL0U5/hs5/5JsCnunrMQ+76imSWAEi+ZUu2RE X-Received: by 2002:a9d:7d09:: with SMTP id v9mr52085752otn.338.1577651881019; Sun, 29 Dec 2019 12:38:01 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1577651881; cv=none; d=google.com; s=arc-20160816; b=wMJLR9xoP0HxZUIBmXr/bduFdUIb3mZNulI4CP2vAmc7BDoJxMlxHxLJYVEpzJzlVI Aoy71X0h1zcjP5YhoNanh6b00a+qc+0pJmC89yLP6O/yfp5dhQD+tnunnVj/m3STSLfA cvnEUDqceLAFg4UF5vEu/RzMf8nTXOPrlyXCmdnEZzdJdoTKSMlDKYe0aMHzLbwpuiAn e3UFw3H0Bd1HpSDaXFJ2cpJiEAH76VrnIPpXzxMVzzi9iDAOfLomtEawlHgzQ8Yxp+qn W6AyoeBW9y59bRpzxg28WguCOTUfJihd05VKBbwfcmMY+BKybZI0nZNEXRSgA/5ef4JP xEiQ== 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=E8CtVl20wOkmS4Bbot3T+1tUutkD2r9sgDcnXOUKsiU=; b=G+B8uUwDnKIN0Wce+LHAP3DoAQvrha0frLZxMZ2DzQ7PZJ4aGXXwPbvLqDl+ostAFW c4Ivy/J3YmdljsNuRRhhg/Gw3BC4e+kRoHY6Jwky1gGhtoAtfzOR4EXas5QwkEE7qVUH R3XeDrmvaT13rR8+zSY3Gtjz/36djGneioaR/eREUfuMUjrU9BXlgskJPFpl2tB2eO1R 6MG3rTvYlcF/5srXfHVSpgxFxTyZyCymJvuDsM1HTPXb9MC1uIIZs6gW7SjKOyf/3q+n oXsksGtjpmh0++GN54zgF7UHduH/24/iLewS6TVB+9a/0vDNAoWGV/Ztor/NF68xPQ5s zoSA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=FnRW+TOo; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id q124si18630104oig.228.2019.12.29.12.37.50; Sun, 29 Dec 2019 12:38:01 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=FnRW+TOo; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729774AbfL2RfC (ORCPT + 99 others); Sun, 29 Dec 2019 12:35:02 -0500 Received: from mail.kernel.org ([198.145.29.99]:38890 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729107AbfL2RfB (ORCPT ); Sun, 29 Dec 2019 12:35:01 -0500 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 E116F20409; Sun, 29 Dec 2019 17:34:59 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1577640900; bh=xmheIYouYHjzQysGkAZks8VAaejYmNwQTYRmOto9HuA=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=FnRW+TOo8UeEfS9liAI75hX1GqC6xj1fqBkBCmDR1T7jICUotUEC2NxcKOEflbqWA 5Pv2fe0FDqlWnctcn4/TwPyzmNHpkrmpTr/mtpNUci8J4ZGTgfCNHrvctLGp0uqNPG Q29K8QuQCR4eoH5lQKoPU++Yxz4zMQ/VM42l4yaI= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Sam Bobroff , Alex Deucher , Sasha Levin Subject: [PATCH 4.19 186/219] drm/amdgpu: fix bad DMA from INTERRUPT_CNTL2 Date: Sun, 29 Dec 2019 18:19:48 +0100 Message-Id: <20191229162537.495458963@linuxfoundation.org> X-Mailer: git-send-email 2.24.1 In-Reply-To: <20191229162508.458551679@linuxfoundation.org> References: <20191229162508.458551679@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: Sam Bobroff [ Upstream commit 3d0e3ce52ce3eb4b9de3caf9c38dbb5a4d3e13c3 ] The INTERRUPT_CNTL2 register expects a valid DMA address, but is currently set with a GPU MC address. This can cause problems on systems that detect the resulting DMA read from an invalid address (found on a Power8 guest). Instead, use the DMA address of the dummy page because it will always be safe. Fixes: 27ae10641e9c ("drm/amdgpu: add interupt handler implementation for si v3") Signed-off-by: Sam Bobroff Signed-off-by: Alex Deucher Signed-off-by: Sasha Levin --- drivers/gpu/drm/amd/amdgpu/si_ih.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/amd/amdgpu/si_ih.c b/drivers/gpu/drm/amd/amdgpu/si_ih.c index 60dad63098a2..e40a3fbc3e76 100644 --- a/drivers/gpu/drm/amd/amdgpu/si_ih.c +++ b/drivers/gpu/drm/amd/amdgpu/si_ih.c @@ -62,7 +62,8 @@ static int si_ih_irq_init(struct amdgpu_device *adev) u64 wptr_off; si_ih_disable_interrupts(adev); - WREG32(INTERRUPT_CNTL2, adev->irq.ih.gpu_addr >> 8); + /* set dummy read address to dummy page address */ + WREG32(INTERRUPT_CNTL2, adev->dummy_page_addr >> 8); interrupt_cntl = RREG32(INTERRUPT_CNTL); interrupt_cntl &= ~IH_DUMMY_RD_OVERRIDE; interrupt_cntl &= ~IH_REQ_NONSNOOP_EN; -- 2.20.1