From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:35449) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TOUru-0008GV-F6 for qemu-devel@nongnu.org; Wed, 17 Oct 2012 10:45:20 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TOUrp-0005LC-SC for qemu-devel@nongnu.org; Wed, 17 Oct 2012 10:45:10 -0400 Received: from e36.co.us.ibm.com ([32.97.110.154]:44972) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TOUrp-0005IS-Mz for qemu-devel@nongnu.org; Wed, 17 Oct 2012 10:45:05 -0400 Received: from /spool/local by e36.co.us.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Wed, 17 Oct 2012 08:45:04 -0600 Received: from d03relay02.boulder.ibm.com (d03relay02.boulder.ibm.com [9.17.195.227]) by d03dlp03.boulder.ibm.com (Postfix) with ESMTP id 4CE0E19D8053 for ; Wed, 17 Oct 2012 08:45:00 -0600 (MDT) Received: from d03av03.boulder.ibm.com (d03av03.boulder.ibm.com [9.17.195.169]) by d03relay02.boulder.ibm.com (8.13.8/8.13.8/NCO v10.0) with ESMTP id q9HEioMi228680 for ; Wed, 17 Oct 2012 08:44:52 -0600 Received: from d03av03.boulder.ibm.com (loopback [127.0.0.1]) by d03av03.boulder.ibm.com (8.14.4/8.13.1/NCO v10.0 AVout) with ESMTP id q9HEieBv026973 for ; Wed, 17 Oct 2012 08:44:41 -0600 From: Anthony Liguori In-Reply-To: <507E675A.3040509@redhat.com> References: <1350329657-18665-1-git-send-email-aliguori@us.ibm.com> <507E675A.3040509@redhat.com> Date: Wed, 17 Oct 2012 09:44:34 -0500 Message-ID: <87ehkxtay5.fsf@codemonkey.ws> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Subject: Re: [Qemu-devel] [RFC PATCH 0/6] chardev: convert to QOM List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Gerd Hoffmann Cc: Paolo Bonzini , qemu-devel@nongnu.org, Andreas Faerber Gerd Hoffmann writes: > Hi, > >> 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. > > Do you have a git tree with this series + qom-create to look at and play > with? https://github.com/aliguori/qemu/tree/chardev-qom.1 I haven't tried the qom-new command from Markus but I've also included the -object option that I posted a while ago. That seems to work. Here's an example command line: $ x86_64-softmmu/qemu-system-x86_64 \ -object chardev-file,path=foo.txt,label=chr0,id=chr0,realized=on \ -device isa-serial,index=0,chardev=chr0 -hda ~/images/linux.img \ -snapshot -enable-kvm A couple caveats: - The label/id duplication is ugly. The need to use label disappears though once we switch devices over to using links. - Some error checking is needed to deal with trying to use an unrealized chardev. - It may still make sense to have a chardev-add operation but I think that operation should work in terms of something like qom-new. Probably with some special casing to fix the container path to /backends/chardev and also to deal with automatically setting label based on id. It may make sense to also always set realized explicitly to 'on' in chardev-add. Regards, Anthony Liguori > > thanks, > Gerd