On 2024/5/6 下午2:09, maobibo wrote:
On 2024/5/6 下午12:24, Thomas Huth wrote:
On 06/05/2024 05.02, Bibo Mao wrote:
On LoongArch system, there is only virt machine type now, name
LOONGARCH_MACHINE is confused, rename it with VIRT_MACHINE. Machine name
about Other real hw boards can be added in future.
Signed-off-by: Bibo Mao <maob...@loongson.cn>
---
...
@@ -1245,7 +1244,7 @@ static void loongarch_class_init(ObjectClass
*oc, void *data)
static const TypeInfo loongarch_machine_types[] = {
{
- .name = TYPE_LOONGARCH_MACHINE,
+ .name = TYPE_VIRT_MACHINE,
.parent = TYPE_MACHINE,
.instance_size = sizeof(LoongArchMachineState),
.class_init = loongarch_class_init,
diff --git a/include/hw/loongarch/virt.h b/include/hw/loongarch/virt.h
index 4e14bf6060..5ea2f0370d 100644
--- a/include/hw/loongarch/virt.h
+++ b/include/hw/loongarch/virt.h
@@ -73,8 +73,8 @@ struct LoongArchMachineState {
struct loongarch_boot_info bootinfo;
};
-#define TYPE_LOONGARCH_MACHINE MACHINE_TYPE_NAME("virt")
-OBJECT_DECLARE_SIMPLE_TYPE(LoongArchMachineState, LOONGARCH_MACHINE)
+#define TYPE_VIRT_MACHINE MACHINE_TYPE_NAME("virt")
+OBJECT_DECLARE_SIMPLE_TYPE(LoongArchMachineState, VIRT_MACHINE)
bool loongarch_is_acpi_enabled(LoongArchMachineState *lams);
void loongarch_acpi_setup(LoongArchMachineState *lams);
#endif
Hi,
there are currently some efforts going on to create the possibility to
link a QEMU binary that contains all targets in one binary. Since we
already have a TYPE_VIRT_MACHINE for other targets, I wonder whether
it might be better to use LOONGARCH_VIRT_MACHINE than just
VIRT_MACHINE here? Philippe, could you comment on this?
It is great if there is one QEMU binary which supports different
targets. And LOONGARCH_VIRT_MACHINE is ok for me.
Hi Thomas, Philippe,
Does machine name "virt" need be changed if LOONGARCH_VIRT_MACHINE is
used? There will be compatible issues if "virt" machine type is not
suggested to use.
However CPU type "max" is not widely used now, can we get different
architectures from CPU type rather than machine type for one QEMU binary
which supports different targets?
Regards
Bibo Mao
Regards
Bibo Mao
Thomas