Received: from eggs.gnu.org ([2001:4830:134:3::10]:42878) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YJ0LH-0008Pq-LT for qemu-devel@nongnu.org; Wed, 04 Feb 2015 08:50:08 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YJ0LC-0004Nm-Ni for qemu-devel@nongnu.org; Wed, 04 Feb 2015 08:50:07 -0500 Received: from mx1.redhat.com ([209.132.183.28]:36421) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YJ0LC-0004II-Fp for qemu-devel@nongnu.org; Wed, 04 Feb 2015 08:50:02 -0500 Received: from int-mx13.intmail.prod.int.phx2.redhat.com (int-mx13.intmail.prod.int.phx2.redhat.com [10.5.11.26]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id t14Do0vP009543 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL) for ; Wed, 4 Feb 2015 08:50:01 -0500 From: Markus Armbruster References: <20150204113229.GN3032@redhat.com> <54D213E0.8090408@redhat.com> <20150204130041.GQ3032@redhat.com> Date: Wed, 04 Feb 2015 14:49:58 +0100 In-Reply-To: <20150204130041.GQ3032@redhat.com> (Daniel P. Berrange's message of "Wed, 4 Feb 2015 13:00:41 +0000") Message-ID: <87egq5kcqh.fsf@blackfin.pond.sub.org> MIME-Version: 1.0 Content-Type: text/plain Subject: Re: [Qemu-devel] RFC: Universal encryption on QEMU I/O channels List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: "Daniel P. Berrange" Cc: Paolo Bonzini , qemu-devel@nongnu.org "Daniel P. Berrange" writes: > On Wed, Feb 04, 2015 at 01:43:12PM +0100, Paolo Bonzini wrote: >> >> >> On 04/02/2015 12:32, Daniel P. Berrange wrote: >> > So my idea would be that we define a QEMUChannel object and set of APIs to >> > standardize all interaction with sockets, pipes, RDMA, whatever $channel, >> > and then convert the QEMU features I've mentioned over to use that. I think >> > that would be simpler than trying to untangle QEMUFile code from migration >> > and then extend its features. >> >> Could it be GIOChannel simply? >> >> 1) Chardev is already mostly a wrapper around GIOChannel >> >> 2) NBD and VNC could be converted to GIOChannel with relative ease >> >> 3) migration is more complicated because (unlike everything else) it >> uses a separate thread and blocking sockets, but you could probably >> write a GIOChannel-based implementation of QEMUFile. > > It might be possible to base it on GIOChannel, but IIRC some of the > migration code was using iovecs for I/O and GIOChannel API doesn't > allow for that. So you'd have to sacrifice performance by issuing a > separate syscall for each iovec element which seems sucky to me. > If you think that's an acceptable limitation though, I could certainly > explore use of GIOChannel. > > More broadly speaking GIOChannel has fallen out of favour in the > glib ecosystem, with most apps/libraries more focused on use of > the GIO APIs instead, but IIUC QEMU avoids use of the GIO library > due to need to support older glib versions. Remind me: what GLib version are we targeting, and why? [...]