From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:55268) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XcYIX-0007l0-0w for qemu-devel@nongnu.org; Fri, 10 Oct 2014 07:23:55 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XcYIQ-0005GH-Ja for qemu-devel@nongnu.org; Fri, 10 Oct 2014 07:23:48 -0400 Received: from mail-lb0-f172.google.com ([209.85.217.172]:47590) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XcYIQ-0005G2-Db for qemu-devel@nongnu.org; Fri, 10 Oct 2014 07:23:42 -0400 Received: by mail-lb0-f172.google.com with SMTP id b6so2878430lbj.17 for ; Fri, 10 Oct 2014 04:23:41 -0700 (PDT) MIME-Version: 1.0 In-Reply-To: <20141010111918.GE16326@grmbl.mre> References: <87fvexfq4n.fsf@blackfin.pond.sub.org> <20141009121714.GA22195@grmbl.mre> <20141010111918.GE16326@grmbl.mre> From: Peter Maydell Date: Fri, 10 Oct 2014 12:23:21 +0100 Message-ID: Content-Type: text/plain; charset=UTF-8 Subject: Re: [Qemu-devel] [PATCH v2 1/1] virtio: serial: expose a 'guest_writable' callback for users List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Amit Shah Cc: marcandre.lureau@redhat.com, Amos Kong , Markus Armbruster , qemu list On 10 October 2014 12:19, Amit Shah wrote: > On (Thu) 09 Oct 2014 [14:04:53], Peter Maydell wrote: >> What I would like to see in this patch is a comment giving >> much clearer definition of the semantics of the guest_writable >> call: for instance, is it always called when the guest is >> writable, or is it only guaranteed to be called if the >> QEMU backend has previously tried to do virtio_serial_write >> and got back a return code indicating an incomplete write? > > Right now it's called always; if it's necessary to only call after an > incomplete / failed write, we just need to implement that (and also > add that state to the migration data). > > I have no preference; just depends on the users of the API. Called-always makes sense; I'd just like to see the semantics documented so you don't have to read the whole implementation of virtio to figure out what they are :-) -- PMM