qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [RFC] hw/qxl: inject interrupts in any state


From: Gerd Hoffmann
Subject: Re: [Qemu-devel] [RFC] hw/qxl: inject interrupts in any state
Date: Thu, 01 Nov 2012 11:33:49 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:10.0.10) Gecko/20121026 Thunderbird/10.0.10

  Hi,

>     This prevents a known abort on set_client_capabilities, that should be
>     fixed in upstream, but it should also be checked against in qxl. Checks
>     every other location that qxl_send_events is eventually possibly called

Why check in all callers instead of qxl_send_events directly?

Just print the warning about the spice server bug & possibly lost events
and go on.  With luck the event arrives nevertheless.  And if not we at
least sayed before it can happen ;)

> +static void spice_server_bug(PCIQXLDevice *qxl, const char *msg, ...)
> +{
> +    va_list ap;
> +    va_start(ap, msg);
> +    fprintf(stderr, "qxl-%d: spice-server bug: ", qxl->id);
> +    vfprintf(stderr, msg, ap);
> +    fprintf(stderr, "\n");
> +    va_end(ap);
> +}
> +
> +#define SPICE_SERVER_BUG_ONCE(qxl, msg, ...) {      \
> +    static int called;                              \
> +    if (!called) {                                  \
> +        called = 1;                                 \
> +        spice_server_bug(qxl, msg, __VA_ARGS__);    \
> +    }                                               \
> +}

That feels a bit like overkill too.

cheers,
  Gerd




reply via email to

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