Skip to content

Commit 05b0ab1

Browse files
agrafavikivity
authored andcommitted
KVM: PPC: Disable MSR_FEx for Cell hosts
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 ddf5f75 for reference. Signed-off-by: Alexander Graf <[email protected]> Signed-off-by: Avi Kivity <[email protected]>
1 parent 3ed9c6d commit 05b0ab1

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

arch/powerpc/kvm/book3s.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -357,6 +357,10 @@ void kvmppc_set_pvr(struct kvm_vcpu *vcpu, u32 pvr)
357357
!strcmp(cur_cpu_spec->platform, "ppc970"))
358358
vcpu->arch.hflags |= BOOK3S_HFLAG_DCBZ32;
359359

360+
/* Cell performs badly if MSR_FEx are set. So let's hope nobody
361+
really needs them in a VM on Cell and force disable them. */
362+
if (!strcmp(cur_cpu_spec->platform, "ppc-cell-be"))
363+
to_book3s(vcpu)->msr_mask &= ~(MSR_FE0 | MSR_FE1);
360364
}
361365

362366
/* Book3s_32 CPUs always have 32 bytes cache line size, which Linux assumes. To

0 commit comments

Comments
 (0)