]> git.proxmox.com Git - qemu.git/commitdiff
acpi: add dummy write function for acpi timer
authorGerd Hoffmann <kraxel@redhat.com>
Tue, 14 May 2013 12:29:04 +0000 (14:29 +0200)
committerAnthony Liguori <aliguori@us.ibm.com>
Tue, 14 May 2013 13:53:09 +0000 (08:53 -0500)
Otherwise the guest can crash qemu (NULL pointer dereference).

https://bugzilla.redhat.com/show_bug.cgi?id=947691

Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Reviewed-by: Laszlo Ersek <lersek@redhat.com>
Message-id: 1368534544-11826-1-git-send-email-kraxel@redhat.com
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
hw/acpi/core.c

index 64b871846d4cb824f97a934f64b6e9af1381ec19..42eeace6f601545465e9cb7c8b5e9dca2c35f7ce 100644 (file)
@@ -462,8 +462,15 @@ static uint64_t acpi_pm_tmr_read(void *opaque, hwaddr addr, unsigned width)
     return acpi_pm_tmr_get(opaque);
 }
 
+static void acpi_pm_tmr_write(void *opaque, hwaddr addr, uint64_t val,
+                              unsigned width)
+{
+    /* nothing */
+}
+
 static const MemoryRegionOps acpi_pm_tmr_ops = {
     .read = acpi_pm_tmr_read,
+    .write = acpi_pm_tmr_write,
     .valid.min_access_size = 4,
     .valid.max_access_size = 4,
     .endianness = DEVICE_LITTLE_ENDIAN,