Received: from eggs.gnu.org ([2001:4830:134:3::10]:45563) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YxuOr-0006lo-0N for qemu-devel@nongnu.org; Thu, 28 May 2015 05:46:56 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YxuOo-0008Q5-8O for qemu-devel@nongnu.org; Thu, 28 May 2015 05:46:52 -0400 Received: from mx1.redhat.com ([209.132.183.28]:37920) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YxuOo-0008PQ-2o for qemu-devel@nongnu.org; Thu, 28 May 2015 05:46:50 -0400 From: Gerd Hoffmann Date: Thu, 28 May 2015 11:46:32 +0200 Message-Id: <1432806398-1261-1-git-send-email-kraxel@redhat.com> Subject: [Qemu-devel] [PATCH v4 0/6] virtio: add input device List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: Cornelia Huck , Gerd Hoffmann , mst@redhat.com Hi, This patch series adds virtio input devices. It's basically sending linux evdev events over virtio. There is support for emulated hid devices (i.e. send usual input to virtio device instead of usb or ps2 device). For v4 I've splitted the patches, so virtio-*-device and virtio-*-pci are added by separate patches. I've also left out pass-through for now. So, patches 1-3 implement the actual devices, and they should be ready to merge. They apply cleanly to master and build just fine with a minor fixup (s/64/32/ for virtio_input_get_features). I plan to send out a pull request for them soon. Patches 4-6 carry the virtio-pci support code. They have a dependency on the virtio-1 branch (from mst or cordula), because I want them be non-transitional devices. The device has been designed with virtio-1 in mind, where virtio-pci config space moves from io to mmio, so having a bit larger config space isn't a big issue. Not sure how to proceed best with patches 4-6. I don't feel like making them transitional devices, but missing qemu 2.4 because virtio-pci isn't ready for virtio 1.0 doesn't look nice either :( Guest driver: Present in linux kernel 4.1-rc1 & newer. Specification (slightly outdated, latest changes from kernel driver review not added yet): https://www.kraxel.org/cgit/virtio-spec/log/?h=virtio-input https://www.kraxel.org/virtio/virtio-v1.0-csprd03-virtio-input.html#x1-2640007 Gerd Hoffmann (6): virtio-input: add linux/input.h virtio-input: core code & base class [device] virtio-input: emulated devices [device] pci: add PCI_CLASS_INPUT_* virtio-input: core code & base class [pci] virtio-input: emulated devices [pci] hw/input/Makefile.objs | 5 + hw/input/virtio-input-hid.c | 502 +++++++++++++ hw/input/virtio-input.c | 282 ++++++++ hw/virtio/virtio-pci.c | 120 ++++ hw/virtio/virtio-pci.h | 27 + include/hw/pci/pci_ids.h | 7 + include/hw/virtio/virtio-input.h | 105 +++ include/hw/virtio/virtio.h | 1 + include/standard-headers/linux/input.h | 1198 ++++++++++++++++++++++++++++++++ scripts/update-linux-headers.sh | 4 +- 10 files changed, 2250 insertions(+), 1 deletion(-) create mode 100644 hw/input/virtio-input-hid.c create mode 100644 hw/input/virtio-input.c create mode 100644 include/hw/virtio/virtio-input.h create mode 100644 include/standard-headers/linux/input.h -- 1.8.3.1