From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:57194) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Tj6BG-0000WZ-1K for qemu-devel@nongnu.org; Thu, 13 Dec 2012 05:38:23 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Tj6BE-0001Ok-1H for qemu-devel@nongnu.org; Thu, 13 Dec 2012 05:38:17 -0500 Received: from mx1.redhat.com ([209.132.183.28]:65166) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Tj6BA-0001Nh-08 for qemu-devel@nongnu.org; Thu, 13 Dec 2012 05:38:15 -0500 Received: from int-mx02.intmail.prod.int.phx2.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id qBDAcApc019787 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Thu, 13 Dec 2012 05:38:10 -0500 From: Amit Shah Date: Thu, 13 Dec 2012 16:07:52 +0530 Message-Id: Subject: [Qemu-devel] [PATCH 0/4] virtio-serial: Rework, fix post_load code List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Alon Levy Cc: Amit Shah , qemu list This series reworks the post_load code recently introduced to allocate the structures only when required (i.e. only at load time). This helps keep the VirtIOSerial struct clean, and use less RAM. Also rearrange the code in virtio_serial_load() for easier readability. Patch 4 fixes a race with the timer going off after a device got hot-unplugged, and patch 1 uses unsigned int (uint32_t) type to count ports, as in the rest of the code. Please review. Amit Shah (4): virtio-serial: use uint32_t to count ports virtio-serial: move active ports loading to separate function virtio-serial: allocate post_load only at load-time virtio-serial: delete timer if active during exit hw/virtio-serial-bus.c | 150 +++++++++++++++++++++++++++++-------------------- 1 file changed, 89 insertions(+), 61 deletions(-) -- 1.8.0.2