[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PULL 129/136] hw/net/milkymist-minimac2: Let devices own the MemoryRegi
From: |
Paolo Bonzini |
Subject: |
[PULL 129/136] hw/net/milkymist-minimac2: Let devices own the MemoryRegion they create |
Date: |
Tue, 25 Feb 2020 13:07:27 +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 LM32 milkymist machine.
Signed-off-by: Philippe Mathieu-Daudé <address@hidden>
Message-Id: <address@hidden>
Supersedes: <address@hidden>
---
hw/net/milkymist-minimac2.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/hw/net/milkymist-minimac2.c b/hw/net/milkymist-minimac2.c
index 1ba0175..9582b5f 100644
--- a/hw/net/milkymist-minimac2.c
+++ b/hw/net/milkymist-minimac2.c
@@ -473,9 +473,9 @@ static void milkymist_minimac2_realize(DeviceState *dev,
Error **errp)
sysbus_init_mmio(sbd, &s->regs_region);
/* register buffers memory */
- memory_region_init_ram_nomigrate(&s->buffers, OBJECT(dev),
"milkymist-minimac2.buffers",
+ memory_region_init_ram(&s->buffers, OBJECT(dev),
+ "milkymist-minimac2.buffers",
buffers_size, &error_fatal);
- vmstate_register_ram_global(&s->buffers);
s->rx0_buf = memory_region_get_ram_ptr(&s->buffers);
s->rx1_buf = s->rx0_buf + MINIMAC2_BUFFER_SIZE;
s->tx_buf = s->rx1_buf + MINIMAC2_BUFFER_SIZE;
@@ -506,8 +506,8 @@ static const VMStateDescription
vmstate_milkymist_minimac2_mdio = {
static const VMStateDescription vmstate_milkymist_minimac2 = {
.name = "milkymist-minimac2",
- .version_id = 1,
- .minimum_version_id = 1,
+ .version_id = 2,
+ .minimum_version_id = 2,
.fields = (VMStateField[]) {
VMSTATE_UINT32_ARRAY(regs, MilkymistMinimac2State, R_MAX),
VMSTATE_UINT16_ARRAY(phy_regs, MilkymistMinimac2State, R_PHY_MAX),
--
1.8.3.1
- [PULL 127/136] hw/input/milkymist-softusb: Remove unused 'pmem_ptr' field, (continued)
- [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, 2020/02/25
- [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 <=
- [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