Revision de06f8d1
b/vl.c | ||
---|---|---|
2945 | 2945 |
} |
2946 | 2946 |
} |
2947 | 2947 |
|
2948 |
static void set_cpu_log(const char *optarg) |
|
2949 |
{ |
|
2950 |
int mask; |
|
2951 |
const CPULogItem *item; |
|
2952 |
|
|
2953 |
mask = cpu_str_to_log_mask(optarg); |
|
2954 |
if (!mask) { |
|
2955 |
printf("Log items (comma separated):\n"); |
|
2956 |
for (item = cpu_log_items; item->mask != 0; item++) { |
|
2957 |
printf("%-10s %s\n", item->name, item->help); |
|
2958 |
} |
|
2959 |
exit(1); |
|
2960 |
} |
|
2961 |
cpu_set_log(mask); |
|
2962 |
} |
|
2963 |
|
|
2948 | 2964 |
static int vm_can_run(void) |
2949 | 2965 |
{ |
2950 | 2966 |
if (powerdown_requested) |
... | ... | |
3308 | 3324 |
return 0; |
3309 | 3325 |
} |
3310 | 3326 |
|
3327 |
#ifdef TARGET_I386 |
|
3328 |
static void do_acpitable_option(const char *optarg) |
|
3329 |
{ |
|
3330 |
if (acpi_table_add(optarg) < 0) { |
|
3331 |
fprintf(stderr, "Wrong acpi table provided\n"); |
|
3332 |
exit(1); |
|
3333 |
} |
|
3334 |
} |
|
3335 |
#endif |
|
3336 |
|
|
3337 |
#ifdef TARGET_I386 |
|
3338 |
static void do_smbios_option(const char *optarg) |
|
3339 |
{ |
|
3340 |
if (smbios_entry_add(optarg) < 0) { |
|
3341 |
fprintf(stderr, "Wrong smbios provided\n"); |
|
3342 |
exit(1); |
|
3343 |
} |
|
3344 |
} |
|
3345 |
#endif |
|
3346 |
|
|
3347 |
static void cpudef_init(void) |
|
3348 |
{ |
|
3349 |
#if defined(cpudef_setup) |
|
3350 |
cpudef_setup(); /* parse cpu definitions in target config file */ |
|
3351 |
#endif |
|
3352 |
} |
|
3353 |
|
|
3311 | 3354 |
#ifndef _WIN32 |
3312 | 3355 |
|
3313 | 3356 |
static void termsig_handler(int signal) |
... | ... | |
3856 | 3899 |
fclose(fp); |
3857 | 3900 |
} |
3858 | 3901 |
} |
3859 |
#if defined(cpudef_setup) |
|
3860 |
cpudef_setup(); /* parse cpu definitions in target config file */ |
|
3861 |
#endif |
|
3902 |
cpudef_init(); |
|
3862 | 3903 |
|
3863 | 3904 |
/* second pass of option parsing */ |
3864 | 3905 |
optind = 1; |
... | ... | |
4164 | 4205 |
break; |
4165 | 4206 |
#endif |
4166 | 4207 |
case QEMU_OPTION_d: |
4167 |
{ |
|
4168 |
int mask; |
|
4169 |
const CPULogItem *item; |
|
4170 |
|
|
4171 |
mask = cpu_str_to_log_mask(optarg); |
|
4172 |
if (!mask) { |
|
4173 |
printf("Log items (comma separated):\n"); |
|
4174 |
for(item = cpu_log_items; item->mask != 0; item++) { |
|
4175 |
printf("%-10s %s\n", item->name, item->help); |
|
4176 |
} |
|
4177 |
exit(1); |
|
4178 |
} |
|
4179 |
cpu_set_log(mask); |
|
4180 |
} |
|
4208 |
set_cpu_log(optarg); |
|
4181 | 4209 |
break; |
4182 | 4210 |
case QEMU_OPTION_s: |
4183 | 4211 |
gdbstub_dev = "tcp::" DEFAULT_GDBSTUB_PORT; |
... | ... | |
4345 | 4373 |
rtc_td_hack = 1; |
4346 | 4374 |
break; |
4347 | 4375 |
case QEMU_OPTION_acpitable: |
4348 |
if(acpi_table_add(optarg) < 0) { |
|
4349 |
fprintf(stderr, "Wrong acpi table provided\n"); |
|
4350 |
exit(1); |
|
4351 |
} |
|
4376 |
do_acpitable_option(optarg); |
|
4352 | 4377 |
break; |
4353 | 4378 |
case QEMU_OPTION_smbios: |
4354 |
if(smbios_entry_add(optarg) < 0) { |
|
4355 |
fprintf(stderr, "Wrong smbios provided\n"); |
|
4356 |
exit(1); |
|
4357 |
} |
|
4379 |
do_smbios_option(optarg); |
|
4358 | 4380 |
break; |
4359 | 4381 |
#endif |
4360 | 4382 |
#ifdef CONFIG_KVM |
Also available in: Unified diff