Received: from eggs.gnu.org ([208.118.235.92]:56101) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TNqQv-0004Tb-BX for qemu-devel@nongnu.org; Mon, 15 Oct 2012 15:34:38 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TNqQu-0001Ks-80 for qemu-devel@nongnu.org; Mon, 15 Oct 2012 15:34:37 -0400 Received: from e28smtp07.in.ibm.com ([122.248.162.7]:60588) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TNqQt-0001K6-LH for qemu-devel@nongnu.org; Mon, 15 Oct 2012 15:34:36 -0400 Received: from /spool/local by e28smtp07.in.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Tue, 16 Oct 2012 01:04:26 +0530 Received: from d28av03.in.ibm.com (d28av03.in.ibm.com [9.184.220.65]) by d28relay02.in.ibm.com (8.13.8/8.13.8/NCO v10.0) with ESMTP id q9FJYM6836896840 for ; Tue, 16 Oct 2012 01:04:24 +0530 Received: from d28av03.in.ibm.com (loopback [127.0.0.1]) by d28av03.in.ibm.com (8.14.4/8.13.1/NCO v10.0 AVout) with ESMTP id q9FJYMXI002231 for ; Tue, 16 Oct 2012 06:34:22 +1100 From: Anthony Liguori Date: Mon, 15 Oct 2012 14:34:11 -0500 Message-Id: <1350329657-18665-1-git-send-email-aliguori@us.ibm.com> Subject: [Qemu-devel] [RFC PATCH 0/6] chardev: convert to QOM List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: Paolo Bonzini , Gerd Hoffmann , Andreas Faerber Hi, This has long been on my TODO list. I wanted to put this forward since Gerd has a chardev hotplug series. I think there are a few good reasons to go the QOM route here. Most notably: 1) the conversion cleans up all of the printfs into proper error messages 2) it becomes possible to introspect available character device types 3) it becomes possible (albeit a little awkward) to programmatically query options for a type There are quite a few things missing from this RFC although I think it can all be done incrementally. The continued items are: A) Replace chardev properties in devices with links B) Finish converting all usage of QemuOpts into proper properties C) Use class methods instead of function pointers in objects D) General cleanups I think the main decision point here is whether we introduce a separate chardev_add/chardev_del command or just use the qom-create command that has been posted previously. Please note, a few of these patches have long lines from a combination of code motion and automated conversion via macros.