diff options
author | Anthony Liguori <aliguori@us.ibm.com> | 2009-08-10 17:07:24 -0500 |
---|---|---|
committer | Anthony Liguori <aliguori@us.ibm.com> | 2009-08-24 08:02:55 -0500 |
commit | 4a1418e07bdcfaa3177739e04707ecaec75d89e1 (patch) | |
tree | a68b7017b184850330000afa416d4ed419bb736a /vl.c | |
parent | 0953a80f04a9771323931123cbe486e9fd8ffe20 (diff) | |
download | hqemu-4a1418e07bdcfaa3177739e04707ecaec75d89e1.zip hqemu-4a1418e07bdcfaa3177739e04707ecaec75d89e1.tar.gz |
Unbreak large mem support by removing kqemu
kqemu introduces a number of restrictions on the i386 target. The worst is that
it prevents large memory from working in the default build.
Furthermore, kqemu is fundamentally flawed in a number of ways. It relies on
the TSC as a time source which will not be reliable on a multiple processor
system in userspace. Since most modern processors are multicore, this severely
limits the utility of kqemu.
kvm is a viable alternative for people looking to accelerate qemu and has the
benefit of being supported by the upstream Linux kernel. If someone can
implement work arounds to remove the restrictions introduced by kqemu, I'm
happy to avoid and/or revert this patch.
N.B. kqemu will still function in the 0.11 series but this patch removes it from
the 0.12 series.
Paul, please Ack or Nack this patch.
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Diffstat (limited to 'vl.c')
-rw-r--r-- | vl.c | 53 |
1 files changed, 2 insertions, 51 deletions
@@ -1139,11 +1139,6 @@ static void host_alarm_handler(int host_signum) if (next_cpu) { /* stop the currently executing cpu because a timer occured */ cpu_exit(next_cpu); -#ifdef CONFIG_KQEMU - if (next_cpu->kqemu_enabled) { - kqemu_cpu_interrupt(next_cpu); - } -#endif } #endif timer_alarm_pending = 1; @@ -3597,11 +3592,7 @@ void qemu_notify_event(void) if (env) { cpu_exit(env); -#ifdef USE_KQEMU - if (env->kqemu_enabled) - kqemu_cpu_interrupt(env); -#endif - } + } } #define qemu_mutex_lock_iothread() do { } while (0) @@ -5182,11 +5173,7 @@ int main(int argc, char **argv, char **envp) } /* On 32-bit hosts, QEMU is limited by virtual address space */ - if (value > (2047 << 20) -#ifndef CONFIG_KQEMU - && HOST_LONG_BITS == 32 -#endif - ) { + if (value > (2047 << 20) && HOST_LONG_BITS == 32) { fprintf(stderr, "qemu: at most 2047 MB RAM can be simulated\n"); exit(1); } @@ -5367,20 +5354,9 @@ int main(int argc, char **argv, char **envp) } break; #endif -#ifdef CONFIG_KQEMU - case QEMU_OPTION_enable_kqemu: - kqemu_allowed = 1; - break; - case QEMU_OPTION_kernel_kqemu: - kqemu_allowed = 2; - break; -#endif #ifdef CONFIG_KVM case QEMU_OPTION_enable_kvm: kvm_allowed = 1; -#ifdef CONFIG_KQEMU - kqemu_allowed = 0; -#endif break; #endif case QEMU_OPTION_usb: @@ -5593,14 +5569,6 @@ int main(int argc, char **argv, char **envp) data_dir = CONFIG_QEMU_SHAREDIR; } -#if defined(CONFIG_KVM) && defined(CONFIG_KQEMU) - if (kvm_allowed && kqemu_allowed) { - fprintf(stderr, - "You can not enable both KVM and kqemu at the same time\n"); - exit(1); - } -#endif - /* * Default to max_cpus = smp_cpus, in case the user doesn't * specify a max_cpus value. @@ -5679,10 +5647,6 @@ int main(int argc, char **argv, char **envp) } #endif -#ifdef CONFIG_KQEMU - if (smp_cpus > 1) - kqemu_allowed = 0; -#endif if (qemu_init_main_loop()) { fprintf(stderr, "qemu_init_main_loop failed\n"); exit(1); @@ -5748,19 +5712,6 @@ int main(int argc, char **argv, char **envp) if (ram_size == 0) ram_size = DEFAULT_RAM_SIZE * 1024 * 1024; -#ifdef CONFIG_KQEMU - /* FIXME: This is a nasty hack because kqemu can't cope with dynamic - guest ram allocation. It needs to go away. */ - if (kqemu_allowed) { - kqemu_phys_ram_size = ram_size + 8 * 1024 * 1024 + 4 * 1024 * 1024; - kqemu_phys_ram_base = qemu_vmalloc(kqemu_phys_ram_size); - if (!kqemu_phys_ram_base) { - fprintf(stderr, "Could not allocate physical memory\n"); - exit(1); - } - } -#endif - /* init the dynamic translator */ cpu_exec_init_all(tb_size * 1024 * 1024); |