Received: by 2002:ab2:7903:0:b0:1fb:b500:807b with SMTP id a3csp893184lqj; Mon, 3 Jun 2024 04:22:31 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCWcZRvbohwhs4pt9cEIFumF2LBCGcuaf0iBHWZ0nwwYpzgM7ODLqgHyZ4dxqOdV2RJ76lyPLCfFuAXo/i35Cy2vmfHBW8kEbhyQXD+llg== X-Google-Smtp-Source: AGHT+IEOd40Gh0G7ZhIhQbNCFcyXRb5tRVYibHjobOz8DQSHys+V2B5d4f6cY7mt7T4UCOgkLm6Y X-Received: by 2002:a05:6e02:12e2:b0:374:7fb7:7e32 with SMTP id e9e14a558f8ab-3748b8f234amr102752965ab.0.1717413751581; Mon, 03 Jun 2024 04:22:31 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1717413751; cv=pass; d=google.com; s=arc-20160816; b=yQIdUd6J8AMeJnLudYBNOB7iJ2Ef+youCA3QYoVGOyiXKmunjFL/SpaaoiaXzS4laM VTMs6jbghikrnncXNgcvlzwNq9gcT2DZJcwkoyWVLLCB5uYafotYNfkgumlbFyCyb+xG Hyq2HMOMHTXSUDzqTrNl74/EQcGKeV/OrYdvFKRw4F3ooNS6+K3J7nlYJt6mXwslRvE2 aDrw9crkrbr7bZ7r2jOm6IYV6KI31hCUrPC3uiPUzF+UqM7JBF7wfOBdyB32J+mNpdne 6nSoQXqaA5Up8CP/+JOIG40c0WBk0NTFtvnyRDRq066WZ1JnFloceNGeQc0HPZiPcbt4 +k/Q== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:user-agent:references:in-reply-to :message-id:date:cc:to:from:subject:dkim-signature; bh=vdD2kV2ciIb0bdEkPikaucEiFf7CKhySLdmRLgn4sA4=; fh=3wLRez1daRxQ046IropRUujjxbZxHcqKX5Vmx4WeL2Q=; b=FFhjHG7w5zEECQW9qmc8VzbYSSzlz3k7xWGDw0KCBuQu+g0FtMcS64+31abM6S4kwC DF5CdhBMbyju6Tcc6nZm6761qXpLtZ+mVsbEyhEbfBO+J8cIAGQnO0TVeSGCCQzdDrig i9O1QMshduj2GNliHSwIKT6LpWWGc/DVkm6s9wD3R0CD4NsHxe1/GiXlHndv0lgnq9+u 3Jf3ewNu5PV1OCa29IcGJQ5NQSX0pDUkPBpzYXzzSc9lZg/W8gcqGc029NcyhHPn+Jzc qCmfLmJ9vAcS4rmeAjB9jKZNJTClSZkU4r7w05W02S1P4rV2qr2RAU7lSwhgYgIqEZMC OX5A==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@ibm.com header.s=pp1 header.b=ERN+6KXx; arc=pass (i=1 spf=pass spfdomain=linux.ibm.com dkim=pass dkdomain=ibm.com dmarc=pass fromdomain=linux.ibm.com); spf=pass (google.com: domain of linux-kernel+bounces-199023-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-199023-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=REJECT sp=NONE dis=NONE) header.from=ibm.com Return-Path: Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [147.75.48.161]) by mx.google.com with ESMTPS id 41be03b00d2f7-6c359e098f7si6490710a12.337.2024.06.03.04.22.31 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 03 Jun 2024 04:22:31 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-199023-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) client-ip=147.75.48.161; Authentication-Results: mx.google.com; dkim=pass header.i=@ibm.com header.s=pp1 header.b=ERN+6KXx; arc=pass (i=1 spf=pass spfdomain=linux.ibm.com dkim=pass dkdomain=ibm.com dmarc=pass fromdomain=linux.ibm.com); spf=pass (google.com: domain of linux-kernel+bounces-199023-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-199023-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=REJECT sp=NONE dis=NONE) header.from=ibm.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sy.mirrors.kernel.org (Postfix) with ESMTPS id C32CFB238DB for ; Mon, 3 Jun 2024 11:14:54 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 01C2784D35; Mon, 3 Jun 2024 11:14:32 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=ibm.com header.i=@ibm.com header.b="ERN+6KXx" Received: from mx0b-001b2d01.pphosted.com (mx0b-001b2d01.pphosted.com [148.163.158.5]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 9FEA977109; Mon, 3 Jun 2024 11:14:29 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=148.163.158.5 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717413271; cv=none; b=iznJ9l8DHiCJYN9wEEbPU5SPHc6F3AMGnUA1bIBimtQ72qLGPGSktE0H2qchcWEoEomV69LRmG2MIXqos3v5AFiFHwHtFrdA9VYM9itHSb7PkDDCsjmJaMOeiDxed8MVffU6QWoiHTW/80gzGsJmVLWE4wX06oZd1fO7tknLcr4= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717413271; c=relaxed/simple; bh=bFODH12hHt4ra0Lgx2QerhZko1YMpQke631INN2+Xis=; h=Subject:From:To:Cc:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=VyzQuzP9VTTLcFqkIKdsJE/vRT1A3283JN9R0DxCIyxvt8NIdD3QO1tmXkivZpQWTiPNnQszt21uVv+P3oDenmrUk6uJQ7hfLsQRr0/7MfyEkAN17nllivInV7TZzjKJCtcyXAEeVksitNPEnr/cak7cCSR2mktf4DxLVXkJNvw= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.ibm.com; spf=pass smtp.mailfrom=linux.ibm.com; dkim=pass (2048-bit key) header.d=ibm.com header.i=@ibm.com header.b=ERN+6KXx; arc=none smtp.client-ip=148.163.158.5 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.ibm.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linux.ibm.com Received: from pps.filterd (m0353723.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 4539QC8O022252; Mon, 3 Jun 2024 11:14:18 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ibm.com; h=cc : content-transfer-encoding : content-type : date : from : in-reply-to : message-id : mime-version : references : subject : to; s=pp1; bh=vdD2kV2ciIb0bdEkPikaucEiFf7CKhySLdmRLgn4sA4=; b=ERN+6KXxsHFHByZhqpDv+3y4t6i6vu9CrVI5wBeeIhNmXXeZWnyA4PC58AcIwCIYU9nk QP3Hna3A/W/9hji0teuR/yrWW3OdzFT2AKqdk5xl2Foqc1iUHmwpX8E3iSAbOk4Deae8 /cMp9sTc7HfBlsE+bArJ+rDMKbdYHJpjiuiVCSx6MYsJ33E8iBWcmFWXCIQY8eTUpt93 Eq5kG3O2zpwnqoEz98KihdN5PJiwkoQQ9o52+rr4G+++0RjmDXtLgviKoVDcB39/pThU 3UW08tp/cPL8EqgHMNVoaoGD4L1wFOt1GTxYznI17N/Hd/mfL0xFx21AijFZlKDyfXgt gw== Received: from pps.reinject (localhost [127.0.0.1]) by mx0a-001b2d01.pphosted.com (PPS) with ESMTPS id 3yh9w8gff0-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Mon, 03 Jun 2024 11:14:17 +0000 Received: from m0353723.ppops.net (m0353723.ppops.net [127.0.0.1]) by pps.reinject (8.17.1.5/8.17.1.5) with ESMTP id 453BEHBO029255; Mon, 3 Jun 2024 11:14:17 GMT Received: from ppma11.dal12v.mail.ibm.com (db.9e.1632.ip4.static.sl-reverse.com [50.22.158.219]) by mx0a-001b2d01.pphosted.com (PPS) with ESMTPS id 3yh9w8gfev-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Mon, 03 Jun 2024 11:14:17 +0000 Received: from pps.filterd (ppma11.dal12v.mail.ibm.com [127.0.0.1]) by ppma11.dal12v.mail.ibm.com (8.17.1.19/8.17.1.19) with ESMTP id 4537twnJ026550; Mon, 3 Jun 2024 11:14:16 GMT Received: from smtprelay06.fra02v.mail.ibm.com ([9.218.2.230]) by ppma11.dal12v.mail.ibm.com (PPS) with ESMTPS id 3yggp2q0fc-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Mon, 03 Jun 2024 11:14:16 +0000 Received: from smtpav05.fra02v.mail.ibm.com (smtpav05.fra02v.mail.ibm.com [10.20.54.104]) by smtprelay06.fra02v.mail.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 453BEAVV20906474 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Mon, 3 Jun 2024 11:14:13 GMT Received: from smtpav05.fra02v.mail.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id DF9562004E; Mon, 3 Jun 2024 11:14:10 +0000 (GMT) Received: from smtpav05.fra02v.mail.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id D906A2004B; Mon, 3 Jun 2024 11:14:08 +0000 (GMT) Received: from [172.17.0.2] (unknown [9.3.101.175]) by smtpav05.fra02v.mail.ibm.com (Postfix) with ESMTP; Mon, 3 Jun 2024 11:14:08 +0000 (GMT) Subject: [PATCH 1/6] KVM: PPC: Book3S HV: Fix the set_one_reg for MMCR3 From: Shivaprasad G Bhat To: kvm@vger.kernel.org, linux-doc@vger.kernel.org, linuxppc-dev@lists.ozlabs.org Cc: pbonzini@redhat.com, naveen.n.rao@linux.ibm.com, christophe.leroy@csgroup.eu, corbet@lwn.net, mpe@ellerman.id.au, namhyung@kernel.org, npiggin@gmail.com, pbonzini@redhat.com, sbhat@linux.ibm.com, jniethe5@gmail.com, atrajeev@linux.vnet.ibm.com, linux-kernel@vger.kernel.org Date: Mon, 03 Jun 2024 11:14:08 +0000 Message-ID: <171741324316.6631.12096363054516478201.stgit@linux.ibm.com> In-Reply-To: <171741323521.6631.11242552089199677395.stgit@linux.ibm.com> References: <171741323521.6631.11242552089199677395.stgit@linux.ibm.com> User-Agent: StGit/1.5 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit X-TM-AS-GCONF: 00 X-Proofpoint-ORIG-GUID: I1Iy_x7ZUjLQN5WvK5f79UIhS0FAfUTH X-Proofpoint-GUID: U7vnU9bxyMciEwx4D-NZ-RkJCOgzNa9u X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1039,Hydra:6.0.650,FMLib:17.12.28.16 definitions=2024-06-03_07,2024-05-30_01,2024-05-17_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 priorityscore=1501 impostorscore=0 mlxlogscore=637 phishscore=0 adultscore=0 clxscore=1015 spamscore=0 suspectscore=0 lowpriorityscore=0 mlxscore=0 bulkscore=0 malwarescore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2405010000 definitions=main-2406030094 The kvmppc_set_one_reg_hv() wrongly get() the value instead of set() for MMCR3. Fix the same. Fixes: 5752fe0b811b ("KVM: PPC: Book3S HV: Save/restore new PMU registers") Signed-off-by: Shivaprasad G Bhat Reviewed-by: Nicholas Piggin --- arch/powerpc/kvm/book3s_hv.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/powerpc/kvm/book3s_hv.c b/arch/powerpc/kvm/book3s_hv.c index daaf7faf21a5..a4f34f94c86f 100644 --- a/arch/powerpc/kvm/book3s_hv.c +++ b/arch/powerpc/kvm/book3s_hv.c @@ -2540,7 +2540,7 @@ static int kvmppc_set_one_reg_hv(struct kvm_vcpu *vcpu, u64 id, vcpu->arch.mmcrs = set_reg_val(id, *val); break; case KVM_REG_PPC_MMCR3: - *val = get_reg_val(id, vcpu->arch.mmcr[3]); + kvmppc_set_mmcr_hv(vcpu, 3, set_reg_val(id, *val)); break; case KVM_REG_PPC_PMC1 ... KVM_REG_PPC_PMC8: i = id - KVM_REG_PPC_PMC1;