Commit ebc65874 authored by Hollis Blanchard's avatar Hollis Blanchard Committed by Avi Kivity

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: default avatarHollis Blanchard <hollis_blanchard@mentor.com>
Signed-off-by: default avatarAlexander Graf <agraf@suse.de>
parent 0b3bafc8
...@@ -43,7 +43,7 @@ int kvmppc_core_check_processor_compat(void) ...@@ -43,7 +43,7 @@ int kvmppc_core_check_processor_compat(void)
{ {
int r; int r;
if (strcmp(cur_cpu_spec->platform, "ppc440") == 0) if (strncmp(cur_cpu_spec->platform, "ppc440", 6) == 0)
r = 0; r = 0;
else else
r = -ENOTSUPP; r = -ENOTSUPP;
...@@ -72,6 +72,7 @@ int kvmppc_core_vcpu_setup(struct kvm_vcpu *vcpu) ...@@ -72,6 +72,7 @@ int kvmppc_core_vcpu_setup(struct kvm_vcpu *vcpu)
/* Since the guest can directly access the timebase, it must know the /* Since the guest can directly access the timebase, it must know the
* real timebase frequency. Accordingly, it must see the state of * real timebase frequency. Accordingly, it must see the state of
* CCR1[TCS]. */ * CCR1[TCS]. */
/* XXX CCR1 doesn't exist on all 440 SoCs. */
vcpu->arch.ccr1 = mfspr(SPRN_CCR1); vcpu->arch.ccr1 = mfspr(SPRN_CCR1);
for (i = 0; i < ARRAY_SIZE(vcpu_44x->shadow_refs); i++) for (i = 0; i < ARRAY_SIZE(vcpu_44x->shadow_refs); i++)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment