diff options
author | Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk> | 2021-10-07 23:12:45 +0100 |
---|---|---|
committer | Laurent Vivier <laurent@vivier.eu> | 2021-10-08 13:31:03 +0200 |
commit | 3b10b5673c902981129d1817fcc235e467648200 (patch) | |
tree | 5c358d8ec81cb5b58b1f73dc3eb91508bcf311e2 /hw | |
parent | 14d0ddfce781374b7ce40062c0afc2ed00419267 (diff) | |
download | qemu-3b10b5673c902981129d1817fcc235e467648200.zip qemu-3b10b5673c902981129d1817fcc235e467648200.tar.gz qemu-3b10b5673c902981129d1817fcc235e467648200.tar.bz2 |
macfb: use memory_region_init_ram() in macfb_common_realize() for the framebuffer
Currently macfb_common_realize() defines the framebuffer RAM memory region as
being non-migrateable but then immediately registers it for migration. Replace
memory_region_init_ram_nomigrate() with memory_region_init_ram() which is clearer
and does exactly the same thing.
Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
Reviewed-by: BALATON Zoltan <balaton@eik.bme.hu>
Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Reviewed-by: Laurent Vivier <laurent@vivier.eu>
Message-Id: <20211007221253.29024-6-mark.cave-ayland@ilande.co.uk>
Signed-off-by: Laurent Vivier <laurent@vivier.eu>
Diffstat (limited to 'hw')
-rw-r--r-- | hw/display/macfb.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/hw/display/macfb.c b/hw/display/macfb.c index 39dab49..f88f5a6 100644 --- a/hw/display/macfb.c +++ b/hw/display/macfb.c @@ -367,11 +367,10 @@ static bool macfb_common_realize(DeviceState *dev, MacfbState *s, Error **errp) memory_region_init_io(&s->mem_ctrl, OBJECT(dev), &macfb_ctrl_ops, s, "macfb-ctrl", 0x1000); - memory_region_init_ram_nomigrate(&s->mem_vram, OBJECT(dev), "macfb-vram", - MACFB_VRAM_SIZE, &error_abort); + memory_region_init_ram(&s->mem_vram, OBJECT(dev), "macfb-vram", + MACFB_VRAM_SIZE, &error_abort); s->vram = memory_region_get_ram_ptr(&s->mem_vram); s->vram_bit_mask = MACFB_VRAM_SIZE - 1; - vmstate_register_ram(&s->mem_vram, dev); memory_region_set_coalescing(&s->mem_vram); return true; |