Bharata B Rao writes:
> @@ -7987,6 +7989,12 @@ static void ppc_cpu_realizefn(DeviceState *dev, Error
> **errp)
> max_smt, kvm_enabled() ? "KVM" : "TCG");
> return;
> }
> +threads_shift = log2(smp_threads);
> +if (smp_threads != (1 << threads_shift)) {
> +
PowerPC kernel expects the number of SMT threads in a core to be a power
of 2. Since QEMU doesn't enforce this, it leads to an early guest kernel
crash if invalid threads count is specified.
Prevent this crash and make it a graceful exit from QEMU itself by
validating the user supplied threads cou