aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPeter Maydell <peter.maydell@linaro.org>2017-07-07 15:42:56 +0100
committerPeter Maydell <peter.maydell@linaro.org>2017-07-14 17:59:42 +0100
commitce66d778cd7d2dc446b3676d32a70c38a07de554 (patch)
tree9e3be5f6882660b857da108e4f8f2ce383feeba6
parentfefa92565f9a032dce974a0a6e1f296d449498f3 (diff)
hw/display/qxl.c Use memory_region_init_ram()
Switch to memory_region_init_ram(), since we pass the same DeviceState to both memory_region_init_ram_nomigrate() and vmstate_register_ram(). Signed-off-by: Peter Maydell <peter.maydell@linaro.org> Reviewed-by: Paolo Bonzini <pbonzini@redhat.com> Message-id: 1499438577-7674-11-git-send-email-peter.maydell@linaro.org
-rw-r--r--hw/display/qxl.c9
1 files changed, 3 insertions, 6 deletions
diff --git a/hw/display/qxl.c b/hw/display/qxl.c
index 40e9372dc8..7f8c73b56d 100644
--- a/hw/display/qxl.c
+++ b/hw/display/qxl.c
@@ -2089,16 +2089,14 @@ static void qxl_realize_common(PCIQXLDevice *qxl, Error **errp)
pci_set_byte(&config[PCI_INTERRUPT_PIN], 1);
qxl->rom_size = qxl_rom_size();
- memory_region_init_ram_nomigrate(&qxl->rom_bar, OBJECT(qxl), "qxl.vrom",
+ memory_region_init_ram(&qxl->rom_bar, OBJECT(qxl), "qxl.vrom",
qxl->rom_size, &error_fatal);
- vmstate_register_ram(&qxl->rom_bar, &qxl->pci.qdev);
init_qxl_rom(qxl);
init_qxl_ram(qxl);
qxl->guest_surfaces.cmds = g_new0(QXLPHYSICAL, qxl->ssd.num_surfaces);
- memory_region_init_ram_nomigrate(&qxl->vram_bar, OBJECT(qxl), "qxl.vram",
+ memory_region_init_ram(&qxl->vram_bar, OBJECT(qxl), "qxl.vram",
qxl->vram_size, &error_fatal);
- vmstate_register_ram(&qxl->vram_bar, &qxl->pci.qdev);
memory_region_init_alias(&qxl->vram32_bar, OBJECT(qxl), "qxl.vram32",
&qxl->vram_bar, 0, qxl->vram32_size);
@@ -2198,9 +2196,8 @@ static void qxl_realize_secondary(PCIDevice *dev, Error **errp)
qxl->id = device_id++;
qxl_init_ramsize(qxl);
- memory_region_init_ram_nomigrate(&qxl->vga.vram, OBJECT(dev), "qxl.vgavram",
+ memory_region_init_ram(&qxl->vga.vram, OBJECT(dev), "qxl.vgavram",
qxl->vga.vram_size, &error_fatal);
- vmstate_register_ram(&qxl->vga.vram, &qxl->pci.qdev);
qxl->vga.vram_ptr = memory_region_get_ram_ptr(&qxl->vga.vram);
qxl->vga.con = graphic_console_init(DEVICE(dev), 0, &qxl_ops, qxl);