Commit b3755a91 authored by Paul Brook's avatar Paul Brook

Disable phsyical memory handling in userspace emulation.

Code to handle physical memory access is not meaningful in usrmode emulation,
so disable it.
Signed-off-by: default avatarPaul Brook <paul@codesourcery.com>
parent 20cb400d
......@@ -849,6 +849,8 @@ void cpu_set_log(int log_flags);
void cpu_set_log_filename(const char *filename);
int cpu_str_to_log_mask(const char *str);
#if !defined(CONFIG_USER_ONLY)
/* memory API */
extern int phys_ram_fd;
......@@ -877,9 +879,6 @@ extern int mem_prealloc;
/* Set if TLB entry is an IO callback. */
#define TLB_MMIO (1 << 5)
int cpu_memory_rw_debug(CPUState *env, target_ulong addr,
uint8_t *buf, int len, int is_write);
#define VGA_DIRTY_FLAG 0x01
#define CODE_DIRTY_FLAG 0x02
#define MIGRATION_DIRTY_FLAG 0x08
......@@ -926,6 +925,11 @@ void qemu_unregister_coalesced_mmio(target_phys_addr_t addr, ram_addr_t size);
void qemu_flush_coalesced_mmio_buffer(void);
#endif /* !CONFIG_USER_ONLY */
int cpu_memory_rw_debug(CPUState *env, target_ulong addr,
uint8_t *buf, int len, int is_write);
/*******************************************/
/* host CPU ticks (if available) */
......
......@@ -10,6 +10,8 @@
#include "bswap.h"
#include "qemu-queue.h"
#if !defined(CONFIG_USER_ONLY)
/* address in the RAM (different from a physical address) */
typedef unsigned long ram_addr_t;
......@@ -106,4 +108,6 @@ void cpu_physical_memory_write_rom(target_phys_addr_t addr,
#define IO_MEM_SUBPAGE (2)
#define IO_MEM_SUBWIDTH (4)
#endif
#endif /* !CPU_COMMON_H */
......@@ -274,10 +274,6 @@ static inline void tb_add_jump(TranslationBlock *tb, int n,
TranslationBlock *tb_find_pc(unsigned long pc_ptr);
extern CPUWriteMemoryFunc *io_mem_write[IO_MEM_NB_ENTRIES][4];
extern CPUReadMemoryFunc *io_mem_read[IO_MEM_NB_ENTRIES][4];
extern void *io_mem_opaque[IO_MEM_NB_ENTRIES];
#include "qemu-lock.h"
extern spinlock_t tb_lock;
......@@ -286,6 +282,10 @@ extern int tb_invalidated_flag;
#if !defined(CONFIG_USER_ONLY)
extern CPUWriteMemoryFunc *io_mem_write[IO_MEM_NB_ENTRIES][4];
extern CPUReadMemoryFunc *io_mem_read[IO_MEM_NB_ENTRIES][4];
extern void *io_mem_opaque[IO_MEM_NB_ENTRIES];
void tlb_fill(target_ulong addr, int is_write, int mmu_idx,
void *retaddr);
......
......@@ -217,7 +217,9 @@ int loglevel;
static int log_append = 0;
/* statistics */
#if !defined(CONFIG_USER_ONLY)
static int tlb_flush_count;
#endif
static int tb_flush_count;
static int tb_phys_invalidate_count;
......@@ -3924,6 +3926,8 @@ void cpu_io_recompile(CPUState *env, void *retaddr)
cpu_resume_from_signal(env, NULL);
}
#if !defined(CONFIG_USER_ONLY)
void dump_exec_info(FILE *f,
int (*cpu_fprintf)(FILE *f, const char *fmt, ...))
{
......@@ -3977,8 +3981,6 @@ void dump_exec_info(FILE *f,
tcg_dump_info(f, cpu_fprintf);
}
#if !defined(CONFIG_USER_ONLY)
#define MMUSUFFIX _cmmu
#define GETPC() NULL
#define env cpu_single_env
......
......@@ -35,6 +35,7 @@ int kvm_init_vcpu(CPUState *env);
int kvm_cpu_exec(CPUState *env);
#if !defined(CONFIG_USER_ONLY)
int kvm_log_start(target_phys_addr_t phys_addr, ram_addr_t size);
int kvm_log_stop(target_phys_addr_t phys_addr, ram_addr_t size);
......@@ -47,6 +48,7 @@ void kvm_setup_guest_memory(void *start, size_t size);
int kvm_coalesce_mmio_region(target_phys_addr_t start, ram_addr_t size);
int kvm_uncoalesce_mmio_region(target_phys_addr_t start, ram_addr_t size);
void kvm_flush_coalesced_mmio_buffer(void);
#endif
int kvm_insert_breakpoint(CPUState *current_env, target_ulong addr,
target_ulong len, int type);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment