Received: by 2002:ab2:6d45:0:b0:1fb:d597:ff75 with SMTP id d5csp298988lqr; Wed, 5 Jun 2024 06:34:46 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCX5zYuD4lRubLlqJkhFhkLcYUHP2apmeIAZahVTq8DEJ6HZQ5Q8Dptobj0q/SS7VyXAdFkQJksFZj8x1uSPxLchmDuopsbxciUhL3W67Q== X-Google-Smtp-Source: AGHT+IFMJb0Z0pI1LLEjXA0mv/bXmiyU4zSJqHRtpLXjiQ19d+1U7sKpXh5cLPT06T3OEQf6evUH X-Received: by 2002:a05:6122:1899:b0:4eb:50b:a0d1 with SMTP id 71dfb90a1353d-4eb3a3fa2femr2141818e0c.4.1717594486652; Wed, 05 Jun 2024 06:34:46 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1717594486; cv=pass; d=google.com; s=arc-20160816; b=ieiCJSweMxShL3NwGVm9k3TU+Ar/01P4u0Ku6ZPEatociUh/bl9h5IC6ckjWeLYSik NV8r5DaohFA3DnmUadKFnGqWWx5vrA+oE+Gsn9lrWh49M/bYzg1i+RRGphtIJW1HQi8+ VrMu199mJ+8TmkyPxyusKS3Z96bclBhEmnyRBm0wrrzBFEmreuLx6GE6GHTZHjxnLhUy sw9g3M4TkE9q7t/+AtG19XQm2r4cV/PD8KPA7BKdJ9BklcpgS/BOVnuoAo1arevv0fh0 Pm8SUAXJP7KOlbs0AEXASIqJMBDgqF+FLQYHuHnk0LzLWfzNtiSD+UMAzo+9zJTepQjF BS5A== 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=DYMydX1MDsr1PnGUw6zthq+jW7Kije2e4+zBWQtrqgje7oj9MbKQcGjlV34MKGKGqt /dLrIHgcfAQg1VubxBdoPphPgvOOS75znGyz8kBiG9gD0NS15roErTuYu/n25C8vOMcj i9zmwv3oE/hAjURh/jzu+SlpsHIwvJmrFqEb897ERXCT2m5OSIH03NfdnAnBY1wyx9e1 uPT/iB/9orrTTXwg6tq+hdEW9N0ZmsxfzATqkuOSRPRPCCRb4XwFdQ/Hcv4zdHX12JSt rfAQkF9/xqEbzfb902YnMzp3kfwvgTSCyif/PJwULNhjpOxq7oynNVch9NiQfu/gIM+D 5zTA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@ibm.com header.s=pp1 header.b=pjCUvnoe; 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-202669-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-202669-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=REJECT sp=NONE dis=NONE) header.from=ibm.com Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [2604:1380:45d1:ec00::1]) by mx.google.com with ESMTPS id 71dfb90a1353d-4eafee38e61si2337769e0c.147.2024.06.05.06.34.46 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 05 Jun 2024 06:34:46 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-202669-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) client-ip=2604:1380:45d1:ec00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@ibm.com header.s=pp1 header.b=pjCUvnoe; 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-202669-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-202669-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 ny.mirrors.kernel.org (Postfix) with ESMTPS id D3B1E1C2521F for ; Wed, 5 Jun 2024 13:33:33 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 77200196DBF; Wed, 5 Jun 2024 13:06:41 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=ibm.com header.i=@ibm.com header.b="pjCUvnoe" 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 EAB0E13AD29; Wed, 5 Jun 2024 13:06:38 +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=1717592800; cv=none; b=IsmZE8qP7beDesIaG/2GqyFLql1BI2WdCAo5KKCumTjk8QVCoj/xmXeWg7heTiW6drLPYCL0lGEbWQ+3QcIj5ZncKJH/aMfxd1Lc3FsNx2VUUgwle4JvE3reWkTNHp4kIe1578eRbjY/+FvtGqiBXtuV7TgJ7Q2Vio/e2I7JNqg= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717592800; c=relaxed/simple; bh=bFODH12hHt4ra0Lgx2QerhZko1YMpQke631INN2+Xis=; h=Subject:From:To:Cc:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=N9KF0cOrSN8czWr2yaTR6D3xENAVoPoaQZfGXXPm4SA4uIZI7rBs/huL/HKf6QShzLdxvCK8IZ/RZbhx0BCjYXubKt9ENtrCBSa7YJmbtU3UZ8BHiHAU4aHkOibtuy27v8+59bPn4/dj+4IhuUgqFwPNA4QwhxaRpcnMB4zoB68= 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=pjCUvnoe; 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 (m0353722.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 455BwRkO013318; Wed, 5 Jun 2024 13:06:26 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=pjCUvnoeKkFeuZIukHmQc8sDQYQtVVQjhAbl5BCOJ/T7GTK4HnGm8GDE5crGg+Lem6Ey JlzUAOIw0x+wvh9SrDo6MMcEb454iBgeQ0x5qFJnc3IT0+sgzvD8jEVve4RFTytjBQFL pZ64cjK7KykZDsXqi3avd7hwftSLBwnj5Dm00VpJQYybmOrNECc5Gv4kT3b740axt7u7 gGO3AJv3SFLRgaikwj7rs+nqHgb+83JBhjYGChXc6JWCS1g+7Du2M5uhxXMsi3PwAq1o OUqNbOqT8edfd82ZCJWaiFjpyyVDvTTORaV3AFJ8hZ82+72ubyr3slPzUlU+43MUpngf Bw== Received: from pps.reinject (localhost [127.0.0.1]) by mx0a-001b2d01.pphosted.com (PPS) with ESMTPS id 3yjqksg5wy-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 05 Jun 2024 13:06:25 +0000 Received: from m0353722.ppops.net (m0353722.ppops.net [127.0.0.1]) by pps.reinject (8.17.1.5/8.17.1.5) with ESMTP id 455D6Pwe020642; Wed, 5 Jun 2024 13:06:25 GMT Received: from ppma22.wdc07v.mail.ibm.com (5c.69.3da9.ip4.static.sl-reverse.com [169.61.105.92]) by mx0a-001b2d01.pphosted.com (PPS) with ESMTPS id 3yjqksg5wu-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 05 Jun 2024 13:06:25 +0000 Received: from pps.filterd (ppma22.wdc07v.mail.ibm.com [127.0.0.1]) by ppma22.wdc07v.mail.ibm.com (8.17.1.19/8.17.1.19) with ESMTP id 455CuXSF008483; Wed, 5 Jun 2024 13:06:24 GMT Received: from smtprelay07.fra02v.mail.ibm.com ([9.218.2.229]) by ppma22.wdc07v.mail.ibm.com (PPS) with ESMTPS id 3ygec0ve4h-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 05 Jun 2024 13:06:24 +0000 Received: from smtpav03.fra02v.mail.ibm.com (smtpav03.fra02v.mail.ibm.com [10.20.54.102]) by smtprelay07.fra02v.mail.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 455D6Ie543123166 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Wed, 5 Jun 2024 13:06:20 GMT Received: from smtpav03.fra02v.mail.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id CC48F20043; Wed, 5 Jun 2024 13:06:18 +0000 (GMT) Received: from smtpav03.fra02v.mail.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id D522E20040; Wed, 5 Jun 2024 13:06:16 +0000 (GMT) Received: from [172.17.0.2] (unknown [9.3.101.175]) by smtpav03.fra02v.mail.ibm.com (Postfix) with ESMTP; Wed, 5 Jun 2024 13:06:16 +0000 (GMT) Subject: [PATCH v2 1/8] 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: Wed, 05 Jun 2024 13:06:16 +0000 Message-ID: <171759276847.1480.16387950124201117847.stgit@linux.ibm.com> In-Reply-To: <171759276071.1480.9356137231993600304.stgit@linux.ibm.com> References: <171759276071.1480.9356137231993600304.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-GUID: _uroXx4SWxJkaUHZX35i31gmaoA9GpPf X-Proofpoint-ORIG-GUID: NDXqzQ_AWnsL6Z9fVkZnBgbEm4yKKCZK X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1039,Hydra:6.0.680,FMLib:17.12.28.16 definitions=2024-06-05_02,2024-06-05_02,2024-05-17_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 malwarescore=0 clxscore=1015 suspectscore=0 phishscore=0 priorityscore=1501 lowpriorityscore=0 impostorscore=0 mlxlogscore=637 spamscore=0 adultscore=0 bulkscore=0 mlxscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2405010000 definitions=main-2406050099 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;