From: Alexander Graf Subject: [PATCH 21/21] KVM: PPC: Disable MSR_FEx for Cell hosts Date: Wed, 24 Mar 2010 21:48:37 +0100 Message-ID: <1269463717-18305-22-git-send-email-agraf@suse.de> References: <1269463717-18305-1-git-send-email-agraf@suse.de> Cc: kvm-u79uwXL29TY76Z2rM5mHXA@public.gmane.org To: kvm-ppc-u79uwXL29TY76Z2rM5mHXA@public.gmane.org Return-path: In-Reply-To: <1269463717-18305-1-git-send-email-agraf-l3A5Bk7waGM@public.gmane.org> Sender: kvm-ppc-owner-u79uwXL29TY76Z2rM5mHXA@public.gmane.org List-Id: kvm.vger.kernel.org Cell can't handle MSR_FE0 and MSR_FE1 too well. It gets dog slow. So let's just override the guest whenever we see one of the two and mask them out. See commit ddf5f75a16b3e7460ffee881795aa168dffcd0cf for reference. Signed-off-by: Alexander Graf --- arch/powerpc/kvm/book3s.c | 4 ++++ 1 files changed, 4 insertions(+), 0 deletions(-) diff --git a/arch/powerpc/kvm/book3s.c b/arch/powerpc/kvm/book3s.c index 1a12ef2..a7ab2ea 100644 --- a/arch/powerpc/kvm/book3s.c +++ b/arch/powerpc/kvm/book3s.c @@ -356,6 +356,10 @@ void kvmppc_set_pvr(struct kvm_vcpu *vcpu, u32 pvr) !strcmp(cur_cpu_spec->platform, "ppc970")) vcpu->arch.hflags |= BOOK3S_HFLAG_DCBZ32; + /* Cell performs badly if MSR_FEx are set. So let's hope nobody + really needs them in a VM on Cell and force disable them. */ + if (!strcmp(cur_cpu_spec->platform, "ppc-cell-be")) + to_book3s(vcpu)->msr_mask &= ~(MSR_FE0 | MSR_FE1); } /* Book3s_32 CPUs always have 32 bytes cache line size, which Linux assumes. To -- 1.6.0.2