Skip to contentSkip to conversation

Input 20190510 patches

GIT PULL Gerd Hoffmann 2 participants 11 messages May 10, 2019 – May 13, 2019 Kbuild

lore
Share & tools
lore
#0 lore raw

The following changes since commit 812b835fb4d23dd108b2f9802158472d50b73579:

Merge remote-tracking branch 'remotes/maxreitz/tags/pull-block-2019-05-07' into staging (2019-05-09 16:31:12 +0100)

are available in the Git repository at:

git://git.kraxel.org/qemu tags/input-20190510-pull-request

for you to fetch changes up to 7fb6e5a839bc625fd64c32d167f231ecd6f2b3e2:

virtio-input: fix Kconfig dependency and Makefile (2019-05-10 14:54:11 +0200)

----------------------------------------------------------------
input: add vhost-user-input, virtio-input fixes.

----------------------------------------------------------------

Gerd Hoffmann (2):
virtio-input-host-pci: cleanup types
virtio-input: fix Kconfig dependency and Makefile

Marc-André Lureau (6):
libvhost-user: fix -Waddress-of-packed-member
libvhost-user: add PROTOCOL_F_CONFIG if {set, get}_config Add vhost-user-backend
Add vhost-user-input-pci
util: simplify unix_listen()
contrib: add vhost-user-input

 Makefile                               |  11 +
 Makefile.objs                          |   1 +
 include/hw/virtio/virtio-input.h       |  14 +
 include/sysemu/vhost-user-backend.h    |  57 ++++
 backends/vhost-user.c                  | 209 +++++++++++++
 contrib/libvhost-user/libvhost-user.c  |  10 +-
 contrib/vhost-user-input/main.c        | 393 +++++++++++++++++++++++++
 hw/input/vhost-user-input.c            | 129 ++++++++
 hw/virtio/vhost-user-input-pci.c       |  50 ++++
 hw/virtio/virtio-input-host-pci.c      |   7 +-
 util/qemu-sockets.c                    |  18 +-
 MAINTAINERS                            |   4 +
 backends/Makefile.objs                 |   2 +
 contrib/vhost-user-input/Makefile.objs |   1 +
 hw/input/Kconfig                       |   7 +-
 hw/input/Makefile.objs                 |   5 +-
 hw/virtio/Makefile.objs                |   1 +
 17 files changed, 891 insertions(+), 28 deletions(-)
 create mode 100644 include/sysemu/vhost-user-backend.h
 create mode 100644 backends/vhost-user.c
 create mode 100644 contrib/vhost-user-input/main.c
 create mode 100644 hw/input/vhost-user-input.c
 create mode 100644 hw/virtio/vhost-user-input-pci.c
 create mode 100644 contrib/vhost-user-input/Makefile.objs
Signature · 1 line
2.18.1
#1 lore raw

[Qemu-devel] [PULL 1/8] libvhost-user: fix -Waddress-of-packed-member

From: Marc-André Lureau <[email protected]>

/home/elmarco/src/qemu/contrib/libvhost-user/libvhost-user.c: In function ‘vu_set_mem_table_exec_postcopy’:
/home/elmarco/src/qemu/contrib/libvhost-user/libvhost-user.c:546:31: warning: taking address of packed member of ‘struct VhostUserMsg’ may result in an unaligned pointer value [-Waddress-of-packed-member]

  546 |     VhostUserMemory *memory = &vmsg->payload.memory;
      |                               ^~~~~~~~~~~~~~~~~~~~~
/home/elmarco/src/qemu/contrib/libvhost-user/libvhost-user.c: In function ‘vu_set_mem_table_exec’:
/home/elmarco/src/qemu/contrib/libvhost-user/libvhost-user.c:688:31: warning: taking address of packed member of ‘struct VhostUserMsg’ may result in an unaligned pointer value [-Waddress-of-packed-member]
  688 |     VhostUserMemory *memory = &vmsg->payload.memory;
      |                               ^~~~~~~~~~~~~~~~~~~~~
/home/elmarco/src/qemu/contrib/libvhost-user/libvhost-user.c: In function ‘vu_set_vring_addr_exec’:
/home/elmarco/src/qemu/contrib/libvhost-user/libvhost-user.c:817:36: warning: taking address of packed member of ‘struct VhostUserMsg’ may result in an unaligned pointer value [-Waddress-of-packed-member]
  817 |     struct vhost_vring_addr *vra = &vmsg->payload.addr;
      |                                    ^~~~~~~~~~~~~~~~~~~

Message-id: [email protected]

---
 contrib/libvhost-user/libvhost-user.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
contrib/libvhost-user/libvhost-user.c +3 -3
index e08d6c7b9741..dcf4a969f238 100644
@@ -542,7 +542,7 @@ static bool
 vu_set_mem_table_exec_postcopy(VuDev *dev, VhostUserMsg *vmsg)
 {
     int i;
-    VhostUserMemory *memory = &vmsg->payload.memory;
+    VhostUserMemory m = vmsg->payload.memory, *memory = &m;
     dev->nregions = memory->nregions;
 
     DPRINT("Nregions: %d\n", memory->nregions);
@@ -684,7 +684,7 @@ static bool
 vu_set_mem_table_exec(VuDev *dev, VhostUserMsg *vmsg)
 {
     int i;
-    VhostUserMemory *memory = &vmsg->payload.memory;
+    VhostUserMemory m = vmsg->payload.memory, *memory = &m;
 
     for (i = 0; i < dev->nregions; i++) {
         VuDevRegion *r = &dev->regions[i];
@@ -813,7 +813,7 @@ vu_set_vring_num_exec(VuDev *dev, VhostUserMsg *vmsg)
 static bool
 vu_set_vring_addr_exec(VuDev *dev, VhostUserMsg *vmsg)
 {
-    struct vhost_vring_addr *vra = &vmsg->payload.addr;
+    struct vhost_vring_addr addr = vmsg->payload.addr, *vra = &addr;
     unsigned int index = vra->index;
     VuVirtq *vq = &dev->vq[index];
 
Signature · 1 line
2.18.1
#2 lore raw

[Qemu-devel] [PULL 2/8] libvhost-user: add PROTOCOL_F_CONFIG if {set, get}_config

In reply to Gerd Hoffmann

From: Marc-André Lureau <[email protected]>

Add the config protocol feature bit if the set_config & get_config callbacks are implemented.

Message-id: [email protected]

---
 contrib/libvhost-user/libvhost-user.c | 4 ++++
 1 file changed, 4 insertions(+)
contrib/libvhost-user/libvhost-user.c +4 -0
index dcf4a969f238..74d42177c5c8 100644
@@ -1157,6 +1157,10 @@ vu_get_protocol_features_exec(VuDev *dev, VhostUserMsg *vmsg)
         features |= 1ULL << VHOST_USER_PROTOCOL_F_PAGEFAULT;
     }
 
+    if (dev->iface->get_config && dev->iface->set_config) {
+        features |= 1ULL << VHOST_USER_PROTOCOL_F_CONFIG;
+    }
+
     if (dev->iface->get_protocol_features) {
         features |= dev->iface->get_protocol_features(dev);
     }
Signature · 1 line
2.18.1
#3 lore raw

[Qemu-devel] [PULL 5/8] util: simplify unix_listen()

In reply to Gerd Hoffmann

From: Marc-André Lureau <[email protected]>

The only caller of unix_listen() left is qga/channel-posix.c.

There is no need to deal with legacy coma-trailing options ",...".

Message-id: [email protected]

---
 util/qemu-sockets.c | 18 ++----------------
 1 file changed, 2 insertions(+), 16 deletions(-)
util/qemu-sockets.c +2 -16
index ba6335e71a95..8850a280a84b 100644
@@ -970,26 +970,12 @@ static int unix_connect_saddr(UnixSocketAddress *saddr, Error **errp)
 /* compatibility wrapper */
 int unix_listen(const char *str, Error **errp)
 {
-    char *path, *optstr;
-    int sock, len;
     UnixSocketAddress *saddr;
+    int sock;
 
     saddr = g_new0(UnixSocketAddress, 1);
-
-    optstr = strchr(str, ',');
-    if (optstr) {
-        len = optstr - str;
-        if (len) {
-            path = g_malloc(len+1);
-            snprintf(path, len+1, "%.*s", len, str);
-            saddr->path = path;
-        }
-    } else {
-        saddr->path = g_strdup(str);
-    }
-
+    saddr->path = g_strdup(str);
     sock = unix_listen_saddr(saddr, errp);
-
     qapi_free_UnixSocketAddress(saddr);
     return sock;
 }
Signature · 1 line
2.18.1
#4 lore raw

[Qemu-devel] [PULL 3/8] Add vhost-user-backend

In reply to Gerd Hoffmann

From: Marc-André Lureau <[email protected]>

Create a vhost-user-backend object that holds a connection to a vhost-user backend (or "slave" process) and can be referenced from virtio devices that support it. See later patches for input & gpu usage.

Note: a previous iteration of this object made it user-creatable, and allowed managed sub-process spawning, but that has been dropped for now.

Message-id: [email protected]

---
 include/sysemu/vhost-user-backend.h |  57 ++++++++
 backends/vhost-user.c               | 209 ++++++++++++++++++++++++++++
 MAINTAINERS                         |   2 +
 backends/Makefile.objs              |   2 +
 4 files changed, 270 insertions(+)
 create mode 100644 include/sysemu/vhost-user-backend.h
 create mode 100644 backends/vhost-user.c
include/sysemu/vhost-user-backend.h new file +57 -0
new file mode 100644
index 000000000000..9abf8f06a1b9
@@ -0,0 +1,57 @@
+/*
+ * QEMU vhost-user backend
+ *
+ * Copyright (C) 2018 Red Hat Inc
+ *
+ * Authors:
+ *  Marc-André Lureau <[email protected]>
+ *
+ * This work is licensed under the terms of the GNU GPL, version 2 or later.
+ * See the COPYING file in the top-level directory.
+ */
+#ifndef QEMU_VHOST_USER_BACKEND_H
+#define QEMU_VHOST_USER_BACKEND_H
+
+#include "qom/object.h"
+#include "exec/memory.h"
+#include "qemu/option.h"
+#include "qemu/bitmap.h"
+#include "hw/virtio/vhost.h"
+#include "hw/virtio/vhost-user.h"
+#include "chardev/char-fe.h"
+#include "io/channel.h"
+
+#define TYPE_VHOST_USER_BACKEND "vhost-user-backend"
+#define VHOST_USER_BACKEND(obj) \
+    OBJECT_CHECK(VhostUserBackend, (obj), TYPE_VHOST_USER_BACKEND)
+#define VHOST_USER_BACKEND_GET_CLASS(obj) \
+    OBJECT_GET_CLASS(VhostUserBackendClass, (obj), TYPE_VHOST_USER_BACKEND)
+#define VHOST_USER_BACKEND_CLASS(klass) \
+    OBJECT_CLASS_CHECK(VhostUserBackendClass, (klass), TYPE_VHOST_USER_BACKEND)
+
+typedef struct VhostUserBackend VhostUserBackend;
+typedef struct VhostUserBackendClass VhostUserBackendClass;
+
+struct VhostUserBackendClass {
+    ObjectClass parent_class;
+};
+
+struct VhostUserBackend {
+    /* private */
+    Object parent;
+
+    char *chr_name;
+    CharBackend chr;
+    VhostUserState vhost_user;
+    struct vhost_dev dev;
+    VirtIODevice *vdev;
+    bool started;
+    bool completed;
+};
+
+int vhost_user_backend_dev_init(VhostUserBackend *b, VirtIODevice *vdev,
+                                unsigned nvqs, Error **errp);
+void vhost_user_backend_start(VhostUserBackend *b);
+void vhost_user_backend_stop(VhostUserBackend *b);
+
+#endif
backends/vhost-user.c new file +209 -0

209 lines not on this page · raw message

MAINTAINERS +2 -0
index 66ddbda9c958..2e40390ebcdb 100644
@@ -1478,6 +1478,8 @@ F: hw/*/*vhost*
 F: docs/interop/vhost-user.json
 F: docs/interop/vhost-user.txt
 F: contrib/vhost-user-*/
+F: backends/vhost-user.c
+F: include/sysemu/vhost-user-backend.h
 
 virtio
 M: Michael S. Tsirkin <[email protected]>
backends/Makefile.objs +2 -0
index ff619d31b461..981e8e122f2c 100644
@@ -14,4 +14,6 @@ common-obj-y += cryptodev-vhost.o
 common-obj-$(CONFIG_VHOST_CRYPTO) += cryptodev-vhost-user.o
 endif
 
+common-obj-$(call land,$(CONFIG_VHOST_USER),$(CONFIG_VIRTIO)) += vhost-user.o
+
 common-obj-$(CONFIG_LINUX) += hostmem-memfd.o
Signature · 1 line
2.18.1
#5 lore raw

[Qemu-devel] [PULL 7/8] virtio-input-host-pci: cleanup types

In reply to Gerd Hoffmann

virtio input is virtio-1.0 only, so we don't need the -transitional and -non-transitional variants.

Message-id: [email protected]

---
 hw/virtio/virtio-input-host-pci.c | 7 ++-----
 1 file changed, 2 insertions(+), 5 deletions(-)
hw/virtio/virtio-input-host-pci.c +2 -5
index 725a51ad30b4..124c4f344742 100644
@@ -13,7 +13,7 @@
 
 typedef struct VirtIOInputHostPCI VirtIOInputHostPCI;
 
-#define TYPE_VIRTIO_INPUT_HOST_PCI "virtio-input-host-pci-base"
+#define TYPE_VIRTIO_INPUT_HOST_PCI "virtio-input-host-pci"
 #define VIRTIO_INPUT_HOST_PCI(obj) \
         OBJECT_CHECK(VirtIOInputHostPCI, (obj), TYPE_VIRTIO_INPUT_HOST_PCI)
 
@@ -31,10 +31,7 @@ static void virtio_host_initfn(Object *obj)
 }
 
 static const VirtioPCIDeviceTypeInfo virtio_input_host_pci_info = {
-    .base_name             = TYPE_VIRTIO_INPUT_HOST_PCI,
-    .generic_name          = "virtio-input-host-pci",
-    .transitional_name     = "virtio-input-host-pci-transitional",
-    .non_transitional_name = "virtio-input-host-pci-non-transitional",
+    .generic_name  = TYPE_VIRTIO_INPUT_HOST_PCI,
     .parent        = TYPE_VIRTIO_INPUT_PCI,
     .instance_size = sizeof(VirtIOInputHostPCI),
     .instance_init = virtio_host_initfn,
Signature · 1 line
2.18.1
#6 lore raw

[Qemu-devel] [PULL 4/8] Add vhost-user-input-pci

In reply to Gerd Hoffmann

From: Marc-André Lureau <[email protected]>

Add a new virtio-input device, which connects to a vhost-user backend.

Instead of reading configuration directly from an input device / evdev (like virtio-input-host), it reads it over vhost-user protocol with {SET,GET}_CONFIG messages. The vhost-user-backend handles the queues & events setup.

Message-id: [email protected]

[ kraxel: drop -{non-,}transitional variants ]
[ kraxel: fix "make check" on !linux ]

---
 include/hw/virtio/virtio-input.h |  14 ++++
 hw/input/vhost-user-input.c      | 129 +++++++++++++++++++++++++++++++
 hw/virtio/vhost-user-input-pci.c |  50 ++++++++++++
 MAINTAINERS                      |   1 +
 hw/input/Kconfig                 |   5 ++
 hw/input/Makefile.objs           |   1 +
 hw/virtio/Makefile.objs          |   1 +
 7 files changed, 201 insertions(+)
 create mode 100644 hw/input/vhost-user-input.c
 create mode 100644 hw/virtio/vhost-user-input-pci.c
include/hw/virtio/virtio-input.h +14 -0
index 054c38836f11..4fca03e7969e 100644
@@ -2,6 +2,7 @@
 #define QEMU_VIRTIO_INPUT_H
 
 #include "ui/input.h"
+#include "sysemu/vhost-user-backend.h"
 
 /* ----------------------------------------------------------------- */
 /* virtio input protocol                                             */
@@ -42,11 +43,18 @@ typedef struct virtio_input_event virtio_input_event;
 #define VIRTIO_INPUT_HOST_GET_PARENT_CLASS(obj) \
         OBJECT_GET_PARENT_CLASS(obj, TYPE_VIRTIO_INPUT_HOST)
 
+#define TYPE_VHOST_USER_INPUT   "vhost-user-input"
+#define VHOST_USER_INPUT(obj)                              \
+    OBJECT_CHECK(VHostUserInput, (obj), TYPE_VHOST_USER_INPUT)
+#define VHOST_USER_INPUT_GET_PARENT_CLASS(obj)             \
+    OBJECT_GET_PARENT_CLASS(obj, TYPE_VHOST_USER_INPUT)
+
 typedef struct VirtIOInput VirtIOInput;
 typedef struct VirtIOInputClass VirtIOInputClass;
 typedef struct VirtIOInputConfig VirtIOInputConfig;
 typedef struct VirtIOInputHID VirtIOInputHID;
 typedef struct VirtIOInputHost VirtIOInputHost;
+typedef struct VHostUserInput VHostUserInput;
 
 struct VirtIOInputConfig {
     virtio_input_config               config;
@@ -98,6 +106,12 @@ struct VirtIOInputHost {
     int                               fd;
 };
 
+struct VHostUserInput {
+    VirtIOInput                       parent_obj;
+
+    VhostUserBackend                  *vhost;
+};
+
 void virtio_input_send(VirtIOInput *vinput, virtio_input_event *event);
 void virtio_input_init_config(VirtIOInput *vinput,
                               virtio_input_config *config);
hw/input/vhost-user-input.c new file +129 -0

129 lines not on this page · raw message

hw/virtio/vhost-user-input-pci.c new file +50 -0

50 lines not on this page · raw message

MAINTAINERS +1 -0
index 2e40390ebcdb..6d4a10b3903f 100644
@@ -1521,6 +1521,7 @@ L: [email protected]
 virtio-input
 M: Gerd Hoffmann <[email protected]>
 S: Maintained
+F: hw/input/vhost-user-input.c
 F: hw/input/virtio-input*.c
 F: include/hw/virtio/virtio-input.h
 
hw/input/Kconfig +5 -0
index e2e66f085862..50e55e353847 100644
@@ -29,5 +29,10 @@ config VIRTIO_INPUT_HOST
     default y
     depends on VIRTIO && LINUX
 
+config VHOST_USER_INPUT
+    bool
+    default y
+    depends on VIRTIO_INPUT && VHOST_USER
+
 config TSC210X
     bool
hw/input/Makefile.objs +1 -0
index c8b00f71ec50..3eddf00f2bba 100644
@@ -12,6 +12,7 @@ common-obj-$(CONFIG_VIRTIO_INPUT) += virtio-input-hid.o
 ifeq ($(CONFIG_LINUX),y)
 common-obj-$(CONFIG_VIRTIO_INPUT) += virtio-input-host.o
 endif
+common-obj-$(CONFIG_VHOST_USER_INPUT) += vhost-user-input.o
 
 obj-$(CONFIG_MILKYMIST) += milkymist-softusb.o
 obj-$(CONFIG_PXA2XX) += pxa2xx_keypad.o
hw/virtio/Makefile.objs +1 -0
index f2ab667a2118..5570ea8df805 100644
@@ -17,6 +17,7 @@ obj-$(CONFIG_VHOST_VSOCK) += vhost-vsock.o
 ifeq ($(CONFIG_VIRTIO_PCI),y)
 obj-$(CONFIG_VHOST_VSOCK) += vhost-vsock-pci.o
 obj-$(CONFIG_VHOST_USER_BLK) += vhost-user-blk-pci.o
+obj-$(CONFIG_VHOST_USER_INPUT) += vhost-user-input-pci.o
 obj-$(CONFIG_VHOST_USER_SCSI) += vhost-user-scsi-pci.o
 obj-$(CONFIG_VHOST_SCSI) += vhost-scsi-pci.o
 obj-$(CONFIG_VIRTIO_INPUT_HOST) += virtio-input-host-pci.o
Signature · 1 line
2.18.1
#7 lore raw

[Qemu-devel] [PULL 6/8] contrib: add vhost-user-input

In reply to Gerd Hoffmann

From: Marc-André Lureau <[email protected]>

Add a vhost-user input backend example, based on virtio-input-host device. It takes an evdev path as argument, and can be associated with a vhost-user-input device via a UNIX socket:

$ vhost-user-input -p /dev/input/eventX -s /tmp/vui.sock
$ qemu ... -chardev socket,id=vuic,path=/tmp/vui.sock
  -device vhost-user-input-pci,chardev=vuic

This example is intentionally not included in $TOOLS, and not installed by default.

Message-id: [email protected]

---
 Makefile                               |  11 +
 Makefile.objs                          |   1 +
 contrib/vhost-user-input/main.c        | 393 +++++++++++++++++++++++++
 MAINTAINERS                            |   1 +
 contrib/vhost-user-input/Makefile.objs |   1 +
 5 files changed, 407 insertions(+)
 create mode 100644 contrib/vhost-user-input/main.c
 create mode 100644 contrib/vhost-user-input/Makefile.objs
Makefile +11 -0
index a971247cac81..bbfe894f22fc 100644
@@ -406,6 +406,7 @@ dummy := $(call unnest-vars,, \
                 libvhost-user-obj-y \
                 vhost-user-scsi-obj-y \
                 vhost-user-blk-obj-y \
+                vhost-user-input-obj-y \
                 qga-vss-dll-obj-y \
                 block-obj-y \
                 block-obj-m \
@@ -615,6 +616,16 @@ rdmacm-mux$(EXESUF): LIBS += "-libumad"
 rdmacm-mux$(EXESUF): $(rdmacm-mux-obj-y) $(COMMON_LDADDS)
 	$(call LINK, $^)
 
+ifdef CONFIG_VHOST_USER_INPUT
+ifdef CONFIG_LINUX
+vhost-user-input$(EXESUF): $(vhost-user-input-obj-y) libvhost-user.a libqemuutil.a
+	$(call LINK, $^)
+
+# build by default, do not install
+all: vhost-user-input$(EXESUF)
+endif
+endif
+
 module_block.h: $(SRC_PATH)/scripts/modules/module_block.py config-host.mak
 	$(call quiet-command,$(PYTHON) $< $@ \
 	$(addprefix $(SRC_PATH)/,$(patsubst %.mo,%.c,$(block-obj-m))), \
Makefile.objs +1 -0
index cf065de5ed44..27502b7df175 100644
@@ -122,6 +122,7 @@ vhost-user-scsi.o-libs := $(LIBISCSI_LIBS)
 vhost-user-scsi-obj-y = contrib/vhost-user-scsi/
 vhost-user-blk-obj-y = contrib/vhost-user-blk/
 rdmacm-mux-obj-y = contrib/rdmacm-mux/
+vhost-user-input-obj-y = contrib/vhost-user-input/
 
 ######################################################################
 trace-events-subdirs =
contrib/vhost-user-input/main.c new file +393 -0

393 lines not on this page · raw message

MAINTAINERS +1 -0
index 6d4a10b3903f..89c6d517ed26 100644
@@ -1524,6 +1524,7 @@ S: Maintained
 F: hw/input/vhost-user-input.c
 F: hw/input/virtio-input*.c
 F: include/hw/virtio/virtio-input.h
+F: contrib/vhost-user-input/*
 
 virtio-serial
 M: Amit Shah <[email protected]>
contrib/vhost-user-input/Makefile.objs new file +1 -0
new file mode 100644
index 000000000000..b1fad90d51b6
@@ -0,0 +1 @@
+vhost-user-input-obj-y = main.o
Signature · 1 line
2.18.1
#8 lore raw

[Qemu-devel] [PULL 8/8] virtio-input: fix Kconfig dependency and Makefile

In reply to Gerd Hoffmann

Make VIRTIO_INPUT_HOST depend on VIRTIO_INPUT.
Use CONFIG_VIRTIO_INPUT_HOST in Makefile.

Message-id: [email protected]

---
 hw/input/Kconfig       | 2 +-
 hw/input/Makefile.objs | 4 +---
 2 files changed, 2 insertions(+), 4 deletions(-)
hw/input/Kconfig +1 -1
index 50e55e353847..889363d8aef1 100644
@@ -27,7 +27,7 @@ config VIRTIO_INPUT
 config VIRTIO_INPUT_HOST
     bool
     default y
-    depends on VIRTIO && LINUX
+    depends on VIRTIO_INPUT && LINUX
 
 config VHOST_USER_INPUT
     bool
hw/input/Makefile.objs +1 -3
index 3eddf00f2bba..d1de30770854 100644
@@ -9,9 +9,7 @@ common-obj-$(CONFIG_TSC2005) += tsc2005.o
 
 common-obj-$(CONFIG_VIRTIO_INPUT) += virtio-input.o
 common-obj-$(CONFIG_VIRTIO_INPUT) += virtio-input-hid.o
-ifeq ($(CONFIG_LINUX),y)
-common-obj-$(CONFIG_VIRTIO_INPUT) += virtio-input-host.o
-endif
+common-obj-$(CONFIG_VIRTIO_INPUT_HOST) += virtio-input-host.o
 common-obj-$(CONFIG_VHOST_USER_INPUT) += vhost-user-input.o
 
 obj-$(CONFIG_MILKYMIST) += milkymist-softusb.o
Signature · 1 line
2.18.1
#9 lore raw
In reply to Gerd Hoffmann
Quoted 22 lines · Gerd Hoffmann

The following changes since commit 812b835fb4d23dd108b2f9802158472d50b73579:

Merge remote-tracking branch 'remotes/maxreitz/tags/pull-block-2019-05-07' into staging (2019-05-09 16:31:12 +0100)

are available in the Git repository at:

git://git.kraxel.org/qemu tags/input-20190510-pull-request

for you to fetch changes up to 7fb6e5a839bc625fd64c32d167f231ecd6f2b3e2:

virtio-input: fix Kconfig dependency and Makefile (2019-05-10 14:54:11 +0200)

----------------------------------------------------------------
input: add vhost-user-input, virtio-input fixes.

----------------------------------------------------------------

Gerd Hoffmann (2):
virtio-input-host-pci: cleanup types
virtio-input: fix Kconfig dependency and Makefile

Quoted 7 lines

Marc-André Lureau (6):
libvhost-user: fix -Waddress-of-packed-member
libvhost-user: add PROTOCOL_F_CONFIG if {set, get}_config Add vhost-user-backend
Add vhost-user-input-pci
util: simplify unix_listen()
contrib: add vhost-user-input

Hi; there are some compile failures here I'm afraid:

On ppc64:

/home/pm215/qemu/contrib/libvhost-user/libvhost-user.c: In function ‘vu_set_mem_table_exec_postcopy’:
/home/pm215/qemu/contrib/libvhost-user/libvhost-user.c:666:9: error:
format ‘%llx’ expects argument of type ‘long long unsigned int’, but argument 5 has type ‘__u64’ [-Werror=format=]
DPRINT("%s: region %d: Registered userfault for %llx + %llx\n", ^
/home/pm215/qemu/contrib/libvhost-user/libvhost-user.c:666:9: error:
format ‘%llx’ expects argument of type ‘long long unsigned int’, but argument 6 has type ‘__u64’ [-Werror=format=]
cc1: all warnings being treated as errors

On arm (and probably any 32-bit host):

/home/peter.maydell/qemu/contrib/libvhost-user/libvhost-user.c: In function 'vu_set_mem_table_exec_postcopy':
/home/peter.maydell/qemu/contrib/libvhost-user/libvhost-user.c:624:23:
error: cast to pointer from integer of different size [-Werror=int-to-pointer-cast]

         ret = madvise((void *)dev_region->mmap_addr,
                       ^
/home/peter.maydell/qemu/contrib/libvhost-user/libvhost-user.c:636:23:
error: cast to pointer from integer of different size
[-Werror=int-to-pointer-cast]
         ret = madvise((void *)dev_region->mmap_addr,
                       ^
/home/peter.maydell/qemu/contrib/libvhost-user/libvhost-user.c:669:22:
error: cast to pointer from integer of different size
[-Werror=int-to-pointer-cast]
         if (mprotect((void *)dev_region->mmap_addr,
                      ^

thanks
-- PMM

#10 lore raw
Quoted 23 lines

Hi; there are some compile failures here I'm afraid:

On ppc64:

/home/pm215/qemu/contrib/libvhost-user/libvhost-user.c: In function ‘vu_set_mem_table_exec_postcopy’:
/home/pm215/qemu/contrib/libvhost-user/libvhost-user.c:666:9: error:
format ‘%llx’ expects argument of type ‘long long unsigned int’, but argument 5 has type ‘__u64’ [-Werror=format=]
DPRINT("%s: region %d: Registered userfault for %llx + %llx\n", ^
/home/pm215/qemu/contrib/libvhost-user/libvhost-user.c:666:9: error:
format ‘%llx’ expects argument of type ‘long long unsigned int’, but argument 6 has type ‘__u64’ [-Werror=format=]
cc1: all warnings being treated as errors

On arm (and probably any 32-bit host):

/home/peter.maydell/qemu/contrib/libvhost-user/libvhost-user.c: In function 'vu_set_mem_table_exec_postcopy':
/home/peter.maydell/qemu/contrib/libvhost-user/libvhost-user.c:624:23:
error: cast to pointer from integer of different size [-Werror=int-to-pointer-cast]

Quoted 12 lines
         ret = madvise((void *)dev_region->mmap_addr,
                       ^
/home/peter.maydell/qemu/contrib/libvhost-user/libvhost-user.c:636:23:
error: cast to pointer from integer of different size
[-Werror=int-to-pointer-cast]
         ret = madvise((void *)dev_region->mmap_addr,
                       ^
/home/peter.maydell/qemu/contrib/libvhost-user/libvhost-user.c:669:22:
error: cast to pointer from integer of different size
[-Werror=int-to-pointer-cast]
         if (mprotect((void *)dev_region->mmap_addr,
                      ^

Patch #6 dropped, v2 sent.

cheers,
Gerd