提交 8b9c99d9 编写于 作者: B Blue Swirl 提交者: Stefan Hajnoczi

exec: make some functions static

Signed-off-by: NBlue Swirl <blauwirbel@gmail.com>
Signed-off-by: NStefan Hajnoczi <stefanha@redhat.com>
上级 6575c289
...@@ -39,10 +39,6 @@ typedef uint32_t CPUReadMemoryFunc(void *opaque, hwaddr addr); ...@@ -39,10 +39,6 @@ typedef uint32_t CPUReadMemoryFunc(void *opaque, hwaddr addr);
void qemu_ram_remap(ram_addr_t addr, ram_addr_t length); void qemu_ram_remap(ram_addr_t addr, ram_addr_t length);
/* This should only be used for ram local to a device. */ /* This should only be used for ram local to a device. */
void *qemu_get_ram_ptr(ram_addr_t addr); void *qemu_get_ram_ptr(ram_addr_t addr);
void *qemu_ram_ptr_length(ram_addr_t addr, ram_addr_t *size);
/* Same but slower, to use for migration, where the order of
* RAMBlocks must not change. */
void *qemu_safe_ram_ptr(ram_addr_t addr);
void qemu_put_ram_ptr(void *addr); void qemu_put_ram_ptr(void *addr);
/* This should not be used by devices. */ /* This should not be used by devices. */
int qemu_ram_addr_from_host(void *ptr, ram_addr_t *ram_addr); int qemu_ram_addr_from_host(void *ptr, ram_addr_t *ram_addr);
...@@ -67,7 +63,6 @@ void *cpu_physical_memory_map(hwaddr addr, ...@@ -67,7 +63,6 @@ void *cpu_physical_memory_map(hwaddr addr,
void cpu_physical_memory_unmap(void *buffer, hwaddr len, void cpu_physical_memory_unmap(void *buffer, hwaddr len,
int is_write, hwaddr access_len); int is_write, hwaddr access_len);
void *cpu_register_map_client(void *opaque, void (*callback)(void *opaque)); void *cpu_register_map_client(void *opaque, void (*callback)(void *opaque));
void cpu_unregister_map_client(void *cookie);
bool cpu_physical_memory_is_io(hwaddr phys_addr); bool cpu_physical_memory_is_io(hwaddr phys_addr);
......
...@@ -194,8 +194,6 @@ static inline unsigned int tb_phys_hash_func(tb_page_addr_t pc) ...@@ -194,8 +194,6 @@ static inline unsigned int tb_phys_hash_func(tb_page_addr_t pc)
void tb_free(TranslationBlock *tb); void tb_free(TranslationBlock *tb);
void tb_flush(CPUArchState *env); void tb_flush(CPUArchState *env);
void tb_link_page(TranslationBlock *tb,
tb_page_addr_t phys_pc, tb_page_addr_t phys_page2);
void tb_phys_invalidate(TranslationBlock *tb, tb_page_addr_t page_addr); void tb_phys_invalidate(TranslationBlock *tb, tb_page_addr_t page_addr);
extern TranslationBlock *tb_phys_hash[CODE_GEN_PHYS_HASH_SIZE]; extern TranslationBlock *tb_phys_hash[CODE_GEN_PHYS_HASH_SIZE];
......
...@@ -188,9 +188,12 @@ static unsigned phys_map_nodes_nb, phys_map_nodes_nb_alloc; ...@@ -188,9 +188,12 @@ static unsigned phys_map_nodes_nb, phys_map_nodes_nb_alloc;
static void io_mem_init(void); static void io_mem_init(void);
static void memory_map_init(void); static void memory_map_init(void);
static void *qemu_safe_ram_ptr(ram_addr_t addr);
static MemoryRegion io_mem_watch; static MemoryRegion io_mem_watch;
#endif #endif
static void tb_link_page(TranslationBlock *tb, tb_page_addr_t phys_pc,
tb_page_addr_t phys_page2);
/* statistics */ /* statistics */
static int tb_flush_count; static int tb_flush_count;
...@@ -1349,8 +1352,8 @@ static inline void tb_alloc_page(TranslationBlock *tb, ...@@ -1349,8 +1352,8 @@ static inline void tb_alloc_page(TranslationBlock *tb,
/* add a new TB and link it to the physical page tables. phys_page2 is /* add a new TB and link it to the physical page tables. phys_page2 is
(-1) to indicate that only one page contains the TB. */ (-1) to indicate that only one page contains the TB. */
void tb_link_page(TranslationBlock *tb, static void tb_link_page(TranslationBlock *tb, tb_page_addr_t phys_pc,
tb_page_addr_t phys_pc, tb_page_addr_t phys_page2) tb_page_addr_t phys_page2)
{ {
unsigned int h; unsigned int h;
TranslationBlock **ptb; TranslationBlock **ptb;
...@@ -1859,7 +1862,7 @@ void cpu_physical_memory_reset_dirty(ram_addr_t start, ram_addr_t end, ...@@ -1859,7 +1862,7 @@ void cpu_physical_memory_reset_dirty(ram_addr_t start, ram_addr_t end,
} }
} }
int cpu_physical_memory_set_dirty_tracking(int enable) static int cpu_physical_memory_set_dirty_tracking(int enable)
{ {
int ret = 0; int ret = 0;
in_migration = enable; in_migration = enable;
...@@ -2741,7 +2744,7 @@ void *qemu_get_ram_ptr(ram_addr_t addr) ...@@ -2741,7 +2744,7 @@ void *qemu_get_ram_ptr(ram_addr_t addr)
/* Return a host pointer to ram allocated with qemu_ram_alloc. /* Return a host pointer to ram allocated with qemu_ram_alloc.
* Same as qemu_get_ram_ptr but avoid reordering ramblocks. * Same as qemu_get_ram_ptr but avoid reordering ramblocks.
*/ */
void *qemu_safe_ram_ptr(ram_addr_t addr) static void *qemu_safe_ram_ptr(ram_addr_t addr)
{ {
RAMBlock *block; RAMBlock *block;
...@@ -2771,7 +2774,7 @@ void *qemu_safe_ram_ptr(ram_addr_t addr) ...@@ -2771,7 +2774,7 @@ void *qemu_safe_ram_ptr(ram_addr_t addr)
/* Return a host pointer to guest's ram. Similar to qemu_get_ram_ptr /* Return a host pointer to guest's ram. Similar to qemu_get_ram_ptr
* but takes a size argument */ * but takes a size argument */
void *qemu_ram_ptr_length(ram_addr_t addr, ram_addr_t *size) static void *qemu_ram_ptr_length(ram_addr_t addr, ram_addr_t *size)
{ {
if (*size == 0) { if (*size == 0) {
return NULL; return NULL;
...@@ -3519,7 +3522,7 @@ void *cpu_register_map_client(void *opaque, void (*callback)(void *opaque)) ...@@ -3519,7 +3522,7 @@ void *cpu_register_map_client(void *opaque, void (*callback)(void *opaque))
return client; return client;
} }
void cpu_unregister_map_client(void *_client) static void cpu_unregister_map_client(void *_client)
{ {
MapClient *client = (MapClient *)_client; MapClient *client = (MapClient *)_client;
......
...@@ -55,8 +55,6 @@ struct MemoryRegionSection; ...@@ -55,8 +55,6 @@ struct MemoryRegionSection;
void qemu_register_coalesced_mmio(hwaddr addr, ram_addr_t size); void qemu_register_coalesced_mmio(hwaddr addr, ram_addr_t size);
void qemu_unregister_coalesced_mmio(hwaddr addr, ram_addr_t size); void qemu_unregister_coalesced_mmio(hwaddr addr, ram_addr_t size);
int cpu_physical_memory_set_dirty_tracking(int enable);
#define VGA_DIRTY_FLAG 0x01 #define VGA_DIRTY_FLAG 0x01
#define CODE_DIRTY_FLAG 0x02 #define CODE_DIRTY_FLAG 0x02
#define MIGRATION_DIRTY_FLAG 0x08 #define MIGRATION_DIRTY_FLAG 0x08
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册