From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:50553) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XYrII-0007O4-Gs for qemu-devel@nongnu.org; Tue, 30 Sep 2014 02:52:24 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XYrI9-0000OP-BV for qemu-devel@nongnu.org; Tue, 30 Sep 2014 02:52:18 -0400 Received: from mx1.redhat.com ([209.132.183.28]:52834) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XYrI9-0000N7-4b for qemu-devel@nongnu.org; Tue, 30 Sep 2014 02:52:09 -0400 Received: from int-mx11.intmail.prod.int.phx2.redhat.com (int-mx11.intmail.prod.int.phx2.redhat.com [10.5.11.24]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id s8U6q3Gf007814 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL) for ; Tue, 30 Sep 2014 02:52:03 -0400 Message-ID: <1412059874.23471.2.camel@nilsson.home.kraxel.org> From: Gerd Hoffmann In-Reply-To: <20140929193045.GA30934@amt.cnet> References: <20140929185610.GA28309@amt.cnet> <5429AF2C.7000001@redhat.com> <20140929193045.GA30934@amt.cnet> Content-Type: text/plain; charset="UTF-8" Date: Tue, 30 Sep 2014 08:51:14 +0200 Mime-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH v3] add input-send-event command List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Marcelo Tosatti Cc: Amos Kong , qemu-devel Hi, > > 'console' is mandatory; I guess that's okay. > > > > Are we guaranteed that either all events are sent? Or is there a need to > > Events can be dropped at hardware level if the event queue is full, for > example. Would have to modify individual drivers to return error codes, > i suppose. Gerd? Events can be dropped at hardware level indeed. Hard to check beforehand, and we don't even return errors today as the ui code (which would see the error) can't do much about it. Not sure this is worth changing, this usually only happens in case the guest has trouble driving the device, in which case you have bigger problems anyway. Events can also be dropped because there is no device they can be delivered to. This can easily be checked for the whole event list before you start sending the events, just call qemu_input_find_handler() and see whenever it returns a handler or not. So we can go for a "all-or-nothing" model here. In the x86 world this can happen with absolute mouse moves only because there is always a ps2 kbd+mouse. cheers, Gerd