diff options
-rw-r--r-- | memory.c | 3 | ||||
-rw-r--r-- | savevm.c | 2 | ||||
-rw-r--r-- | target-ppc/kvm.c | 3 |
3 files changed, 5 insertions, 3 deletions
@@ -843,7 +843,7 @@ static void memory_region_destructor_rom_device(MemoryRegion *mr) static bool memory_region_wrong_endianness(MemoryRegion *mr) { -#ifdef TARGET_BIG_ENDIAN +#ifdef TARGET_WORDS_BIGENDIAN return mr->ops->endianness == DEVICE_LITTLE_ENDIAN; #else return mr->ops->endianness == DEVICE_BIG_ENDIAN; @@ -942,6 +942,7 @@ static void adjust_endianness(MemoryRegion *mr, uint64_t *data, unsigned size) break; case 4: *data = bswap32(*data); + break; default: abort(); } @@ -2284,7 +2284,7 @@ void do_info_snapshots(Monitor *mon) void vmstate_register_ram(MemoryRegion *mr, DeviceState *dev) { - qemu_ram_set_idstr(memory_region_get_ram_addr(mr), + qemu_ram_set_idstr(memory_region_get_ram_addr(mr) & TARGET_PAGE_MASK, memory_region_name(mr), dev); } diff --git a/target-ppc/kvm.c b/target-ppc/kvm.c index 9b2e605b67..ce8ac5b4de 100644 --- a/target-ppc/kvm.c +++ b/target-ppc/kvm.c @@ -822,7 +822,8 @@ off_t kvmppc_alloc_rma(const char *name, MemoryRegion *sysmem) }; rma_region = g_new(MemoryRegion, 1); - memory_region_init_ram_ptr(rma_region, NULL, name, size, rma); + memory_region_init_ram_ptr(rma_region, name, size, rma); + vmstate_register_ram_global(rma_region); memory_region_add_subregion(sysmem, 0, rma_region); return size; |