hw/riscv: sifive_e: Don't call qdev_get_machine in soc init
Calling qdev_get_machine() in the soc_init function would result in the following assert ../hw/core/qdev.c:858: qdev_get_machine: Assertion `dev' failed. when trying to run ./qemu-system-riscv64 -S -display none -M virt -device riscv.sifive.e.soc,help as the machine wasn't created yet. We call qdev_get_machine() to obtain the number of CPUs in the machine. So instead of setting the CPU num-harts in the init function let's set it in realise where the machine will exist. Signed-off-by: Alistair Francis <alistair.francis@wdc.com> Tested-by: Markus Armbruster <armbru@redhat.com> Message-ID: <20260312043158.4191378-2-alistair.francis@wdc.com> [thuth: Fix a complaint from checkpatch.pl with regards to multi-line comment] Signed-off-by: Thomas Huth <thuth@redhat.com>