[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PULL 130/136] hw/block/onenand: Let devices own the MemoryRegion they c
From: |
Paolo Bonzini |
Subject: |
[PULL 130/136] hw/block/onenand: Let devices own the MemoryRegion they create |
Date: |
Tue, 25 Feb 2020 13:07:28 +0100 |
From: Philippe Mathieu-Daudé <address@hidden>
Avoid orphan memory regions being added in the /unattached QOM
container.
Note this change break the migration of the nSeries machines.
Signed-off-by: Philippe Mathieu-Daudé <address@hidden>
Message-Id: <address@hidden>
Supersedes: <address@hidden>
---
hw/block/onenand.c | 7 +++----
1 file changed, 3 insertions(+), 4 deletions(-)
diff --git a/hw/block/onenand.c b/hw/block/onenand.c
index 898ac56..f49db0b 100644
--- a/hw/block/onenand.c
+++ b/hw/block/onenand.c
@@ -173,8 +173,8 @@ static int onenand_post_load(void *opaque, int version_id)
static const VMStateDescription vmstate_onenand = {
.name = "onenand",
- .version_id = 1,
- .minimum_version_id = 1,
+ .version_id = 2,
+ .minimum_version_id = 2,
.pre_save = onenand_pre_save,
.post_load = onenand_post_load,
.fields = (VMStateField[]) {
@@ -809,9 +809,8 @@ static void onenand_realize(DeviceState *dev, Error **errp)
}
s->otp = memset(g_malloc((64 + 2) << PAGE_SHIFT),
0xff, (64 + 2) << PAGE_SHIFT);
- memory_region_init_ram_nomigrate(&s->ram, OBJECT(s), "onenand.ram",
+ memory_region_init_ram(&s->ram, OBJECT(s), "onenand.ram",
0xc000 << s->shift, &error_fatal);
- vmstate_register_ram_global(&s->ram);
ram = memory_region_get_ram_ptr(&s->ram);
s->boot[0] = ram + (0x0000 << s->shift);
s->boot[1] = ram + (0x8000 << s->shift);
--
1.8.3.1
- [PULL 118/136] scripts/cocci: Patch to remove unnecessary memory_region_set_readonly(), (continued)
- [PULL 118/136] scripts/cocci: Patch to remove unnecessary memory_region_set_readonly(), Paolo Bonzini, 2020/02/25
- [PULL 119/136] hw/arm: Remove unnecessary memory_region_set_readonly() on ROM alias, Paolo Bonzini, 2020/02/25
- [PULL 122/136] hw/char: Let devices own the MemoryRegion they create, Paolo Bonzini, 2020/02/25
- [PULL 123/136] hw/core: Let devices own the MemoryRegion they create, Paolo Bonzini, 2020/02/25
- [PULL 124/136] hw/display: Let devices own the MemoryRegion they create, Paolo Bonzini, 2020/02/25
- [PULL 115/136] hw/ppc/ppc405: Use memory_region_init_rom() with read-only regions, Paolo Bonzini, 2020/02/25
- [PULL 121/136] hw/arm: Let devices own the MemoryRegion they create, Paolo Bonzini, 2020/02/25
- [PULL 127/136] hw/input/milkymist-softusb: Remove unused 'pmem_ptr' field, Paolo Bonzini, 2020/02/25
- [PULL 126/136] hw/riscv: Let devices own the MemoryRegion they create, Paolo Bonzini, 2020/02/25
- [PULL 128/136] hw/input/milkymist-softusb: Let devices own the MemoryRegion they create, Paolo Bonzini, 2020/02/25
- [PULL 130/136] hw/block/onenand: Let devices own the MemoryRegion they create,
Paolo Bonzini <=
- [PULL 131/136] memory: batch allocate ioeventfds[] in address_space_update_ioeventfds(), Paolo Bonzini, 2020/02/25
- [PULL 135/136] accel/kvm: Check ioctl(KVM_SET_USER_MEMORY_REGION) return value, Paolo Bonzini, 2020/02/25
- [PULL 136/136] WHPX: Assigning maintainer for Windows Hypervisor Platform, Paolo Bonzini, 2020/02/25
- [PULL 120/136] scripts/cocci: Patch to let devices own their MemoryRegions, Paolo Bonzini, 2020/02/25
- [PULL 125/136] hw/dma: Let devices own the MemoryRegion they create, Paolo Bonzini, 2020/02/25
- [PULL 133/136] qdev-monitor: Forbid repeated device_del, Paolo Bonzini, 2020/02/25
- [PULL 129/136] hw/net/milkymist-minimac2: Let devices own the MemoryRegion they create, Paolo Bonzini, 2020/02/25
- [PULL 134/136] target/i386: check for empty register in FXAM, Paolo Bonzini, 2020/02/25
- [PULL 132/136] mem-prealloc: optimize large guest startup, Paolo Bonzini, 2020/02/25
- Re: [PULL 000/136] Misc patches for 2020-02-25 (refactoring and Coccinelle edition), Aleksandar Markovic, 2020/02/26