Skip to content

Commit ebc6587

Browse files
Hollis Blanchardavikivity
authored andcommitted
KVM: PPC: allow ppc440gp to pass the compatibility check
Match only the first part of cur_cpu_spec->platform. 440GP (the first 440 processor) is identified by the string "ppc440gp", while all later 440 processors use simply "ppc440". Signed-off-by: Hollis Blanchard <hollis_blanchard@mentor.com> Signed-off-by: Alexander Graf <agraf@suse.de>
1 parent 0b3bafc commit ebc6587

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

‎arch/powerpc/kvm/44x.c‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ int kvmppc_core_check_processor_compat(void)
4343
{
4444
int r;
4545

46-
if (strcmp(cur_cpu_spec->platform, "ppc440") == 0)
46+
if (strncmp(cur_cpu_spec->platform, "ppc440", 6) == 0)
4747
r = 0;
4848
else
4949
r = -ENOTSUPP;
@@ -72,6 +72,7 @@ int kvmppc_core_vcpu_setup(struct kvm_vcpu *vcpu)
7272
/* Since the guest can directly access the timebase, it must know the
7373
* real timebase frequency. Accordingly, it must see the state of
7474
* CCR1[TCS]. */
75+
/* XXX CCR1 doesn't exist on all 440 SoCs. */
7576
vcpu->arch.ccr1 = mfspr(SPRN_CCR1);
7677

7778
for (i = 0; i < ARRAY_SIZE(vcpu_44x->shadow_refs); i++)

0 commit comments

Comments
 (0)