From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:43010) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UIFjw-0005q9-M1 for qemu-devel@nongnu.org; Wed, 20 Mar 2013 05:55:26 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UIFjr-00026F-5m for qemu-devel@nongnu.org; Wed, 20 Mar 2013 05:55:24 -0400 Received: from mx1.redhat.com ([209.132.183.28]:30869) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UIFjq-00025n-Ub for qemu-devel@nongnu.org; Wed, 20 Mar 2013 05:55:19 -0400 From: Alon Levy Date: Wed, 20 Mar 2013 11:55:10 +0200 Message-Id: <1363773314-32332-1-git-send-email-alevy@redhat.com> Subject: [Qemu-devel] [PATCH v2 0/4] for spice post load char device hook List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: amit.shah@redhat.com, hdegoede@redhat.com, aliguori@us.ibm.com, kraxel@redhat.com This reworks my former patch (http://patchwork.ozlabs.org/patch/227678/ - sorry Hans, can't find the version you posted) per Gerd's suggestion. Specifically it adds a new qemu_chr_fe_post_load api that is called by the front end and implemented by the backend. virtio-console implements it, adding it's own hook which is called by virtio-serial-bus upon post_load from the timer, so that qemu_chr_fe_post_load is called when the vm is already in the running state. This makes the spice-qemu-char usage very simple by not requiring yet another timer. Note about the added api: I decided to pass "connected" via qemu_chr_fe_post_load in order not to introduce more api on qemu_chr_fe_.. for state querying, like qemu_chr_fe_is_connected, since I'm not sure it would make sense for other frontends. v1 wasn't completely sent to the list, mistakenly sent before squashing one patch. Alon Levy (4): char: add a post_load callback virtio-serial: add a post_load callback implemented by port virtio-console: implement post_load to call to qemu_chr_fe_post_load spice-qemu-char: register interface on post load hw/virtio-console.c | 11 +++++++++++ hw/virtio-serial-bus.c | 5 +++++ hw/virtio-serial.h | 2 ++ include/char/char.h | 12 ++++++++++++ qemu-char.c | 7 +++++++ spice-qemu-char.c | 9 +++++++++ 6 files changed, 46 insertions(+) -- 1.8.1.4