qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH qemu 3/6] virtio-input: core code & base class


From: Gerd Hoffmann
Subject: Re: [Qemu-devel] [PATCH qemu 3/6] virtio-input: core code & base class
Date: Thu, 10 Apr 2014 14:22:17 +0200

On Do, 2014-04-10 at 14:06 +0300, Michael S. Tsirkin wrote:
> > +void virtio_input_send(VirtIOInput *vinput, virtio_input_event
> *event)
> > +{
> > +    VirtQueueElement elem;
> > +    int len;
> > +
> > +    if (!virtqueue_pop(vinput->evt, &elem)) {
> > +        fprintf(stderr, "%s: virtqueue empty, dropping event\n",
> __func__);
> > +        return;
> 
> Looks scary.
> 

It's not different from other input devices.  No buffer space -> drop
event.  What else do you think should happen?  We could signal "you lost
events" to the guest, but I suspect that buys us nothing.  Other input
devices don't have that capability, so guests are likely not prepared to
handle the situation.  Also, there isn't much they can actually do about
it.

cheers,
  Gerd





reply via email to

[Prev in Thread] Current Thread [Next in Thread]