Received: from eggs.gnu.org ([2001:4830:134:3::10]:58633) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aLX3D-00077G-Kd for qemu-devel@nongnu.org; Tue, 19 Jan 2016 09:14:37 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aLX39-00064e-IR for qemu-devel@nongnu.org; Tue, 19 Jan 2016 09:14:27 -0500 Received: from mx1.redhat.com ([209.132.183.28]:58512) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aLX39-00064U-DE for qemu-devel@nongnu.org; Tue, 19 Jan 2016 09:14:23 -0500 Received: from int-mx09.intmail.prod.int.phx2.redhat.com (int-mx09.intmail.prod.int.phx2.redhat.com [10.5.11.22]) by mx1.redhat.com (Postfix) with ESMTPS id 026667AEA2 for ; Tue, 19 Jan 2016 14:14:22 +0000 (UTC) Message-ID: <1453212861.18326.97.camel@redhat.com> From: Gerd Hoffmann Date: Tue, 19 Jan 2016 15:14:21 +0100 In-Reply-To: <20160119133832.GG2398@work-vm> References: <1453110880.23289.7.camel@redhat.com> <569D4C69.5070304@redhat.com> <1453208507.18326.77.camel@redhat.com> <20160119133832.GG2398@work-vm> Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Mime-Version: 1.0 Subject: Re: [Qemu-devel] RFC: running the user interface in a thread ... List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: "Dr. David Alan Gilbert" Cc: David Airlie , qemu-devel , =?ISO-8859-1?Q?Marc-Andr=E9?= Lureau Hi, > That does feel safer, if you can find an efficient way to do the graphics= . > A lot less code running with the privs of the qemu process. That is where it starts to become tricky ... On modern linux we can simply use dma-bufs. On older linux and generic posix (*bsd etc) we should be able to use sysv shared memory. As MacOS X is based on BSD I'd expect sysv shared memory is available there too. Possibly we can use something more efficient there, we have macos-specific ui code anyway. Windows? Hmm, no idea how to shared memory there. We also need a control channel, to manage the shm bufs, to send user input (kbd/mouse), to implement some control things (machine menu in gtk ui). One option would be to simply use the monitor for that. The other one is to invent something limited to the stuff actually needed instead of handing over a dangerous swiss army knife to the process running the UI. Hmm, maybe a new monitor mode with a limited set of commands would do too. cheers, Gerd