[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[RFC PATCH RESEND v2 31/32] hw/net/milkymist-minimac2: Let devices own t
From: |
Philippe Mathieu-Daudé |
Subject: |
[RFC PATCH RESEND v2 31/32] hw/net/milkymist-minimac2: Let devices own the MemoryRegion they create |
Date: |
Mon, 24 Feb 2020 21:55:32 +0100 |
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>
---
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 1ba01754ee..9582b5f8a3 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),
--
2.21.1
- [PATCH RESEND v2 21/32] hw/arm: Remove unnecessary memory_region_set_readonly() on ROM alias, (continued)
- [PATCH RESEND v2 21/32] hw/arm: Remove unnecessary memory_region_set_readonly() on ROM alias, Philippe Mathieu-Daudé, 2020/02/24
- [PATCH RESEND v2 22/32] scripts/cocci: Patch to let devices own their MemoryRegions, Philippe Mathieu-Daudé, 2020/02/24
- [PATCH RESEND v2 23/32] hw/arm: Let devices own the MemoryRegion they create, Philippe Mathieu-Daudé, 2020/02/24
- [PATCH RESEND v2 24/32] hw/char: Let devices own the MemoryRegion they create, Philippe Mathieu-Daudé, 2020/02/24
- [PATCH RESEND v2 25/32] hw/core: Let devices own the MemoryRegion they create, Philippe Mathieu-Daudé, 2020/02/24
- [PATCH RESEND v2 26/32] hw/display: Let devices own the MemoryRegion they create, Philippe Mathieu-Daudé, 2020/02/24
- [PATCH RESEND v2 27/32] hw/dma: Let devices own the MemoryRegion they create, Philippe Mathieu-Daudé, 2020/02/24
- [PATCH RESEND v2 28/32] hw/riscv: Let devices own the MemoryRegion they create, Philippe Mathieu-Daudé, 2020/02/24
- [PATCH RESEND v2 29/32] hw/input/milkymist-softusb: Remove unused 'pmem_ptr' field, Philippe Mathieu-Daudé, 2020/02/24
- [RFC PATCH RESEND v2 30/32] hw/input/milkymist-softusb: Let devices own the MemoryRegion they create, Philippe Mathieu-Daudé, 2020/02/24
- [RFC PATCH RESEND v2 31/32] hw/net/milkymist-minimac2: Let devices own the MemoryRegion they create,
Philippe Mathieu-Daudé <=
- [RFC PATCH RESEND v2 32/32] hw/block/onenand: Let devices own the MemoryRegion they create, Philippe Mathieu-Daudé, 2020/02/24