Received: from eggs.gnu.org ([2001:4830:134:3::10]:53417) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Xz8KQ-0003Bm-7P for qemu-devel@nongnu.org; Thu, 11 Dec 2014 13:19:10 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Xz8KL-0003dB-Du for qemu-devel@nongnu.org; Thu, 11 Dec 2014 13:19:06 -0500 Received: from mail-wg0-x22e.google.com ([2a00:1450:400c:c00::22e]:42972) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Xz8KL-0003d5-3X for qemu-devel@nongnu.org; Thu, 11 Dec 2014 13:19:01 -0500 Received: by mail-wg0-f46.google.com with SMTP id x13so7243246wgg.33 for ; Thu, 11 Dec 2014 10:19:00 -0800 (PST) Sender: Paolo Bonzini From: Paolo Bonzini Date: Thu, 11 Dec 2014 19:18:48 +0100 Message-Id: <1418321931-12648-1-git-send-email-pbonzini@redhat.com> Subject: [Qemu-devel] [PATCH 0/3] serial: fixes for migration List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: imammedo@redhat.com, andrey@xdel.ru, dgilbert@redhat.com, batuzovk@ispras.ru While adding migration support for thr_ipending, I and Pavel chose the default value of thr_ipending (absent the subsection) according to what should be the common behavior of the serial device and its drivers. However, the condition did not actually match the common state of the serial device because of emulation inaccuracies. Thus the subsection is almost always transmitted, which breaks migration from 2.2 to 2.1. Patch 3 fixes these inaccuracies, but unmasks a missed interrupt bug that upsets Windows. In order to keep bisectability, that missed interrupt is first fixed in patch 2. And to close the circle, patch 1 cleans up more code that didn't match the datasheet too well (and was also unnecessarily complicated); that was the first, unfruitful attempt to fix the bug. Datasheet available at http://www.ti.com/lit/ds/symlink/pc16550d.pdf Paolo Bonzini (3): serial: fix THRE/TEMT handling serial: update LSR on enabling/disabling FIFOs serial: do not trigger THR interrupt after writing to IER hw/char/serial.c | 34 ++++++++++++++++------------------ 1 file changed, 16 insertions(+), 18 deletions(-) -- 1.8.3.1