summaryrefslogtreecommitdiff
path: root/exec.c
diff options
context:
space:
mode:
authorMarcelo Tosatti <mtosatti@redhat.com>2010-10-20 21:19:46 -0200
committerMarcelo Tosatti <mtosatti@redhat.com>2010-10-20 21:19:46 -0200
commitfe83cfe7db41a889aa95651750da4d5d9723e853 (patch)
tree3c514c80205ddb520f74cc3a878ed84908218646 /exec.c
parent250968666b4984f5f6e91bd3358f21187aea8ad8 (diff)
parente890261f671a0573efbc024972d8769423fc82fc (diff)
Merge commit 'e890261f671a0573efbc024972d8769423fc82fc' into upstream-merge
* commit 'e890261f671a0573efbc024972d8769423fc82fc': Export qemu_ram_addr_from_host Conflicts: cpu-common.h exec.c Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>
Diffstat (limited to 'exec.c')
-rw-r--r--exec.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/exec.c b/exec.c
index dabe8a28a..69b8a27dd 100644
--- a/exec.c
+++ b/exec.c
@@ -2101,7 +2101,7 @@ static inline void tlb_update_dirty(CPUTLBEntry *tlb_entry)
if ((tlb_entry->addr_write & ~TARGET_PAGE_MASK) == IO_MEM_RAM) {
p = (void *)(unsigned long)((tlb_entry->addr_write & TARGET_PAGE_MASK)
+ tlb_entry->addend);
- ram_addr = qemu_ram_addr_from_host(p);
+ ram_addr = qemu_ram_addr_from_host_nofail(p);
if (!cpu_physical_memory_is_dirty(ram_addr)) {
tlb_entry->addr_write |= TLB_NOTDIRTY;
}
@@ -2967,7 +2967,7 @@ void *qemu_get_ram_ptr(ram_addr_t addr)
return NULL;
}
-int do_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)
{
RAMBlock *block;
uint8_t *host = ptr;
@@ -2983,11 +2983,11 @@ int do_qemu_ram_addr_from_host(void *ptr, ram_addr_t *ram_addr)
/* Some of the softmmu routines need to translate from a host pointer
(typically a TLB entry) back to a ram offset. */
-ram_addr_t qemu_ram_addr_from_host(void *ptr)
+ram_addr_t qemu_ram_addr_from_host_nofail(void *ptr)
{
ram_addr_t ram_addr;
- if (do_qemu_ram_addr_from_host(ptr, &ram_addr)) {
+ if (qemu_ram_addr_from_host(ptr, &ram_addr)) {
fprintf(stderr, "Bad ram pointer %p\n", ptr);
abort();
}
@@ -3747,7 +3747,7 @@ void cpu_physical_memory_unmap(void *buffer, target_phys_addr_t len,
if (buffer != bounce.buffer) {
if (is_write) {
- ram_addr_t addr1 = qemu_ram_addr_from_host(buffer);
+ ram_addr_t addr1 = qemu_ram_addr_from_host_nofail(buffer);
while (access_len) {
unsigned l;
l = TARGET_PAGE_SIZE;