@@ -19,6 +19,7 @@ typedef struct QEMUMachine {
QEMUMachineInitFunc *init;
int use_scsi;
int max_cpus;
+ const char *def_cpu_model;
unsigned int no_serial:1,
no_parallel:1,
use_virtcon:1,
@@ -223,6 +223,11 @@ static QEMUMachine pc_machine_v0_12 = {
.desc = "Standard PC",
.init = pc_init_pci,
.max_cpus = 255,
+#ifdef TARGET_X86_64
+ .def_cpu_model = "qemu64",
+#else
+ .def_cpu_model = "qemu32",
+#endif
.compat_props = (GlobalProperty[]) {
{
.driver = "virtio-serial-pci",
@@ -242,6 +247,11 @@ static QEMUMachine pc_machine_v0_11 = {
.desc = "Standard PC, qemu 0.11",
.init = pc_init_pci,
.max_cpus = 255,
+#ifdef TARGET_X86_64
+ .def_cpu_model = "qemu64",
+#else
+ .def_cpu_model = "qemu32",
+#endif
.compat_props = (GlobalProperty[]) {
{
.driver = "virtio-blk-pci",
@@ -277,6 +287,11 @@ static QEMUMachine pc_machine_v0_10 = {
.desc = "Standard PC, qemu 0.10",
.init = pc_init_pci,
.max_cpus = 255,
+#ifdef TARGET_X86_64
+ .def_cpu_model = "qemu64",
+#else
+ .def_cpu_model = "qemu32",
+#endif
.compat_props = (GlobalProperty[]) {
{
.driver = "virtio-blk-pci",
@@ -2868,6 +2868,8 @@ int main(int argc, char **argv, char **envp)
}
qemu_add_globals();
+ if ((cpu_model == NULL) && (machine->def_cpu_model))
+ cpu_model = machine->def_cpu_model;
machine->init(ram_size, boot_devices,
kernel_filename, kernel_cmdline, initrd_filename, cpu_model);