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,6 +2760,9 @@ void help(void)
2760 "-hdachs c,h,s[,t] force hard disk 0 physical geometry and the optional BIOS\n" 2760 "-hdachs c,h,s[,t] force hard disk 0 physical geometry and the optional BIOS\n"
2761 " translation (t=none or lba) (usually qemu can guess them)\n" 2761 " translation (t=none or lba) (usually qemu can guess them)\n"
2762 "-L path set the directory for the BIOS and VGA BIOS\n" 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 #ifdef USE_CODE_COPY 2766 #ifdef USE_CODE_COPY
2764 "-no-code-copy disable code copy acceleration\n" 2767 "-no-code-copy disable code copy acceleration\n"
2765 #endif 2768 #endif
@@ -2848,6 +2851,7 @@ enum { @@ -2848,6 +2851,7 @@ enum {
2848 QEMU_OPTION_loadvm, 2851 QEMU_OPTION_loadvm,
2849 QEMU_OPTION_full_screen, 2852 QEMU_OPTION_full_screen,
2850 QEMU_OPTION_pidfile, 2853 QEMU_OPTION_pidfile,
  2854 + QEMU_OPTION_no_kqemu,
2851 }; 2855 };
2852 2856
2853 typedef struct QEMUOption { 2857 typedef struct QEMUOption {
@@ -2898,6 +2902,9 @@ const QEMUOption qemu_options[] = { @@ -2898,6 +2902,9 @@ const QEMUOption qemu_options[] = {
2898 { "hdachs", HAS_ARG, QEMU_OPTION_hdachs }, 2902 { "hdachs", HAS_ARG, QEMU_OPTION_hdachs },
2899 { "L", HAS_ARG, QEMU_OPTION_L }, 2903 { "L", HAS_ARG, QEMU_OPTION_L },
2900 { "no-code-copy", 0, QEMU_OPTION_no_code_copy }, 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 #ifdef TARGET_PPC 2908 #ifdef TARGET_PPC
2902 { "prep", 0, QEMU_OPTION_prep }, 2909 { "prep", 0, QEMU_OPTION_prep },
2903 { "g", 1, QEMU_OPTION_g }, 2910 { "g", 1, QEMU_OPTION_g },
@@ -3358,6 +3365,11 @@ int main(int argc, char **argv) @@ -3358,6 +3365,11 @@ int main(int argc, char **argv)
3358 case QEMU_OPTION_pidfile: 3365 case QEMU_OPTION_pidfile:
3359 create_pidfile(optarg); 3366 create_pidfile(optarg);
3360 break; 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,12 +3445,7 @@ int main(int argc, char **argv)
3433 phys_ram_size = ram_size + vga_ram_size + bios_size; 3445 phys_ram_size = ram_size + vga_ram_size + bios_size;
3434 3446
3435 #ifdef CONFIG_SOFTMMU 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 if (!phys_ram_base) { 3449 if (!phys_ram_base) {
3443 fprintf(stderr, "Could not allocate physical memory\n"); 3450 fprintf(stderr, "Could not allocate physical memory\n");
3444 exit(1); 3451 exit(1);
@@ -124,6 +124,7 @@ extern int graphic_width; @@ -124,6 +124,7 @@ extern int graphic_width;
124 extern int graphic_height; 124 extern int graphic_height;
125 extern int graphic_depth; 125 extern int graphic_depth;
126 extern const char *keyboard_layout; 126 extern const char *keyboard_layout;
  127 +extern int kqemu_allowed;
127 128
128 /* XXX: make it dynamic */ 129 /* XXX: make it dynamic */
129 #if defined (TARGET_PPC) 130 #if defined (TARGET_PPC)