summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorPeter Maydell <peter.maydell@linaro.org>2020-03-16 14:55:59 +0000
committerPeter Maydell <peter.maydell@linaro.org>2020-03-16 14:55:59 +0000
commita98135f727595382e200d04c2996e868b7925a01 (patch)
tree5c1a5d485161942607c9d271c1d32aa8ef9d4aae
parent509f61798b5d1056dfbcbbc64a7c2998740f10d6 (diff)
parentf872c76296b991fde4db5fb87a1cfbd8d4c22c88 (diff)
downloadfocaccia-qemu-a98135f727595382e200d04c2996e868b7925a01.tar.gz
focaccia-qemu-a98135f727595382e200d04c2996e868b7925a01.zip
Merge remote-tracking branch 'remotes/kraxel/tags/vga-20200316-pull-request' into staging
vga: stdvga/bochs mmio fix.

# gpg: Signature made Mon 16 Mar 2020 12:48:10 GMT
# gpg:                using RSA key 4CB6D8EED3E87138
# gpg: Good signature from "Gerd Hoffmann (work) <kraxel@redhat.com>" [full]
# gpg:                 aka "Gerd Hoffmann <gerd@kraxel.org>" [full]
# gpg:                 aka "Gerd Hoffmann (private) <kraxel@gmail.com>" [full]
# Primary key fingerprint: A032 8CFF B93A 17A7 9901  FE7D 4CB6 D8EE D3E8 7138

* remotes/kraxel/tags/vga-20200316-pull-request:
  stdvga+bochs-display: add dummy mmio handler

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
-rw-r--r--hw/display/bochs-display.c4
-rw-r--r--hw/display/vga-pci.c8
2 files changed, 6 insertions, 6 deletions
diff --git a/hw/display/bochs-display.c b/hw/display/bochs-display.c
index 62085f9fc0..70eb619ef4 100644
--- a/hw/display/bochs-display.c
+++ b/hw/display/bochs-display.c
@@ -284,8 +284,8 @@ static void bochs_display_realize(PCIDevice *dev, Error **errp)
     memory_region_init_io(&s->qext, obj, &bochs_display_qext_ops, s,
                           "qemu extended regs", PCI_VGA_QEXT_SIZE);
 
-    memory_region_init(&s->mmio, obj, "bochs-display-mmio",
-                       PCI_VGA_MMIO_SIZE);
+    memory_region_init_io(&s->mmio, obj, &unassigned_io_ops, NULL,
+                          "bochs-display-mmio", PCI_VGA_MMIO_SIZE);
     memory_region_add_subregion(&s->mmio, PCI_VGA_BOCHS_OFFSET, &s->vbe);
     memory_region_add_subregion(&s->mmio, PCI_VGA_QEXT_OFFSET, &s->qext);
 
diff --git a/hw/display/vga-pci.c b/hw/display/vga-pci.c
index b346324673..6b9db86e36 100644
--- a/hw/display/vga-pci.c
+++ b/hw/display/vga-pci.c
@@ -249,8 +249,8 @@ static void pci_std_vga_realize(PCIDevice *dev, Error **errp)
 
     /* mmio bar for vga register access */
     if (d->flags & (1 << PCI_VGA_FLAG_ENABLE_MMIO)) {
-        memory_region_init(&d->mmio, NULL, "vga.mmio",
-                           PCI_VGA_MMIO_SIZE);
+        memory_region_init_io(&d->mmio, OBJECT(dev), &unassigned_io_ops, NULL,
+                              "vga.mmio", PCI_VGA_MMIO_SIZE);
 
         if (d->flags & (1 << PCI_VGA_FLAG_ENABLE_QEXT)) {
             qext = true;
@@ -285,8 +285,8 @@ static void pci_secondary_vga_realize(PCIDevice *dev, Error **errp)
     s->con = graphic_console_init(DEVICE(dev), 0, s->hw_ops, s);
 
     /* mmio bar */
-    memory_region_init(&d->mmio, OBJECT(dev), "vga.mmio",
-                       PCI_VGA_MMIO_SIZE);
+    memory_region_init_io(&d->mmio, OBJECT(dev), &unassigned_io_ops, NULL,
+                          "vga.mmio", PCI_VGA_MMIO_SIZE);
 
     if (d->flags & (1 << PCI_VGA_FLAG_ENABLE_QEXT)) {
         qext = true;