From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:60200) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1a9GZg-00018i-9M for qemu-devel@nongnu.org; Wed, 16 Dec 2015 13:13:17 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1a9GZd-0000rr-2y for qemu-devel@nongnu.org; Wed, 16 Dec 2015 13:13:16 -0500 Received: from mx1.redhat.com ([209.132.183.28]:56061) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1a9GZc-0000rn-TY for qemu-devel@nongnu.org; Wed, 16 Dec 2015 13:13:13 -0500 Received: from int-mx10.intmail.prod.int.phx2.redhat.com (int-mx10.intmail.prod.int.phx2.redhat.com [10.5.11.23]) by mx1.redhat.com (Postfix) with ESMTPS id 9300B8F512 for ; Wed, 16 Dec 2015 18:13:12 +0000 (UTC) References: <1450288571-5939-1-git-send-email-berrange@redhat.com> From: Paolo Bonzini Message-ID: <5671A9B4.4010004@redhat.com> Date: Wed, 16 Dec 2015 19:13:08 +0100 MIME-Version: 1.0 In-Reply-To: <1450288571-5939-1-git-send-email-berrange@redhat.com> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH RFC] qemu-char: add an "overlay" backend type List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: "Daniel P. Berrange" , qemu-devel@nongnu.org On 16/12/2015 18:56, Daniel P. Berrange wrote: > Introduce a new QEMU chardev backend called "overlay" which > allows you to splice together a pair of chardev backends into > one combined backend. The master backend permits full input/output > but the slave backend is output only. > > The primary use case for this is to allow arbitrary backends to > have their data logged to a file, eg a 'file' backend would be > setup as the slave. > > $ qemu-system-x86_64 \ > -chardev socket,host=localhost,port=9000,server=on,nowait,id=char0master \ > -chardev file,path=/some/log/file.log,id=char0slave \ > -chardev overlay,id=char0,master=char0master,slave=char0slave \ > -device isa-serial,chardev=char0 \ > ...other args... > --- > > This idea was suggsted in > > https://lists.gnu.org/archive/html/qemu-devel/2015-12/msg01256.html > > this patch is a very quick proof of concept impl to illustrate the > idea. Hmm, I was a fan of the "do it outside QEMU" idea... It would also fix the issue you have with qemu_chr_fe_write_all... Paolo