Return-Path: Received: from mx2.suse.de ([195.135.220.15]:46375 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932309AbcJQHrw (ORCPT ); Mon, 17 Oct 2016 03:47:52 -0400 Received: from relay1.suse.de (charybdis-ext.suse.de [195.135.220.254]) by mx2.suse.de (Postfix) with ESMTP id BB081ACA4 for ; Mon, 17 Oct 2016 07:47:50 +0000 (UTC) From: Jiri Slaby To: stable@vger.kernel.org Cc: Alexander Graf , Jiri Slaby Subject: [patch added to 3.12-stable] KVM: PPC: Book3S PR: Ignore PMU SPRs Date: Mon, 17 Oct 2016 09:47:41 +0200 Message-Id: <20161017074748.20426-2-jslaby@suse.cz> In-Reply-To: <20161017074748.20426-1-jslaby@suse.cz> References: <20161017074748.20426-1-jslaby@suse.cz> Sender: stable-owner@vger.kernel.org List-ID: From: Alexander Graf This patch has been added to the 3.12 stable tree. If you have any objections, please let us know. =============== commit f8f6eb0d189cf2724af5ebc8cad460c78fb1994e upstream. When we expose a POWER8 CPU into the guest, it will start accessing PMU SPRs that we don't emulate. Just ignore accesses to them. Signed-off-by: Alexander Graf Signed-off-by: Jiri Slaby --- arch/powerpc/kvm/book3s_emulate.c | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/arch/powerpc/kvm/book3s_emulate.c b/arch/powerpc/kvm/book3s_emulate.c index 360ce68c9809..57913b199919 100644 --- a/arch/powerpc/kvm/book3s_emulate.c +++ b/arch/powerpc/kvm/book3s_emulate.c @@ -459,6 +459,13 @@ int kvmppc_core_emulate_mtspr(struct kvm_vcpu *vcpu, int sprn, ulong spr_val) case SPRN_WPAR_GEKKO: case SPRN_MSSSR0: case SPRN_DABR: +#ifdef CONFIG_PPC_BOOK3S_64 + case SPRN_MMCRS: + case SPRN_MMCRA: + case SPRN_MMCR0: + case SPRN_MMCR1: + case SPRN_MMCR2: +#endif break; unprivileged: default: @@ -557,6 +564,13 @@ int kvmppc_core_emulate_mfspr(struct kvm_vcpu *vcpu, int sprn, ulong *spr_val) case SPRN_WPAR_GEKKO: case SPRN_MSSSR0: case SPRN_DABR: +#ifdef CONFIG_PPC_BOOK3S_64 + case SPRN_MMCRS: + case SPRN_MMCRA: + case SPRN_MMCR0: + case SPRN_MMCR1: + case SPRN_MMCR2: +#endif *spr_val = 0; break; default: -- 2.10.1