Commit d993e0260bf7a200df348a2fb0c5a6efa885987d

Authored by bellard
1 parent 49b470eb

-no-kqemu option


git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@1280 c046a42c-6fe2-441c-8c8c-71466251a162
Showing 2 changed files with 14 additions and 6 deletions
... ... @@ -2760,6 +2760,9 @@ void help(void)
2760 2760 "-hdachs c,h,s[,t] force hard disk 0 physical geometry and the optional BIOS\n"
2761 2761 " translation (t=none or lba) (usually qemu can guess them)\n"
2762 2762 "-L path set the directory for the BIOS and VGA BIOS\n"
  2763 +#ifdef USE_KQEMU
  2764 + "-no-kqemu disable KQEMU kernel module usage\n"
  2765 +#endif
2763 2766 #ifdef USE_CODE_COPY
2764 2767 "-no-code-copy disable code copy acceleration\n"
2765 2768 #endif
... ... @@ -2848,6 +2851,7 @@ enum {
2848 2851 QEMU_OPTION_loadvm,
2849 2852 QEMU_OPTION_full_screen,
2850 2853 QEMU_OPTION_pidfile,
  2854 + QEMU_OPTION_no_kqemu,
2851 2855 };
2852 2856  
2853 2857 typedef struct QEMUOption {
... ... @@ -2898,6 +2902,9 @@ const QEMUOption qemu_options[] = {
2898 2902 { "hdachs", HAS_ARG, QEMU_OPTION_hdachs },
2899 2903 { "L", HAS_ARG, QEMU_OPTION_L },
2900 2904 { "no-code-copy", 0, QEMU_OPTION_no_code_copy },
  2905 +#ifdef USE_KQEMU
  2906 + { "no-kqemu", 0, QEMU_OPTION_no_kqemu },
  2907 +#endif
2901 2908 #ifdef TARGET_PPC
2902 2909 { "prep", 0, QEMU_OPTION_prep },
2903 2910 { "g", 1, QEMU_OPTION_g },
... ... @@ -3358,6 +3365,11 @@ int main(int argc, char **argv)
3358 3365 case QEMU_OPTION_pidfile:
3359 3366 create_pidfile(optarg);
3360 3367 break;
  3368 +#ifdef USE_KQEMU
  3369 + case QEMU_OPTION_no_kqemu:
  3370 + kqemu_allowed = 0;
  3371 + break;
  3372 +#endif
3361 3373 }
3362 3374 }
3363 3375 }
... ... @@ -3433,12 +3445,7 @@ int main(int argc, char **argv)
3433 3445 phys_ram_size = ram_size + vga_ram_size + bios_size;
3434 3446  
3435 3447 #ifdef CONFIG_SOFTMMU
3436   -#ifdef _BSD
3437   - /* mallocs are always aligned on BSD. valloc is better for correctness */
3438   - phys_ram_base = valloc(phys_ram_size);
3439   -#else
3440   - phys_ram_base = memalign(TARGET_PAGE_SIZE, phys_ram_size);
3441   -#endif
  3448 + phys_ram_base = qemu_vmalloc(phys_ram_size);
3442 3449 if (!phys_ram_base) {
3443 3450 fprintf(stderr, "Could not allocate physical memory\n");
3444 3451 exit(1);
... ...
... ... @@ -124,6 +124,7 @@ extern int graphic_width;
124 124 extern int graphic_height;
125 125 extern int graphic_depth;
126 126 extern const char *keyboard_layout;
  127 +extern int kqemu_allowed;
127 128  
128 129 /* XXX: make it dynamic */
129 130 #if defined (TARGET_PPC)
... ...