Revision 4a1418e0 vl.c
b/vl.c | ||
---|---|---|
1139 | 1139 |
if (next_cpu) { |
1140 | 1140 |
/* stop the currently executing cpu because a timer occured */ |
1141 | 1141 |
cpu_exit(next_cpu); |
1142 |
#ifdef CONFIG_KQEMU |
|
1143 |
if (next_cpu->kqemu_enabled) { |
|
1144 |
kqemu_cpu_interrupt(next_cpu); |
|
1145 |
} |
|
1146 |
#endif |
|
1147 | 1142 |
} |
1148 | 1143 |
#endif |
1149 | 1144 |
timer_alarm_pending = 1; |
... | ... | |
3597 | 3592 |
|
3598 | 3593 |
if (env) { |
3599 | 3594 |
cpu_exit(env); |
3600 |
#ifdef USE_KQEMU |
|
3601 |
if (env->kqemu_enabled) |
|
3602 |
kqemu_cpu_interrupt(env); |
|
3603 |
#endif |
|
3604 |
} |
|
3595 |
} |
|
3605 | 3596 |
} |
3606 | 3597 |
|
3607 | 3598 |
#define qemu_mutex_lock_iothread() do { } while (0) |
... | ... | |
5182 | 5173 |
} |
5183 | 5174 |
|
5184 | 5175 |
/* On 32-bit hosts, QEMU is limited by virtual address space */ |
5185 |
if (value > (2047 << 20) |
|
5186 |
#ifndef CONFIG_KQEMU |
|
5187 |
&& HOST_LONG_BITS == 32 |
|
5188 |
#endif |
|
5189 |
) { |
|
5176 |
if (value > (2047 << 20) && HOST_LONG_BITS == 32) { |
|
5190 | 5177 |
fprintf(stderr, "qemu: at most 2047 MB RAM can be simulated\n"); |
5191 | 5178 |
exit(1); |
5192 | 5179 |
} |
... | ... | |
5367 | 5354 |
} |
5368 | 5355 |
break; |
5369 | 5356 |
#endif |
5370 |
#ifdef CONFIG_KQEMU |
|
5371 |
case QEMU_OPTION_enable_kqemu: |
|
5372 |
kqemu_allowed = 1; |
|
5373 |
break; |
|
5374 |
case QEMU_OPTION_kernel_kqemu: |
|
5375 |
kqemu_allowed = 2; |
|
5376 |
break; |
|
5377 |
#endif |
|
5378 | 5357 |
#ifdef CONFIG_KVM |
5379 | 5358 |
case QEMU_OPTION_enable_kvm: |
5380 | 5359 |
kvm_allowed = 1; |
5381 |
#ifdef CONFIG_KQEMU |
|
5382 |
kqemu_allowed = 0; |
|
5383 |
#endif |
|
5384 | 5360 |
break; |
5385 | 5361 |
#endif |
5386 | 5362 |
case QEMU_OPTION_usb: |
... | ... | |
5593 | 5569 |
data_dir = CONFIG_QEMU_SHAREDIR; |
5594 | 5570 |
} |
5595 | 5571 |
|
5596 |
#if defined(CONFIG_KVM) && defined(CONFIG_KQEMU) |
|
5597 |
if (kvm_allowed && kqemu_allowed) { |
|
5598 |
fprintf(stderr, |
|
5599 |
"You can not enable both KVM and kqemu at the same time\n"); |
|
5600 |
exit(1); |
|
5601 |
} |
|
5602 |
#endif |
|
5603 |
|
|
5604 | 5572 |
/* |
5605 | 5573 |
* Default to max_cpus = smp_cpus, in case the user doesn't |
5606 | 5574 |
* specify a max_cpus value. |
... | ... | |
5679 | 5647 |
} |
5680 | 5648 |
#endif |
5681 | 5649 |
|
5682 |
#ifdef CONFIG_KQEMU |
|
5683 |
if (smp_cpus > 1) |
|
5684 |
kqemu_allowed = 0; |
|
5685 |
#endif |
|
5686 | 5650 |
if (qemu_init_main_loop()) { |
5687 | 5651 |
fprintf(stderr, "qemu_init_main_loop failed\n"); |
5688 | 5652 |
exit(1); |
... | ... | |
5748 | 5712 |
if (ram_size == 0) |
5749 | 5713 |
ram_size = DEFAULT_RAM_SIZE * 1024 * 1024; |
5750 | 5714 |
|
5751 |
#ifdef CONFIG_KQEMU |
|
5752 |
/* FIXME: This is a nasty hack because kqemu can't cope with dynamic |
|
5753 |
guest ram allocation. It needs to go away. */ |
|
5754 |
if (kqemu_allowed) { |
|
5755 |
kqemu_phys_ram_size = ram_size + 8 * 1024 * 1024 + 4 * 1024 * 1024; |
|
5756 |
kqemu_phys_ram_base = qemu_vmalloc(kqemu_phys_ram_size); |
|
5757 |
if (!kqemu_phys_ram_base) { |
|
5758 |
fprintf(stderr, "Could not allocate physical memory\n"); |
|
5759 |
exit(1); |
|
5760 |
} |
|
5761 |
} |
|
5762 |
#endif |
|
5763 |
|
|
5764 | 5715 |
/* init the dynamic translator */ |
5765 | 5716 |
cpu_exec_init_all(tb_size * 1024 * 1024); |
5766 | 5717 |
|
Also available in: Unified diff