--- qemu-3.0.0/hw/input/virtio-input-host.c.old 2018-08-14 19:10:34.000000000 +0000 +++ qemu-3.0.0/hw/input/virtio-input-host.c 2020-01-24 06:12:08.788062930 +0000 @@ -193,13 +193,16 @@ { VirtIOInputHost *vih = VIRTIO_INPUT_HOST(vinput); struct input_event evdev; + struct timeval tv; int rc; - if (gettimeofday(&evdev.time, NULL)) { + if (gettimeofday(&tv, NULL)) { perror("virtio_input_host_handle_status: gettimeofday"); return; } + evdev.input_event_sec = tv.tv_sec; + evdev.input_event_usec = tv.tv_usec; evdev.type = le16_to_cpu(event->type); evdev.code = le16_to_cpu(event->code); evdev.value = le32_to_cpu(event->value);