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