summaryrefslogtreecommitdiff
path: root/arch/powerpc
diff options
context:
space:
mode:
authorShivaprasad G Bhat <sbhat@linux.ibm.com>2024-06-05 13:06:16 +0000
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2024-08-03 08:53:56 +0200
commit74e308be5b4961344e5e220a8dbeb8dec06a6d08 (patch)
tree4ded1e14362a1fcd4de3cafe47aa3cf65a0ed596 /arch/powerpc
parentd115e1759d189506df4b6a7bf6fe93ac40e88d08 (diff)
downloadlinux-rpi-74e308be5b4961344e5e220a8dbeb8dec06a6d08.tar.gz
linux-rpi-74e308be5b4961344e5e220a8dbeb8dec06a6d08.tar.bz2
linux-rpi-74e308be5b4961344e5e220a8dbeb8dec06a6d08.zip
KVM: PPC: Book3S HV: Fix the set_one_reg for MMCR3
[ Upstream commit f9ca6a10be20479d526f27316cc32cfd1785ed39 ] 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 <sbhat@linux.ibm.com> Reviewed-by: Nicholas Piggin <npiggin@gmail.com> Signed-off-by: Michael Ellerman <mpe@ellerman.id.au> Link: https://msgid.link/171759276847.1480.16387950124201117847.stgit@linux.ibm.com Signed-off-by: Sasha Levin <sashal@kernel.org>
Diffstat (limited to 'arch/powerpc')
-rw-r--r--arch/powerpc/kvm/book3s_hv.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/powerpc/kvm/book3s_hv.c b/arch/powerpc/kvm/book3s_hv.c
index 0429488ba170..1e668e238a28 100644
--- a/arch/powerpc/kvm/book3s_hv.c
+++ b/arch/powerpc/kvm/book3s_hv.c
@@ -2484,7 +2484,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;