qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] paravirtual mouse/tablet


From: Anthony Liguori
Subject: Re: [Qemu-devel] paravirtual mouse/tablet
Date: Thu, 13 Jan 2011 10:43:52 -0600
User-agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.1.15) Gecko/20101027 Lightning/1.0b1 Thunderbird/3.0.10

On 01/13/2011 10:18 AM, Avi Kivity wrote:
On 01/13/2011 12:19 PM, Gerd Hoffmann wrote:
  Hi,

Just throwing a quick writeup into the ring to kickstart the design discussion ;)


typedef struct qemu_pvtablet_message {
     uint32_t size;            /* whole message size */
     uint32_t type;            /* qemu_pvtablet_type */
     uint64_t tv_secs;
     uint64_t tv_usecs;

time relative to what base?

can we actually provide it? if the tablet is remote, there may not be a synchronized time source.

I had the same thought, but if it's just treated as time since the init message, the guest is capable of working it out (minus drift).

     union {
         qemu_pvtablet_position position;
         qemu_pvtablet_button   button;
         qemu_pvtablet_display  display;
     } m;
} qemu_pvtablet_message;


So the message size for a qemu_pvtablet_position would only include the position member?

I didn't comment on this because I was treating this as a protocol proposal and not actual code but usually the following is clearer:

struct qemu_pvtablet_hdr {
    uint32_t size;
    uint32_t type;
    uint64_t tv_secs;
    uint64_t tv_usecs;
};

struct qemu_pvtablet_position {
    struct qemu_pvtablet_hdr hdr;
    uint32_t x;
    uint32_t y;
};

union qemu_pvtablet_message {
    struct qemu_pvtablet_hdr hdr;
    struct qemu_pvtablet_position position;
    ...
};

Regards,

Anthony Liguori



reply via email to

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