Skip to content

Commit

Permalink
ppc: simplify max_smt initialization in ppc_cpu_realizefn()
Browse files Browse the repository at this point in the history
kvmppc_smt_threads() returns 1 if KVM is not enabled.

Signed-off-by: Greg Kurz <groug@kaod.org>
Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
  • Loading branch information
gkurz authored and dgibson committed Jul 5, 2016
1 parent 7093645 commit c4e6c42
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion target-ppc/translate_init.c
Expand Up @@ -9516,7 +9516,7 @@ static void ppc_cpu_realizefn(DeviceState *dev, Error **errp)
PowerPCCPUClass *pcc = POWERPC_CPU_GET_CLASS(cpu);
Error *local_err = NULL;
#if !defined(CONFIG_USER_ONLY)
int max_smt = kvm_enabled() ? kvmppc_smt_threads() : 1;
int max_smt = kvmppc_smt_threads();
#endif

#if !defined(CONFIG_USER_ONLY)
Expand Down

0 comments on commit c4e6c42

Please sign in to comment.