Received: by 2002:a25:1506:0:0:0:0:0 with SMTP id 6csp3710998ybv; Mon, 10 Feb 2020 05:08:17 -0800 (PST) X-Google-Smtp-Source: APXvYqwJR/Jow7idlGjPKxv6C26Ww8KFdaI+BuOAIXvHJC4WEqtw+z49q7nRPSmGJRfXaiouwbg2 X-Received: by 2002:a05:6830:2102:: with SMTP id i2mr962328otc.123.1581340096887; Mon, 10 Feb 2020 05:08:16 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1581340096; cv=none; d=google.com; s=arc-20160816; b=M9kRBcXE5m9zOK6yXgFFvHSHnF2wa1j5eWClB1cjMMh4oaNBNIkmVaXHuD9oAMRNfo tp0zQWdUw1WIjdNFhVgianRYi+2dC7eqTgFPdyfpIwD3oGuU/eZP4SjEDgkJmLXeAXuY yEVlje5hGF4z+sx5dpzjhEKtsx+U+TKkLjNLP63URGUh6f7g5T5QDRk6t72GzT6f2SYm a9gWsIOcmHbTSGsS8KQLVQuYa/vG89ErYVKX11WRBHcqsPBFMN72vvBJph8gvg8bjmCy JWTMT+wZbtAVV92VWnD432KX7RDQN+Etc0VR23nzQV1iHt9n5RlfMFf3cbw8VbN6XpgQ yUsw== 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=2SSfiKY743oy4QI7yEFZwOecnCK3tMi8Rri0E6GwFmA=; b=JBcJMyfhBukOYwO1swIuj1xL8CvSv1Tldnnyffi+zsGIYKBq7Yk3VKLGcY8UPDfBp9 ioDiqEH13fRzc6zpudjDfeW/zZxzHtLnFIQnjdokxlZK/aPA1Bba4AIUVXl/XFvESK5S uqZxWOYNzczVTko0Pu0yojWf0NHWAF0SO/fPV4DEfjda3pkal/ErDrEdWVfvTciHHz+X SpzyYeWnMh/ovynNbPD3OCzD8MSrFV1X9nf2Amy5sXt4QDCoeWsJQInhrs+F0FWfy29f 7dJ3XVagdRzW8JwEwwi2K68dkfEwB79gv0M9OsrbYo68xb3GzDlRFkUNzsaARArFKU/k pBfw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=zytNYzjk; 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 g4si148840oib.152.2020.02.10.05.08.05; Mon, 10 Feb 2020 05:08:16 -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=zytNYzjk; 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 S1730786AbgBJNGj (ORCPT + 99 others); Mon, 10 Feb 2020 08:06:39 -0500 Received: from mail.kernel.org ([198.145.29.99]:38594 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729548AbgBJMjx (ORCPT ); Mon, 10 Feb 2020 07:39:53 -0500 Received: from localhost (unknown [209.37.97.194]) (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 98DBE24650; Mon, 10 Feb 2020 12:39:52 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1581338392; bh=gxm2KvSy24vJVM6qJ96MO74XGzXAu3rlYDpEdI9euoo=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=zytNYzjkgLPrtcQkxT0RGmke9YHzgf5pL3TZOITqCQssu91zFycKX2k4YolmA97z/ rOkmfBxRaoGGRzBRYow6vFf0wSEsV/k0mazbyi9Q4uLVyPhZFKpLi69TG3gvQFqknC d3lc4k0YwHJua6V/iO5DhT33EvmP7gSFEIuSeOkU= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Sukadev Bhattiprolu , Andrew Donnellan , Michael Ellerman Subject: [PATCH 5.5 085/367] powerpc/xmon: dont access ASDR in VMs Date: Mon, 10 Feb 2020 04:29:58 -0800 Message-Id: <20200210122432.199926067@linuxfoundation.org> X-Mailer: git-send-email 2.25.0 In-Reply-To: <20200210122423.695146547@linuxfoundation.org> References: <20200210122423.695146547@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: Sukadev Bhattiprolu commit c2a20711fc181e7f22ee5c16c28cb9578af84729 upstream. ASDR is HV-privileged and must only be accessed in HV-mode. Fixes a Program Check (0x700) when xmon in a VM dumps SPRs. Fixes: d1e1b351f50f ("powerpc/xmon: Add ISA v3.0 SPRs to SPR dump") Cc: stable@vger.kernel.org # v4.14+ Signed-off-by: Sukadev Bhattiprolu Reviewed-by: Andrew Donnellan Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20200107021633.GB29843@us.ibm.com Signed-off-by: Greg Kroah-Hartman --- arch/powerpc/xmon/xmon.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) --- a/arch/powerpc/xmon/xmon.c +++ b/arch/powerpc/xmon/xmon.c @@ -1949,15 +1949,14 @@ static void dump_300_sprs(void) printf("pidr = %.16lx tidr = %.16lx\n", mfspr(SPRN_PID), mfspr(SPRN_TIDR)); - printf("asdr = %.16lx psscr = %.16lx\n", - mfspr(SPRN_ASDR), hv ? mfspr(SPRN_PSSCR) - : mfspr(SPRN_PSSCR_PR)); + printf("psscr = %.16lx\n", + hv ? mfspr(SPRN_PSSCR) : mfspr(SPRN_PSSCR_PR)); if (!hv) return; - printf("ptcr = %.16lx\n", - mfspr(SPRN_PTCR)); + printf("ptcr = %.16lx asdr = %.16lx\n", + mfspr(SPRN_PTCR), mfspr(SPRN_ASDR)); #endif }