sim-card
/
qemu
Archived
10
0
Fork 0

kqemu: merge CONFIG_KQEMU and USE_KQEMU

Basically a recursive ":%s/USE_KQEMU/CONFIG_KQEMU/g".

Signed-off-by: Paul Bolle <pebolle@tiscali.nl>



git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@7189 c046a42c-6fe2-441c-8c8c-71466251a162
This commit is contained in:
blueswir1 2009-04-19 10:18:01 +00:00
parent ac611340c9
commit 640f42e4e9
16 changed files with 59 additions and 59 deletions

4
configure vendored
View File

@ -1770,7 +1770,7 @@ case "$target_cpu" in
if test $kqemu = "yes" -a "$target_softmmu" = "yes" if test $kqemu = "yes" -a "$target_softmmu" = "yes"
then then
echo "CONFIG_KQEMU=yes" >> $config_mak echo "CONFIG_KQEMU=yes" >> $config_mak
echo "#define USE_KQEMU 1" >> $config_h echo "#define CONFIG_KQEMU 1" >> $config_h
fi fi
if test "$kvm" = "yes" ; then if test "$kvm" = "yes" ; then
echo "CONFIG_KVM=yes" >> $config_mak echo "CONFIG_KVM=yes" >> $config_mak
@ -1786,7 +1786,7 @@ case "$target_cpu" in
if test $kqemu = "yes" -a "$target_softmmu" = "yes" -a $cpu = "x86_64" if test $kqemu = "yes" -a "$target_softmmu" = "yes" -a $cpu = "x86_64"
then then
echo "CONFIG_KQEMU=yes" >> $config_mak echo "CONFIG_KQEMU=yes" >> $config_mak
echo "#define USE_KQEMU 1" >> $config_h echo "#define CONFIG_KQEMU 1" >> $config_h
fi fi
if test "$kvm" = "yes" ; then if test "$kvm" = "yes" ; then
echo "CONFIG_KVM=yes" >> $config_mak echo "CONFIG_KVM=yes" >> $config_mak

View File

@ -846,7 +846,7 @@ int cpu_inl(CPUState *env, int addr);
#endif #endif
/* address in the RAM (different from a physical address) */ /* address in the RAM (different from a physical address) */
#ifdef USE_KQEMU #ifdef CONFIG_KQEMU
typedef uint32_t ram_addr_t; typedef uint32_t ram_addr_t;
#else #else
typedef unsigned long ram_addr_t; typedef unsigned long ram_addr_t;

View File

@ -314,7 +314,7 @@ int cpu_exec(CPUState *env1)
} }
env->exception_index = -1; env->exception_index = -1;
} }
#ifdef USE_KQEMU #ifdef CONFIG_KQEMU
if (kqemu_is_ok(env) && env->interrupt_request == 0 && env->exit_request == 0) { if (kqemu_is_ok(env) && env->interrupt_request == 0 && env->exit_request == 0) {
int ret; int ret;
env->eflags = env->eflags | helper_cc_compute_all(CC_OP) | (DF & DF_MASK); env->eflags = env->eflags | helper_cc_compute_all(CC_OP) | (DF & DF_MASK);
@ -594,7 +594,7 @@ int cpu_exec(CPUState *env1)
jump. */ jump. */
{ {
if (next_tb != 0 && if (next_tb != 0 &&
#ifdef USE_KQEMU #ifdef CONFIG_KQEMU
(env->kqemu_enabled != 2) && (env->kqemu_enabled != 2) &&
#endif #endif
tb->page_addr[1] == -1) { tb->page_addr[1] == -1) {
@ -651,7 +651,7 @@ int cpu_exec(CPUState *env1)
} }
/* reset soft MMU for next block (it can currently /* reset soft MMU for next block (it can currently
only be set by a memory fault) */ only be set by a memory fault) */
#if defined(USE_KQEMU) #if defined(CONFIG_KQEMU)
#define MIN_CYCLE_BEFORE_SWITCH (100 * 1000) #define MIN_CYCLE_BEFORE_SWITCH (100 * 1000)
if (kqemu_is_ok(env) && if (kqemu_is_ok(env) &&
(cpu_get_time_fast() - env->last_io_time) >= MIN_CYCLE_BEFORE_SWITCH) { (cpu_get_time_fast() - env->last_io_time) >= MIN_CYCLE_BEFORE_SWITCH) {

View File

@ -352,7 +352,7 @@ static inline int can_do_io(CPUState *env)
} }
#endif #endif
#ifdef USE_KQEMU #ifdef CONFIG_KQEMU
#define KQEMU_MODIFY_PAGE_MASK (0xff & ~(VGA_DIRTY_FLAG | CODE_DIRTY_FLAG)) #define KQEMU_MODIFY_PAGE_MASK (0xff & ~(VGA_DIRTY_FLAG | CODE_DIRTY_FLAG))
#define MSR_QPI_COMMBASE 0xfabe0010 #define MSR_QPI_COMMBASE 0xfabe0010

28
exec.c
View File

@ -71,9 +71,9 @@
#define TARGET_VIRT_ADDR_SPACE_BITS 42 #define TARGET_VIRT_ADDR_SPACE_BITS 42
#elif defined(TARGET_PPC64) #elif defined(TARGET_PPC64)
#define TARGET_PHYS_ADDR_SPACE_BITS 42 #define TARGET_PHYS_ADDR_SPACE_BITS 42
#elif defined(TARGET_X86_64) && !defined(USE_KQEMU) #elif defined(TARGET_X86_64) && !defined(CONFIG_KQEMU)
#define TARGET_PHYS_ADDR_SPACE_BITS 42 #define TARGET_PHYS_ADDR_SPACE_BITS 42
#elif defined(TARGET_I386) && !defined(USE_KQEMU) #elif defined(TARGET_I386) && !defined(CONFIG_KQEMU)
#define TARGET_PHYS_ADDR_SPACE_BITS 36 #define TARGET_PHYS_ADDR_SPACE_BITS 36
#else #else
/* Note: for compatibility with kqemu, we use 32 bits for x86_64 */ /* Note: for compatibility with kqemu, we use 32 bits for x86_64 */
@ -1760,7 +1760,7 @@ void tlb_flush(CPUState *env, int flush_global)
memset (env->tb_jmp_cache, 0, TB_JMP_CACHE_SIZE * sizeof (void *)); memset (env->tb_jmp_cache, 0, TB_JMP_CACHE_SIZE * sizeof (void *));
#ifdef USE_KQEMU #ifdef CONFIG_KQEMU
if (env->kqemu_enabled) { if (env->kqemu_enabled) {
kqemu_flush(env, flush_global); kqemu_flush(env, flush_global);
} }
@ -1809,7 +1809,7 @@ void tlb_flush_page(CPUState *env, target_ulong addr)
tlb_flush_jmp_cache(env, addr); tlb_flush_jmp_cache(env, addr);
#ifdef USE_KQEMU #ifdef CONFIG_KQEMU
if (env->kqemu_enabled) { if (env->kqemu_enabled) {
kqemu_flush_page(env, addr); kqemu_flush_page(env, addr);
} }
@ -1861,7 +1861,7 @@ void cpu_physical_memory_reset_dirty(ram_addr_t start, ram_addr_t end,
if (length == 0) if (length == 0)
return; return;
len = length >> TARGET_PAGE_BITS; len = length >> TARGET_PAGE_BITS;
#ifdef USE_KQEMU #ifdef CONFIG_KQEMU
/* XXX: should not depend on cpu context */ /* XXX: should not depend on cpu context */
env = first_cpu; env = first_cpu;
if (env->kqemu_enabled) { if (env->kqemu_enabled) {
@ -2328,7 +2328,7 @@ void cpu_register_physical_memory_offset(target_phys_addr_t start_addr,
ram_addr_t orig_size = size; ram_addr_t orig_size = size;
void *subpage; void *subpage;
#ifdef USE_KQEMU #ifdef CONFIG_KQEMU
/* XXX: should not depend on cpu context */ /* XXX: should not depend on cpu context */
env = first_cpu; env = first_cpu;
if (env->kqemu_enabled) { if (env->kqemu_enabled) {
@ -2429,7 +2429,7 @@ void qemu_unregister_coalesced_mmio(target_phys_addr_t addr, ram_addr_t size)
kvm_uncoalesce_mmio_region(addr, size); kvm_uncoalesce_mmio_region(addr, size);
} }
#ifdef USE_KQEMU #ifdef CONFIG_KQEMU
/* XXX: better than nothing */ /* XXX: better than nothing */
static ram_addr_t kqemu_ram_alloc(ram_addr_t size) static ram_addr_t kqemu_ram_alloc(ram_addr_t size)
{ {
@ -2449,7 +2449,7 @@ ram_addr_t qemu_ram_alloc(ram_addr_t size)
{ {
RAMBlock *new_block; RAMBlock *new_block;
#ifdef USE_KQEMU #ifdef CONFIG_KQEMU
if (kqemu_phys_ram_base) { if (kqemu_phys_ram_base) {
return kqemu_ram_alloc(size); return kqemu_ram_alloc(size);
} }
@ -2494,7 +2494,7 @@ void *qemu_get_ram_ptr(ram_addr_t addr)
RAMBlock **prevp; RAMBlock **prevp;
RAMBlock *block; RAMBlock *block;
#ifdef USE_KQEMU #ifdef CONFIG_KQEMU
if (kqemu_phys_ram_base) { if (kqemu_phys_ram_base) {
return kqemu_phys_ram_base + addr; return kqemu_phys_ram_base + addr;
} }
@ -2532,7 +2532,7 @@ ram_addr_t qemu_ram_addr_from_host(void *ptr)
RAMBlock *block; RAMBlock *block;
uint8_t *host = ptr; uint8_t *host = ptr;
#ifdef USE_KQEMU #ifdef CONFIG_KQEMU
if (kqemu_phys_ram_base) { if (kqemu_phys_ram_base) {
return host - kqemu_phys_ram_base; return host - kqemu_phys_ram_base;
} }
@ -2642,7 +2642,7 @@ static void notdirty_mem_writeb(void *opaque, target_phys_addr_t ram_addr,
#endif #endif
} }
stb_p(qemu_get_ram_ptr(ram_addr), val); stb_p(qemu_get_ram_ptr(ram_addr), val);
#ifdef USE_KQEMU #ifdef CONFIG_KQEMU
if (cpu_single_env->kqemu_enabled && if (cpu_single_env->kqemu_enabled &&
(dirty_flags & KQEMU_MODIFY_PAGE_MASK) != KQEMU_MODIFY_PAGE_MASK) (dirty_flags & KQEMU_MODIFY_PAGE_MASK) != KQEMU_MODIFY_PAGE_MASK)
kqemu_modify_page(cpu_single_env, ram_addr); kqemu_modify_page(cpu_single_env, ram_addr);
@ -2667,7 +2667,7 @@ static void notdirty_mem_writew(void *opaque, target_phys_addr_t ram_addr,
#endif #endif
} }
stw_p(qemu_get_ram_ptr(ram_addr), val); stw_p(qemu_get_ram_ptr(ram_addr), val);
#ifdef USE_KQEMU #ifdef CONFIG_KQEMU
if (cpu_single_env->kqemu_enabled && if (cpu_single_env->kqemu_enabled &&
(dirty_flags & KQEMU_MODIFY_PAGE_MASK) != KQEMU_MODIFY_PAGE_MASK) (dirty_flags & KQEMU_MODIFY_PAGE_MASK) != KQEMU_MODIFY_PAGE_MASK)
kqemu_modify_page(cpu_single_env, ram_addr); kqemu_modify_page(cpu_single_env, ram_addr);
@ -2692,7 +2692,7 @@ static void notdirty_mem_writel(void *opaque, target_phys_addr_t ram_addr,
#endif #endif
} }
stl_p(qemu_get_ram_ptr(ram_addr), val); stl_p(qemu_get_ram_ptr(ram_addr), val);
#ifdef USE_KQEMU #ifdef CONFIG_KQEMU
if (cpu_single_env->kqemu_enabled && if (cpu_single_env->kqemu_enabled &&
(dirty_flags & KQEMU_MODIFY_PAGE_MASK) != KQEMU_MODIFY_PAGE_MASK) (dirty_flags & KQEMU_MODIFY_PAGE_MASK) != KQEMU_MODIFY_PAGE_MASK)
kqemu_modify_page(cpu_single_env, ram_addr); kqemu_modify_page(cpu_single_env, ram_addr);
@ -2993,7 +2993,7 @@ static void io_mem_init(void)
io_mem_watch = cpu_register_io_memory(0, watch_mem_read, io_mem_watch = cpu_register_io_memory(0, watch_mem_read,
watch_mem_write, NULL); watch_mem_write, NULL);
#ifdef USE_KQEMU #ifdef CONFIG_KQEMU
if (kqemu_phys_ram_base) { if (kqemu_phys_ram_base) {
/* alloc dirty bits array */ /* alloc dirty bits array */
phys_ram_dirty = qemu_vmalloc(kqemu_phys_ram_size >> TARGET_PAGE_BITS); phys_ram_dirty = qemu_vmalloc(kqemu_phys_ram_size >> TARGET_PAGE_BITS);

View File

@ -85,7 +85,7 @@ uint64_t cpu_get_tsc(CPUX86State *env)
/* Note: when using kqemu, it is more logical to return the host TSC /* Note: when using kqemu, it is more logical to return the host TSC
because kqemu does not trap the RDTSC instruction for because kqemu does not trap the RDTSC instruction for
performance reasons */ performance reasons */
#ifdef USE_KQEMU #ifdef CONFIG_KQEMU
if (env->kqemu_enabled) { if (env->kqemu_enabled) {
return cpu_get_real_ticks(); return cpu_get_real_ticks();
} else } else

View File

@ -41,7 +41,7 @@
#include "exec-all.h" #include "exec-all.h"
#include "qemu-common.h" #include "qemu-common.h"
#ifdef USE_KQEMU #ifdef CONFIG_KQEMU
#define DEBUG #define DEBUG
//#define PROFILE //#define PROFILE

View File

@ -1368,7 +1368,7 @@ static void tlb_info(Monitor *mon)
static void do_info_kqemu(Monitor *mon) static void do_info_kqemu(Monitor *mon)
{ {
#ifdef USE_KQEMU #ifdef CONFIG_KQEMU
CPUState *env; CPUState *env;
int val; int val;
val = 0; val = 0;
@ -1445,7 +1445,7 @@ static void do_info_profile(Monitor *mon)
kqemu_ret_int_count = 0; kqemu_ret_int_count = 0;
kqemu_ret_excp_count = 0; kqemu_ret_excp_count = 0;
kqemu_ret_intr_count = 0; kqemu_ret_intr_count = 0;
#ifdef USE_KQEMU #ifdef CONFIG_KQEMU
kqemu_record_dump(); kqemu_record_dump();
#endif #endif
} }

View File

@ -69,7 +69,7 @@ void qemu_vfree(void *ptr)
#else #else
#if defined(USE_KQEMU) #if defined(CONFIG_KQEMU)
#ifdef __OpenBSD__ #ifdef __OpenBSD__
#include <sys/param.h> #include <sys/param.h>
@ -197,7 +197,7 @@ void *qemu_memalign(size_t alignment, size_t size)
/* alloc shared memory pages */ /* alloc shared memory pages */
void *qemu_vmalloc(size_t size) void *qemu_vmalloc(size_t size)
{ {
#if defined(USE_KQEMU) #if defined(CONFIG_KQEMU)
if (kqemu_allowed) if (kqemu_allowed)
return kqemu_vmalloc(size); return kqemu_vmalloc(size);
#endif #endif
@ -206,7 +206,7 @@ void *qemu_vmalloc(size_t size)
void qemu_vfree(void *ptr) void qemu_vfree(void *ptr)
{ {
#if defined(USE_KQEMU) #if defined(CONFIG_KQEMU)
if (kqemu_allowed) if (kqemu_allowed)
kqemu_vfree(ptr); kqemu_vfree(ptr);
#endif #endif

View File

@ -1304,7 +1304,7 @@ STEXI
Set the filename for the BIOS. Set the filename for the BIOS.
ETEXI ETEXI
#ifdef USE_KQEMU #ifdef CONFIG_KQEMU
DEF("kernel-kqemu", 0, QEMU_OPTION_kernel_kqemu, \ DEF("kernel-kqemu", 0, QEMU_OPTION_kernel_kqemu, \
"-kernel-kqemu enable KQEMU full virtualization (default is user mode only)\n") "-kernel-kqemu enable KQEMU full virtualization (default is user mode only)\n")
#endif #endif
@ -1313,7 +1313,7 @@ STEXI
Enable KQEMU full virtualization (default is user mode only). Enable KQEMU full virtualization (default is user mode only).
ETEXI ETEXI
#ifdef USE_KQEMU #ifdef CONFIG_KQEMU
DEF("no-kqemu", 0, QEMU_OPTION_no_kqemu, \ DEF("no-kqemu", 0, QEMU_OPTION_no_kqemu, \
"-no-kqemu disable KQEMU kernel module usage\n") "-no-kqemu disable KQEMU kernel module usage\n")
#endif #endif

View File

@ -76,7 +76,7 @@ static inline DATA_TYPE glue(io_read, SUFFIX)(target_phys_addr_t physaddr,
res |= (uint64_t)io_mem_read[index][2](io_mem_opaque[index], physaddr + 4) << 32; res |= (uint64_t)io_mem_read[index][2](io_mem_opaque[index], physaddr + 4) << 32;
#endif #endif
#endif /* SHIFT > 2 */ #endif /* SHIFT > 2 */
#ifdef USE_KQEMU #ifdef CONFIG_KQEMU
env->last_io_time = cpu_get_time_fast(); env->last_io_time = cpu_get_time_fast();
#endif #endif
return res; return res;
@ -221,7 +221,7 @@ static inline void glue(io_write, SUFFIX)(target_phys_addr_t physaddr,
io_mem_write[index][2](io_mem_opaque[index], physaddr + 4, val >> 32); io_mem_write[index][2](io_mem_opaque[index], physaddr + 4, val >> 32);
#endif #endif
#endif /* SHIFT > 2 */ #endif /* SHIFT > 2 */
#ifdef USE_KQEMU #ifdef CONFIG_KQEMU
env->last_io_time = cpu_get_time_fast(); env->last_io_time = cpu_get_time_fast();
#endif #endif
} }

View File

@ -104,7 +104,7 @@ extern int no_quit;
extern int semihosting_enabled; extern int semihosting_enabled;
extern int old_param; extern int old_param;
#ifdef USE_KQEMU #ifdef CONFIG_KQEMU
extern int kqemu_allowed; extern int kqemu_allowed;
#endif #endif

View File

@ -662,7 +662,7 @@ typedef struct CPUX86State {
uint64_t mask; uint64_t mask;
} mtrr_var[8]; } mtrr_var[8];
#ifdef USE_KQEMU #ifdef CONFIG_KQEMU
int kqemu_enabled; int kqemu_enabled;
int last_io_time; int last_io_time;
#endif #endif
@ -820,7 +820,7 @@ uint64_t cpu_get_tsc(CPUX86State *env);
#define X86_DUMP_FPU 0x0001 /* dump FPU state too */ #define X86_DUMP_FPU 0x0001 /* dump FPU state too */
#define X86_DUMP_CCOP 0x0002 /* dump qemu flag cache */ #define X86_DUMP_CCOP 0x0002 /* dump qemu flag cache */
#ifdef USE_KQEMU #ifdef CONFIG_KQEMU
static inline int cpu_get_time_fast(void) static inline int cpu_get_time_fast(void)
{ {
int low, high; int low, high;

View File

@ -930,7 +930,7 @@ target_phys_addr_t cpu_get_phys_page_debug(CPUState *env, target_ulong addr)
/* XXX: This value should match the one returned by CPUID /* XXX: This value should match the one returned by CPUID
* and in exec.c */ * and in exec.c */
#if defined(USE_KQEMU) #if defined(CONFIG_KQEMU)
#define PHYS_ADDR_MASK 0xfffff000LL #define PHYS_ADDR_MASK 0xfffff000LL
#else #else
# if defined(TARGET_X86_64) # if defined(TARGET_X86_64)
@ -1630,14 +1630,14 @@ void cpu_x86_cpuid(CPUX86State *env, uint32_t index, uint32_t count,
/* XXX: This value must match the one used in the MMU code. */ /* XXX: This value must match the one used in the MMU code. */
if (env->cpuid_ext2_features & CPUID_EXT2_LM) { if (env->cpuid_ext2_features & CPUID_EXT2_LM) {
/* 64 bit processor */ /* 64 bit processor */
#if defined(USE_KQEMU) #if defined(CONFIG_KQEMU)
*eax = 0x00003020; /* 48 bits virtual, 32 bits physical */ *eax = 0x00003020; /* 48 bits virtual, 32 bits physical */
#else #else
/* XXX: The physical address space is limited to 42 bits in exec.c. */ /* XXX: The physical address space is limited to 42 bits in exec.c. */
*eax = 0x00003028; /* 48 bits virtual, 40 bits physical */ *eax = 0x00003028; /* 48 bits virtual, 40 bits physical */
#endif #endif
} else { } else {
#if defined(USE_KQEMU) #if defined(CONFIG_KQEMU)
*eax = 0x00000020; /* 32 bits physical */ *eax = 0x00000020; /* 32 bits physical */
#else #else
if (env->cpuid_features & CPUID_PSE36) if (env->cpuid_features & CPUID_PSE36)
@ -1689,7 +1689,7 @@ CPUX86State *cpu_x86_init(const char *cpu_model)
return NULL; return NULL;
} }
cpu_reset(env); cpu_reset(env);
#ifdef USE_KQEMU #ifdef CONFIG_KQEMU
kqemu_init(env); kqemu_init(env);
#endif #endif
if (kvm_enabled()) if (kvm_enabled())

View File

@ -1119,7 +1119,7 @@ void helper_sysret(int dflag)
env->eflags |= IF_MASK; env->eflags |= IF_MASK;
cpu_x86_set_cpl(env, 3); cpu_x86_set_cpl(env, 3);
} }
#ifdef USE_KQEMU #ifdef CONFIG_KQEMU
if (kqemu_is_ok(env)) { if (kqemu_is_ok(env)) {
if (env->hflags & HF_LMA_MASK) if (env->hflags & HF_LMA_MASK)
CC_OP = CC_OP_EFLAGS; CC_OP = CC_OP_EFLAGS;
@ -2478,7 +2478,7 @@ void helper_lcall_protected(int new_cs, target_ulong new_eip,
SET_ESP(sp, sp_mask); SET_ESP(sp, sp_mask);
EIP = offset; EIP = offset;
} }
#ifdef USE_KQEMU #ifdef CONFIG_KQEMU
if (kqemu_is_ok(env)) { if (kqemu_is_ok(env)) {
env->exception_index = -1; env->exception_index = -1;
cpu_loop_exit(); cpu_loop_exit();
@ -2764,7 +2764,7 @@ void helper_iret_protected(int shift, int next_eip)
helper_ret_protected(shift, 1, 0); helper_ret_protected(shift, 1, 0);
} }
env->hflags2 &= ~HF2_NMI_MASK; env->hflags2 &= ~HF2_NMI_MASK;
#ifdef USE_KQEMU #ifdef CONFIG_KQEMU
if (kqemu_is_ok(env)) { if (kqemu_is_ok(env)) {
CC_OP = CC_OP_EFLAGS; CC_OP = CC_OP_EFLAGS;
env->exception_index = -1; env->exception_index = -1;
@ -2776,7 +2776,7 @@ void helper_iret_protected(int shift, int next_eip)
void helper_lret_protected(int shift, int addend) void helper_lret_protected(int shift, int addend)
{ {
helper_ret_protected(shift, 0, addend); helper_ret_protected(shift, 0, addend);
#ifdef USE_KQEMU #ifdef CONFIG_KQEMU
if (kqemu_is_ok(env)) { if (kqemu_is_ok(env)) {
env->exception_index = -1; env->exception_index = -1;
cpu_loop_exit(); cpu_loop_exit();
@ -2854,7 +2854,7 @@ void helper_sysexit(int dflag)
} }
ESP = ECX; ESP = ECX;
EIP = EDX; EIP = EDX;
#ifdef USE_KQEMU #ifdef CONFIG_KQEMU
if (kqemu_is_ok(env)) { if (kqemu_is_ok(env)) {
env->exception_index = -1; env->exception_index = -1;
cpu_loop_exit(); cpu_loop_exit();
@ -3167,7 +3167,7 @@ void helper_rdmsr(void)
val = env->kernelgsbase; val = env->kernelgsbase;
break; break;
#endif #endif
#ifdef USE_KQEMU #ifdef CONFIG_KQEMU
case MSR_QPI_COMMBASE: case MSR_QPI_COMMBASE:
if (env->kqemu_enabled) { if (env->kqemu_enabled) {
val = kqemu_comm_base; val = kqemu_comm_base;

28
vl.c
View File

@ -435,7 +435,7 @@ void cpu_outb(CPUState *env, int addr, int val)
{ {
LOG_IOPORT("outb: %04x %02x\n", addr, val); LOG_IOPORT("outb: %04x %02x\n", addr, val);
ioport_write(0, addr, val); ioport_write(0, addr, val);
#ifdef USE_KQEMU #ifdef CONFIG_KQEMU
if (env) if (env)
env->last_io_time = cpu_get_time_fast(); env->last_io_time = cpu_get_time_fast();
#endif #endif
@ -445,7 +445,7 @@ void cpu_outw(CPUState *env, int addr, int val)
{ {
LOG_IOPORT("outw: %04x %04x\n", addr, val); LOG_IOPORT("outw: %04x %04x\n", addr, val);
ioport_write(1, addr, val); ioport_write(1, addr, val);
#ifdef USE_KQEMU #ifdef CONFIG_KQEMU
if (env) if (env)
env->last_io_time = cpu_get_time_fast(); env->last_io_time = cpu_get_time_fast();
#endif #endif
@ -455,7 +455,7 @@ void cpu_outl(CPUState *env, int addr, int val)
{ {
LOG_IOPORT("outl: %04x %08x\n", addr, val); LOG_IOPORT("outl: %04x %08x\n", addr, val);
ioport_write(2, addr, val); ioport_write(2, addr, val);
#ifdef USE_KQEMU #ifdef CONFIG_KQEMU
if (env) if (env)
env->last_io_time = cpu_get_time_fast(); env->last_io_time = cpu_get_time_fast();
#endif #endif
@ -466,7 +466,7 @@ int cpu_inb(CPUState *env, int addr)
int val; int val;
val = ioport_read(0, addr); val = ioport_read(0, addr);
LOG_IOPORT("inb : %04x %02x\n", addr, val); LOG_IOPORT("inb : %04x %02x\n", addr, val);
#ifdef USE_KQEMU #ifdef CONFIG_KQEMU
if (env) if (env)
env->last_io_time = cpu_get_time_fast(); env->last_io_time = cpu_get_time_fast();
#endif #endif
@ -478,7 +478,7 @@ int cpu_inw(CPUState *env, int addr)
int val; int val;
val = ioport_read(1, addr); val = ioport_read(1, addr);
LOG_IOPORT("inw : %04x %04x\n", addr, val); LOG_IOPORT("inw : %04x %04x\n", addr, val);
#ifdef USE_KQEMU #ifdef CONFIG_KQEMU
if (env) if (env)
env->last_io_time = cpu_get_time_fast(); env->last_io_time = cpu_get_time_fast();
#endif #endif
@ -490,7 +490,7 @@ int cpu_inl(CPUState *env, int addr)
int val; int val;
val = ioport_read(2, addr); val = ioport_read(2, addr);
LOG_IOPORT("inl : %04x %08x\n", addr, val); LOG_IOPORT("inl : %04x %08x\n", addr, val);
#ifdef USE_KQEMU #ifdef CONFIG_KQEMU
if (env) if (env)
env->last_io_time = cpu_get_time_fast(); env->last_io_time = cpu_get_time_fast();
#endif #endif
@ -1357,7 +1357,7 @@ static void host_alarm_handler(int host_signum)
if (env) { if (env) {
/* stop the currently executing cpu because a timer occured */ /* stop the currently executing cpu because a timer occured */
cpu_exit(env); cpu_exit(env);
#ifdef USE_KQEMU #ifdef CONFIG_KQEMU
if (env->kqemu_enabled) { if (env->kqemu_enabled) {
kqemu_cpu_interrupt(env); kqemu_cpu_interrupt(env);
} }
@ -3343,7 +3343,7 @@ void qemu_service_io(void)
CPUState *env = cpu_single_env; CPUState *env = cpu_single_env;
if (env) { if (env) {
cpu_exit(env); cpu_exit(env);
#ifdef USE_KQEMU #ifdef CONFIG_KQEMU
if (env->kqemu_enabled) { if (env->kqemu_enabled) {
kqemu_cpu_interrupt(env); kqemu_cpu_interrupt(env);
} }
@ -4634,7 +4634,7 @@ int main(int argc, char **argv, char **envp)
/* On 32-bit hosts, QEMU is limited by virtual address space */ /* On 32-bit hosts, QEMU is limited by virtual address space */
if (value > (2047 << 20) if (value > (2047 << 20)
#ifndef USE_KQEMU #ifndef CONFIG_KQEMU
&& HOST_LONG_BITS == 32 && HOST_LONG_BITS == 32
#endif #endif
) { ) {
@ -4809,7 +4809,7 @@ int main(int argc, char **argv, char **envp)
} }
break; break;
#endif #endif
#ifdef USE_KQEMU #ifdef CONFIG_KQEMU
case QEMU_OPTION_no_kqemu: case QEMU_OPTION_no_kqemu:
kqemu_allowed = 0; kqemu_allowed = 0;
break; break;
@ -4820,7 +4820,7 @@ int main(int argc, char **argv, char **envp)
#ifdef CONFIG_KVM #ifdef CONFIG_KVM
case QEMU_OPTION_enable_kvm: case QEMU_OPTION_enable_kvm:
kvm_allowed = 1; kvm_allowed = 1;
#ifdef USE_KQEMU #ifdef CONFIG_KQEMU
kqemu_allowed = 0; kqemu_allowed = 0;
#endif #endif
break; break;
@ -4976,7 +4976,7 @@ int main(int argc, char **argv, char **envp)
} }
} }
#if defined(CONFIG_KVM) && defined(USE_KQEMU) #if defined(CONFIG_KVM) && defined(CONFIG_KQEMU)
if (kvm_allowed && kqemu_allowed) { if (kvm_allowed && kqemu_allowed) {
fprintf(stderr, fprintf(stderr,
"You can not enable both KVM and kqemu at the same time\n"); "You can not enable both KVM and kqemu at the same time\n");
@ -5055,7 +5055,7 @@ int main(int argc, char **argv, char **envp)
} }
#endif #endif
#ifdef USE_KQEMU #ifdef CONFIG_KQEMU
if (smp_cpus > 1) if (smp_cpus > 1)
kqemu_allowed = 0; kqemu_allowed = 0;
#endif #endif
@ -5148,7 +5148,7 @@ int main(int argc, char **argv, char **envp)
if (ram_size == 0) if (ram_size == 0)
ram_size = DEFAULT_RAM_SIZE * 1024 * 1024; ram_size = DEFAULT_RAM_SIZE * 1024 * 1024;
#ifdef USE_KQEMU #ifdef CONFIG_KQEMU
/* FIXME: This is a nasty hack because kqemu can't cope with dynamic /* FIXME: This is a nasty hack because kqemu can't cope with dynamic
guest ram allocation. It needs to go away. */ guest ram allocation. It needs to go away. */
if (kqemu_allowed) { if (kqemu_allowed) {