From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:49680) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UcEo2-00032P-Hr for qemu-devel@nongnu.org; Tue, 14 May 2013 08:58:18 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UcEZU-0002ed-9O for qemu-devel@nongnu.org; Tue, 14 May 2013 08:43:21 -0400 Received: from mx1.redhat.com ([209.132.183.28]:35892) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UcEZT-0002e1-QR for qemu-devel@nongnu.org; Tue, 14 May 2013 08:43:12 -0400 Received: from int-mx09.intmail.prod.int.phx2.redhat.com (int-mx09.intmail.prod.int.phx2.redhat.com [10.5.11.22]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id r4EChAvB030659 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Tue, 14 May 2013 08:43:11 -0400 Message-ID: <519231EA.3060202@redhat.com> Date: Tue, 14 May 2013 14:45:30 +0200 From: Laszlo Ersek MIME-Version: 1.0 References: <1368534544-11826-1-git-send-email-kraxel@redhat.com> In-Reply-To: <1368534544-11826-1-git-send-email-kraxel@redhat.com> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [RESEND PATCH for-1.5] acpi: add dummy write function for acpi timer List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Gerd Hoffmann Cc: qemu-devel@nongnu.org, "Michael S. Tsirkin" On 05/14/13 14:29, Gerd Hoffmann wrote: > Otherwise the guest can crash qemu (NULL pointer dereference). > > https://bugzilla.redhat.com/show_bug.cgi?id=947691 > > Signed-off-by: Gerd Hoffmann > --- > hw/acpi/core.c | 7 +++++++ > 1 file changed, 7 insertions(+) > > diff --git a/hw/acpi/core.c b/hw/acpi/core.c > index 64b8718..42eeace 100644 > --- a/hw/acpi/core.c > +++ b/hw/acpi/core.c > @@ -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, > (Hopefully the low-hanging fruit impression it makes is not a trap!) Reviewed-by: Laszlo Ersek