Revision a049de61 hw/pc.c

b/hw/pc.c
676 676
                     DisplayState *ds, const char **fd_filename, int snapshot,
677 677
                     const char *kernel_filename, const char *kernel_cmdline,
678 678
                     const char *initrd_filename,
679
                     int pci_enabled)
679
                     int pci_enabled, const char *cpu_model)
680 680
{
681 681
    char buf[1024];
682 682
    int ret, linux_boot, i;
......
692 692
    linux_boot = (kernel_filename != NULL);
693 693

  
694 694
    /* init CPUs */
695
    if (cpu_model == NULL) {
696
#ifdef TARGET_X86_64
697
        cpu_model = "qemu64";
698
#else
699
        cpu_model = "qemu32";
700
#endif
701
    }
702
    
703
    if (x86_find_cpu_by_name(cpu_model)) {
704
        fprintf(stderr, "Unable to find x86 CPU definition\n");
705
        exit(1);
706
    }
695 707
    for(i = 0; i < smp_cpus; i++) {
696 708
        env = cpu_init();
697 709
        if (i != 0)
......
960 972
    pc_init1(ram_size, vga_ram_size, boot_device,
961 973
             ds, fd_filename, snapshot,
962 974
             kernel_filename, kernel_cmdline,
963
             initrd_filename, 1);
975
             initrd_filename, 1, cpu_model);
964 976
}
965 977

  
966 978
static void pc_init_isa(int ram_size, int vga_ram_size, const char *boot_device,
......
974 986
    pc_init1(ram_size, vga_ram_size, boot_device,
975 987
             ds, fd_filename, snapshot,
976 988
             kernel_filename, kernel_cmdline,
977
             initrd_filename, 0);
989
             initrd_filename, 0, cpu_model);
978 990
}
979 991

  
980 992
QEMUMachine pc_machine = {

Also available in: Unified diff