[libvirt] [PATCH libvirt-sanbox] image: ignore OSError on listdir()

2016-08-04 Thread marcandre . lureau
From: Marc-André Lureau If the directory to list is missing, don't raise an exception but return empty list instead. This fixes for example running "virt-sandbox-image list" without a ~/.local/share/libvirt/templates/virt-builder. Signed-off-by: Marc-André Lureau

[libvirt] [PATCH 2/5] nodedev: add paths

2017-02-14 Thread marcandre . lureau
From: Marc-André Lureau Add new top-level element, that list the associated /dev files. Distinguish the main /dev name from symlinks with a 'type' attribute of value 'dev' or 'symlink'. Update a test to check XML schema, and actually add it to the test list since

[libvirt] [PATCH 1/5] nodedev: fix extra space in dump

2017-02-14 Thread marcandre . lureau
From: Marc-André Lureau This is a cosmetic change, shouldn't change XML parsing, and doesn't break any test. Signed-off-by: Marc-André Lureau --- src/conf/node_device_conf.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff

[libvirt] [PATCH 4/5] nodedev: add drm capability

2017-02-14 Thread marcandre . lureau
From: Marc-André Lureau Add a new 'drm' capability for Direct Rendering Manager (DRM) devices, providing device type information. Teach the udev backend to populate those devices. Signed-off-by: Marc-André Lureau ---

[libvirt] [PATCH 0/5] Add rendernode selection support

2017-02-14 Thread marcandre . lureau
From: Marc-André Lureau Hi, The following series implements DRM nodedev, exposes the devices /dev path and symlinks, and allows to configure qemu to use a specific DRM rendernode. (also included a small unrelated cosmetic change) thanks! Marc-André Lureau (5):

[libvirt] [PATCH 5/5] qemu: add rendernode argument

2017-02-14 Thread marcandre . lureau
From: Marc-André Lureau Add a new attribute 'rendernode' to spice element. Give it to QEMU if qemu supports it (queued for 2.9). Signed-off-by: Marc-André Lureau --- docs/formatdomain.html.in | 7 +-

[libvirt] [PATCH 3/5] nodedev: parse

2017-02-14 Thread marcandre . lureau
From: Marc-André Lureau This should have been added with c4a4603de (or 0bdefd9b04). Signed-off-by: Marc-André Lureau --- src/conf/node_device_conf.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/conf/node_device_conf.c

[libvirt] [PATCH] RFC: qemu: add spice/virgl rendernode

2017-02-13 Thread marcandre . lureau
From: Marc-André Lureau I am working on a WIP series to add QEMU Spice/virgl rendernode option. Since rendernodes are not stable across reboots, I propose that QEMU accepts also a PCI address (other bus types may be added in the future). This is how I translated it

[libvirt] [PATCH 2/2] news: add vmcoreinfo feature details

2017-11-16 Thread marcandre . lureau
From: Marc-André Lureau Signed-off-by: Marc-André Lureau --- docs/news.xml | 11 +++ 1 file changed, 11 insertions(+) diff --git a/docs/news.xml b/docs/news.xml index efde4c8b7..5eb0b79d6 100644 --- a/docs/news.xml +++

[libvirt] [PATCH 1/2] qemu: add vmcoreinfo support

2017-11-16 Thread marcandre . lureau
From: Marc-André Lureau Starting from qemu 2.11, the `-device vmcoreinfo` will create a fw_cfg entry for a guest to store dump details, necessary to process kernel dump with KASLR enabled and providing additional kernel details. In essence, it is similar to -fw_cfg

[libvirt] [PATCH 0/2] vmcoreinfo feature

2017-11-16 Thread marcandre . lureau
From: Marc-André Lureau Hi, Starting with QEMU 2.11, the guest can save kernel debug details when this feature is enabled and the kernel supports it. It is useful to process kernel dump with KASLR enabled, and also provides various kernel details to crash tools.

[libvirt] [PATCH] virt-viewer.spec.in: fix build after spice-xpi-client removal

2017-11-16 Thread marcandre . lureau
From: Marc-André Lureau This fixes commit 140cb84c2538bf0eab7dea2035dfecc4db74c784, where we removed the spice-xpi-client-remote-viewer. Signed-off-by: Marc-André Lureau --- virt-viewer.spec.in | 8 1 file changed, 8

[libvirt] [PATCH] RFC: qemu: add vmcoreinfo support

2017-11-06 Thread marcandre . lureau
From: Marc-André Lureau Starting from qemu 2.11, the `-device vmcoreinfo` will create a fw_cfg entry for a guest to store dump details, necessary to process kernel dump with KASLR enabled and providing additional kernel details. Since the device is a singleton and

[libvirt] [RFC v2 02/16] qemu: add memfd memory backing

2018-08-28 Thread marcandre . lureau
From: Marc-André Lureau Add a new memoryBacking source type "memfd", support by QEMU (when the capability is available). Sealing is enabled by default in qemu, and hugepage is easier to setup, which makes it often a better choice than memory-backend-file. Signed-off-by: Marc-André Lureau ---

[libvirt] [RFC v2 01/16] qemu: add memory-backend-memfd capability check

2018-08-28 Thread marcandre . lureau
From: Marc-André Lureau Signed-off-by: Marc-André Lureau --- src/qemu/qemu_capabilities.c | 2 ++ src/qemu/qemu_capabilities.h | 1 + tests/qemucapabilitiesdata/caps_2.12.0.aarch64.xml | 1 + tests/qemucapabilitiesdata/caps_2.12.0.ppc64.xml | 1 +

[libvirt] [RFC v2 00/16] Add vhost-user-gpu support

2018-08-28 Thread marcandre . lureau
From: Marc-André Lureau Hi, This series of patches add support for running a virtio GPU in a seperate process, using vhost-user. The QEMU series "[PATCH v4 00/29] vhost-user for input & GPU" is still under review, and will hopefully land in 3.1. There are several benefits of running the GPU

[libvirt] [RFC v2 11/16] qemu: restrict 'virgl=' option to 'virtio' video type

2018-08-28 Thread marcandre . lureau
From: Marc-André Lureau vhost-user doesn't have a virgl option, it's given to the vhost-user-gpu helper process instead. Signed-off-by: Marc-André Lureau --- src/qemu/qemu_command.c | 8 +--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/qemu/qemu_command.c

[libvirt] [RFC v2 06/16] qemu: check that qemu is vhost-user-vga capable

2018-08-28 Thread marcandre . lureau
From: Marc-André Lureau To support VGA, we need vhost-user-vga device, for "vhost-user" model. Signed-off-by: Marc-André Lureau --- src/qemu/qemu_domain.c | 4 1 file changed, 4 insertions(+) diff --git a/src/qemu/qemu_domain.c b/src/qemu/qemu_domain.c index c8ba7f9cd9..57a7546d5b

[libvirt] [RFC v2 05/16] qemu: fill the vhost-user video type capability

2018-08-28 Thread marcandre . lureau
From: Marc-André Lureau If vhost-user-gpu is supported, vhost-user video type is. Signed-off-by: Marc-André Lureau --- src/qemu/qemu_capabilities.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/qemu/qemu_capabilities.c b/src/qemu/qemu_capabilities.c index c0481b135d..0bf10b32eb

[libvirt] [RFC v2 10/16] qemu: add vhost-user-gpu helper unit

2018-08-28 Thread marcandre . lureau
From: Marc-André Lureau Similar to the qemu_tpm.c, add a unit with a few functions to start/stop and setup the cgroup of the external vhost-user-gpu process. See function documentation. Signed-off-by: Marc-André Lureau --- src/conf/device_conf.h | 1 + src/qemu/Makefile.inc.am

[libvirt] [RFC v2 16/16] tests: add vhost-user-gpu xml2argv tests

2018-08-28 Thread marcandre . lureau
From: Marc-André Lureau Signed-off-by: Marc-André Lureau --- .../vhost-user-gpu-secondary.args | 33 ++ .../vhost-user-gpu-secondary.xml | 44 +++ tests/qemuxml2argvdata/vhost-user-vga.args| 30 +

[libvirt] [RFC v2 14/16] qemu: build vhost-user-backend for vhost-user-gpu

2018-08-28 Thread marcandre . lureau
From: Marc-André Lureau Pass the vhost-user socket to a chardev, and associate a vhost-user-backend with it for each vhost-user-gpu. Signed-off-by: Marc-André Lureau --- src/qemu/qemu_command.c | 50 + 1 file changed, 50 insertions(+) diff --git

[libvirt] [RFC v2 15/16] qemu: build vhost-user-gpu video device arguments

2018-08-28 Thread marcandre . lureau
From: Marc-André Lureau Change the model name to "vhost-user-gpu-pci" if running on PCI. Set the "max_outputs" property. Associate the device with the "vhost-user" backend. Signed-off-by: Marc-André Lureau --- src/qemu/qemu_command.c | 6 +- 1 file changed, 5 insertions(+), 1

[libvirt] [RFC v2 09/16] qemu: add qemuSecurityStartVhostUserGPU helper

2018-08-28 Thread marcandre . lureau
From: Marc-André Lureau See function documentation, used in following patch. Signed-off-by: Marc-André Lureau --- src/qemu/qemu_security.c | 48 src/qemu/qemu_security.h | 6 + 2 files changed, 54 insertions(+) diff --git

[libvirt] [RFC v2 12/16] qemu: set default address type on vhost-user video model

2018-08-28 Thread marcandre . lureau
From: Marc-André Lureau It's a virtio device, like virtio-gpu. Signed-off-by: Marc-André Lureau --- src/qemu/qemu_domain_address.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/qemu/qemu_domain_address.c b/src/qemu/qemu_domain_address.c index 5aaf77028b..978bef59ed

[libvirt] [RFC v2 03/16] qemu: add vhost-user-gpu capabilities checks

2018-08-28 Thread marcandre . lureau
From: Marc-André Lureau Signed-off-by: Marc-André Lureau --- src/qemu/qemu_capabilities.c | 4 src/qemu/qemu_capabilities.h | 2 ++ 2 files changed, 6 insertions(+) diff --git a/src/qemu/qemu_capabilities.c b/src/qemu/qemu_capabilities.c index 2c2f193aae..c0481b135d 100644 ---

[libvirt] [RFC v2 13/16] qemu: start/stop the vhost-user-gpu external device

2018-08-28 Thread marcandre . lureau
From: Marc-André Lureau Each vhost-user-gpu needs its own helper gpu process. Start/stop them, and apply the emulator cgroup controller. Signed-off-by: Marc-André Lureau --- src/qemu/qemu_extdevice.c | 47 ++- 1 file changed, 42 insertions(+), 5

[libvirt] [RFC v2 08/16] qemu: validate vhost-user video model

2018-08-28 Thread marcandre . lureau
From: Marc-André Lureau Check qemu capability, and accept 3d acceleration. Signed-off-by: Marc-André Lureau --- src/qemu/qemu_process.c | 6 +- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/qemu/qemu_process.c b/src/qemu/qemu_process.c index 960c3ed011..027a608367

[libvirt] [RFC v2 04/16] domain: add "vhost-user" video type

2018-08-28 Thread marcandre . lureau
From: Marc-André Lureau Learn to accept "vhost-user" model type: (fill the required enum and switches to compile successfully) Signed-off-by: Marc-André Lureau --- docs/formatdomain.html.in | 3 ++- docs/schemas/domaincommon.rng | 1 + src/conf/domain_conf.c

[libvirt] [RFC v2 07/16] qemu: vhost-user is valid as non-primary video device

2018-08-28 Thread marcandre . lureau
From: Marc-André Lureau Signed-off-by: Marc-André Lureau --- src/qemu/qemu_domain.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/qemu/qemu_domain.c b/src/qemu/qemu_domain.c index 57a7546d5b..85e749cb56 100644 --- a/src/qemu/qemu_domain.c +++

[libvirt] [PATCH 3/5] qemu: prefer memfd for anonymous memory

2018-09-07 Thread marcandre . lureau
From: Marc-André Lureau Signed-off-by: Marc-André Lureau --- src/qemu/qemu_command.c | 61 + 1 file changed, 43 insertions(+), 18 deletions(-) diff --git a/src/qemu/qemu_command.c b/src/qemu/qemu_command.c index c9e3a91e32..97cfc8a18d 100644 ---

[libvirt] [PATCH 5/5] tests: add qemuxml2argv memfd-memory-numa test

2018-09-07 Thread marcandre . lureau
From: Marc-André Lureau Check anonymous memory is backed by memfd if qemu is capable. Signed-off-by: Marc-André Lureau --- tests/qemuxml2argvdata/memfd-memory-numa.args | 28 +++ tests/qemuxml2argvdata/memfd-memory-numa.xml | 36 +++ tests/qemuxml2argvtest.c

[libvirt] [PATCH 2/5] qemu: check memory-backend-memfd.hugetlb capability

2018-09-07 Thread marcandre . lureau
From: Marc-André Lureau QEMU 3.1 should only expose the property if the host is actually capable of creating hugetable-backed memfd. However, it may fail at runtime depending on requested "hugetlbsize". Signed-off-by: Marc-André Lureau --- src/qemu/qemu_capabilities.c | 8

[libvirt] [PATCH 0/5] Use memfd if possible

2018-09-07 Thread marcandre . lureau
From: Marc-André Lureau Hi, This is an alternative to "[RFC v2 02/16] qemu: add memfd memory backing", which added a new source type. Instead, Daniel suggested to automatically use memfd for anonymous memory when available. Marc-André Lureau (5): qemu: add memory-backend-memfd capability

[libvirt] [PATCH 4/5] conf: drop hugepage non-anoymous memory requirement

2018-09-07 Thread marcandre . lureau
From: Marc-André Lureau memfd is able to allocate hugepage anonymous memory. Signed-off-by: Marc-André Lureau --- src/conf/domain_conf.c | 7 --- 1 file changed, 7 deletions(-) diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c index 86199623cc..696cf6ef18 100644 ---

[libvirt] [PATCH 1/5] qemu: add memory-backend-memfd capability check

2018-09-07 Thread marcandre . lureau
From: Marc-André Lureau Check availability of "-object memory-backend-memfd". Signed-off-by: Marc-André Lureau --- src/qemu/qemu_capabilities.c | 2 ++ src/qemu/qemu_capabilities.h | 1 + tests/qemucapabilitiesdata/caps_2.12.0.aarch64.xml | 1 +

[libvirt] [RFC PATCH 06/17] qemu: fill the vhost-user video type capability

2018-07-13 Thread marcandre . lureau
From: Marc-André Lureau If vhost-user-gpu is supported, vhost-user video type is. Signed-off-by: Marc-André Lureau --- src/qemu/qemu_capabilities.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/qemu/qemu_capabilities.c b/src/qemu/qemu_capabilities.c index a6c00308a2..b517477709

[libvirt] [RFC PATCH 01/17] qemu: setup shared memory without explicit numa configuration

2018-07-13 Thread marcandre . lureau
From: Marc-André Lureau When a domain is configured with 'shared' memory backing: But no explicit NUMA configuration, let's configure a shared memory backend associated with default -numa. Signed-off-by: Marc-André Lureau --- src/qemu/qemu_command.c | 100

[libvirt] [RFC PATCH 07/17] qemu: check that qemu is vhost-user-vga capable

2018-07-13 Thread marcandre . lureau
From: Marc-André Lureau To support VGA, we need vhost-user-vga device, for "vhost-user" model. Signed-off-by: Marc-André Lureau --- src/qemu/qemu_domain.c | 4 1 file changed, 4 insertions(+) diff --git a/src/qemu/qemu_domain.c b/src/qemu/qemu_domain.c index b8b5919795..20da58d978

[libvirt] [RFC PATCH 12/17] qemu: restrict 'virgl=' option to 'virtio' video type

2018-07-13 Thread marcandre . lureau
From: Marc-André Lureau vhost-user doesn't have a virgl option, it's given to the vhost-user-gpu helper process instead. Signed-off-by: Marc-André Lureau --- src/qemu/qemu_command.c | 8 +--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/qemu/qemu_command.c

[libvirt] [RFC PATCH 16/17] qemu: build vhost-user-gpu video device arguments

2018-07-13 Thread marcandre . lureau
From: Marc-André Lureau Change the model name to "vhost-user-gpu-pci" if running on PCI. Set the "max_outputs" property. Associate the device with the "vhost-user" backend. Signed-off-by: Marc-André Lureau --- src/qemu/qemu_command.c | 6 +- 1 file changed, 5 insertions(+), 1

[libvirt] [RFC PATCH 13/17] qemu: set default address type on vhost-user video model

2018-07-13 Thread marcandre . lureau
From: Marc-André Lureau It's a virtio device, like virtio-gpu. Signed-off-by: Marc-André Lureau --- src/qemu/qemu_domain_address.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/qemu/qemu_domain_address.c b/src/qemu/qemu_domain_address.c index df98d7384f..476ee2d4a5

[libvirt] [RFC PATCH 14/17] qemu: start/stop the vhost-user-gpu external device

2018-07-13 Thread marcandre . lureau
From: Marc-André Lureau Each vhost-user-gpu needs its own helper gpu process. Start/stop them, and apply the emulator cgroup controller. Signed-off-by: Marc-André Lureau --- src/qemu/qemu_extdevice.c | 47 ++- 1 file changed, 42 insertions(+), 5

[libvirt] [RFC PATCH 15/17] qemu: build vhost-user-backend for vhost-user-gpu

2018-07-13 Thread marcandre . lureau
From: Marc-André Lureau Pass the vhost-user socket to a chardev, and associate a vhost-user-backend with it for each vhost-user-gpu. Signed-off-by: Marc-André Lureau --- src/qemu/qemu_command.c | 50 + 1 file changed, 50 insertions(+) diff --git

[libvirt] [RFC PATCH 08/17] qemu: vhost-user is valid as non-primary video device

2018-07-13 Thread marcandre . lureau
From: Marc-André Lureau Signed-off-by: Marc-André Lureau --- src/qemu/qemu_domain.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/qemu/qemu_domain.c b/src/qemu/qemu_domain.c index 20da58d978..59c63fa2a4 100644 --- a/src/qemu/qemu_domain.c +++

[libvirt] [RFC PATCH 05/17] domain: add "vhost-user" video type

2018-07-13 Thread marcandre . lureau
From: Marc-André Lureau Learn to accept "vhost-user" model type: (fill the required enum and switches to compile successfully) Signed-off-by: Marc-André Lureau --- docs/formatdomain.html.in | 5 +++-- docs/schemas/domaincommon.rng | 1 + src/conf/domain_conf.c

[libvirt] [RFC PATCH 04/17] qemu: add vhost-user-gpu capabilities

2018-07-13 Thread marcandre . lureau
From: Marc-André Lureau Signed-off-by: Marc-André Lureau --- src/qemu/qemu_capabilities.c | 6 ++ src/qemu/qemu_capabilities.h | 4 2 files changed, 10 insertions(+) diff --git a/src/qemu/qemu_capabilities.c b/src/qemu/qemu_capabilities.c index 4ffd2d6257..a6c00308a2 100644 ---

[libvirt] [RFC PATCH 00/17] Add vhost-user-gpu support

2018-07-13 Thread marcandre . lureau
From: Marc-André Lureau Hi, This series of patches add support for running a virtio GPU in a seperate process, using vhost-user. The QEMU series "[PATCH v4 00/29] vhost-user for input & GPU" is still under review, and will hopefully land in 3.1. There are several benefits of running the GPU

[libvirt] [RFC PATCH 03/17] qemu: use memory-backend-memfd if possible

2018-07-13 Thread marcandre . lureau
From: Marc-André Lureau When the memory is shared and the source isn't specified to be a file, we can make use of memory-backend-memfd. Sealing is enabled by default in qemu, hugepage is easier to setup, which makes it a better choice than memory-backend-file. Signed-off-by: Marc-André Lureau

[libvirt] [RFC PATCH 02/17] qemu: add memory-backend-memfd capability check

2018-07-13 Thread marcandre . lureau
From: Marc-André Lureau Signed-off-by: Marc-André Lureau --- src/qemu/qemu_capabilities.c | 2 ++ src/qemu/qemu_capabilities.h | 1 + tests/qemucapabilitiesdata/caps_2.12.0.aarch64.xml | 1 + tests/qemucapabilitiesdata/caps_2.12.0.ppc64.xml | 1 +

[libvirt] [RFC PATCH 10/17] qemu: add qemuSecurityStartVhostUserGPU helper

2018-07-13 Thread marcandre . lureau
From: Marc-André Lureau See function documentation, used in following patch. Signed-off-by: Marc-André Lureau --- src/qemu/qemu_security.c | 48 src/qemu/qemu_security.h | 6 + 2 files changed, 54 insertions(+) diff --git

[libvirt] [RFC PATCH 09/17] qemu: validate vhost-user video model

2018-07-13 Thread marcandre . lureau
From: Marc-André Lureau Check qemu capability, and accept 3d acceleration. Signed-off-by: Marc-André Lureau --- src/qemu/qemu_process.c | 6 +- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/qemu/qemu_process.c b/src/qemu/qemu_process.c index c903a8e5c8..ee4c3445fb

[libvirt] [RFC PATCH 17/17] tests: add vhost-user-gpu xml2argv tests

2018-07-13 Thread marcandre . lureau
From: Marc-André Lureau Signed-off-by: Marc-André Lureau --- .../vhost-user-gpu-secondary.args | 34 + .../vhost-user-gpu-secondary.xml | 38 +++ tests/qemuxml2argvdata/vhost-user-vga.args| 31 +++

[libvirt] [RFC PATCH 11/17] qemu: add vhost-user-gpu helper unit

2018-07-13 Thread marcandre . lureau
From: Marc-André Lureau Similar to the qemu_tpm.c, add a unit with a few functions to start/stop and setup the cgroup of the external vhost-user-gpu process. See function documentation. Signed-off-by: Marc-André Lureau --- src/conf/device_conf.h | 1 + src/qemu/Makefile.inc.am

[libvirt] [PATCH v3 2/3] qemu: check memory-backend-memfd.hugetlb capability

2018-11-15 Thread marcandre . lureau
From: Marc-André Lureau QEMU 3.1 should only expose the property if the host is actually capable of creating hugetable-backed memfd. However, it may fail at runtime depending on requested "hugetlbsize". Reviewed-by: John Ferlan Signed-off-by: Marc-André Lureau Signed-off-by: John Ferlan ---

[libvirt] [PATCH v3 3/3] qemu: add memfd source type

2018-11-15 Thread marcandre . lureau
From: Marc-André Lureau Add a new memoryBacking source type "memfd", supported by QEMU (when the capability is available). A memfd is a specialized anonymous memory kind. As such, an anonymous source type could be automatically using a memfd. However, there are some complications when migrating

[libvirt] [PATCH v3 0/3] Add "memfd" memory backing type (resend)

2018-11-15 Thread marcandre . lureau
From: Marc-André Lureau Hi, This is an alternative series from "[PATCH 0/5] Use memfd if possible". Instead of automatically using memfd for anonymous memory when available (as suggested by Daniel), it introduces the "memfd" memory backing type. Although using memfd transparently when possible

[libvirt] [PATCH v3 1/3] qemu: add memory-backend-memfd capability check

2018-11-15 Thread marcandre . lureau
From: Marc-André Lureau Check availability of "-object memory-backend-memfd". Reviewed-by: John Ferlan Signed-off-by: Marc-André Lureau Signed-off-by: John Ferlan --- src/qemu/qemu_capabilities.c | 2 ++ src/qemu/qemu_capabilities.h | 1 +

[libvirt] [PATCH] qemu: clear seccomp capability if TSYNC is not supported by host

2018-08-30 Thread marcandre . lureau
From: Marc-André Lureau With qemu <= 3.0, when using "-seccomp on", the seccomp policy is only applied to the main thread, the vcpu worker thread and other worker threads created after seccomp policy is applied; the seccomp policy is not applied to e.g. the RCU thread because it is created

[libvirt] [PATCH v2 1/3] qemu: add memory-backend-memfd capability check

2018-09-17 Thread marcandre . lureau
From: Marc-André Lureau Check availability of "-object memory-backend-memfd". Reviewed-by: John Ferlan Signed-off-by: Marc-André Lureau Signed-off-by: John Ferlan --- src/qemu/qemu_capabilities.c | 2 ++ src/qemu/qemu_capabilities.h | 1 +

[libvirt] [PATCH v2 2/3] qemu: check memory-backend-memfd.hugetlb capability

2018-09-17 Thread marcandre . lureau
From: Marc-André Lureau QEMU 3.1 should only expose the property if the host is actually capable of creating hugetable-backed memfd. However, it may fail at runtime depending on requested "hugetlbsize". Reviewed-by: John Ferlan Signed-off-by: Marc-André Lureau Signed-off-by: John Ferlan ---

[libvirt] [PATCH v2 3/3] qemu: add memfd source type

2018-09-17 Thread marcandre . lureau
From: Marc-André Lureau Add a new memoryBacking source type "memfd", supported by QEMU (when the apability is available). A memfd is a specialized anonymous memory kind. As such, an anonymous source type could be automatically using a memfd. However, there are some complications when migrating

[libvirt] [PATCH v2 0/3] Add "memfd" memory backing type

2018-09-17 Thread marcandre . lureau
From: Marc-André Lureau Hi, This is an alternative series from "[PATCH 0/5] Use memfd if possible". Instead of automatically using memfd for anonymous memory when available (as suggested by Daniel), it introduces the "memfd" memory backing type. Although using memfd transparently when possible

[libvirt] [PATCH] qemu: do not set wait:false for client sockets

2019-04-15 Thread marcandre . lureau
From: Marc-André Lureau Qemu commit 767abe7 ("chardev: forbid 'wait' option with client sockets") effectively deprecates usage of "wait" with client sockets starting with qemu 4.0, and earlier versions ignored the value. Cc: Daniel P. Berrangé Signed-off-by: Marc-André Lureau ---

[libvirt] [PATCH] RFC: use a slirp helper process

2019-04-18 Thread marcandre . lureau
From: Marc-André Lureau I am throwing this away for discussions, and early feedback. With the upcoming release of libslirp[1], we have an opportunity to run SLIRP networking in a separate process. This will allow for stricter security policies for both qemu & slirp, as slirp is notoriously not

[libvirt] [PATCH 00/19] Add vhost-user-gpu support

2019-06-05 Thread marcandre . lureau
From: Marc-André Lureau Hi, This series of patches adds support for running virtio GPUs in seperate processes, thanks to vhost-user backend. The QEMU support landed for 4.1. There are several benefits of running the GPU/virgl in an external process, since Mesa is rather heavy on the qemu main

[libvirt] [PATCH 05/19] domain: add "vhostuser" attribute to virtio video model

2019-06-05 Thread marcandre . lureau
From: Marc-André Lureau Accept a new attribute to specify usage of helper process, ex: Signed-off-by: Marc-André Lureau --- docs/formatdomain.html.in | 6 ++ docs/schemas/domaincommon.rng | 11 ++- src/conf/domain_conf.c| 14 ++

[libvirt] [PATCH 03/19] qemu_firmware: only set nfeatures on success

2019-06-05 Thread marcandre . lureau
From: Marc-André Lureau The field is set just before returning on success. Signed-off-by: Marc-André Lureau --- src/qemu/qemu_firmware.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/src/qemu/qemu_firmware.c b/src/qemu/qemu_firmware.c index f3d89d000d..bf29b10b9a 100644 ---

[libvirt] [PATCH 07/19] qemu-cgroup: allow accel rendernode access

2019-06-05 Thread marcandre . lureau
From: Marc-André Lureau Signed-off-by: Marc-André Lureau --- src/qemu/qemu_cgroup.c | 24 1 file changed, 24 insertions(+) diff --git a/src/qemu/qemu_cgroup.c b/src/qemu/qemu_cgroup.c index ca76c4fdfa..1627b5ef5d 100644 --- a/src/qemu/qemu_cgroup.c +++

[libvirt] [PATCH 15/19] qemu: prepare domain for vhost-user GPU

2019-06-05 Thread marcandre . lureau
From: Marc-André Lureau Call qemuExtVhostUserGPUPrepareDomain() to fill the domain with the location of the vhost-user binary to start. Signed-off-by: Marc-André Lureau --- src/qemu/qemu_extdevice.c | 30 ++ src/qemu/qemu_extdevice.h | 5 +

[libvirt] [PATCH 14/19] qemu: add vhost-user-gpu helper unit

2019-06-05 Thread marcandre . lureau
From: Marc-André Lureau Similar to the qemu_tpm.c, add a unit with a few functions to start/stop and setup the cgroup of the external vhost-user-gpu process. See function documentation. Since the vhost-user connection fd isn't necessarily specific to QEMU, it was easier to add it to

[libvirt] [PATCH 06/19] domain: add rendernode attribute on

2019-06-05 Thread marcandre . lureau
From: Marc-André Lureau vhost-user-gpu helper may accept --render-node option to specify on which GPU should the renderning be done. (by comparison rendernode is the target/display rendering) Signed-off-by: Marc-André Lureau --- docs/formatdomain.html.in | 5 +

[libvirt] [PATCH 01/19] device-conf: removed unneeded virDomainDeviceInfoCopy()

2019-06-05 Thread marcandre . lureau
From: Marc-André Lureau Signed-off-by: Marc-André Lureau --- src/conf/device_conf.c | 21 - src/conf/device_conf.h | 2 -- src/libvirt_private.syms | 1 - 3 files changed, 24 deletions(-) diff --git a/src/conf/device_conf.c b/src/conf/device_conf.c index

[libvirt] [PATCH 12/19] qemu: add vhost-user helpers

2019-06-05 Thread marcandre . lureau
From: Marc-André Lureau Add qemuVhostUserFetchConfigs() to discover vhost-user helpers. qemuVhostUserFillDomainGPU() will find the first matching GPU helper with the required capabilities and set the associated vhost_user_binary. Signed-off-by: Marc-André Lureau --- src/conf/device_conf.c

[libvirt] [PATCH 02/19] tpm: minor argument comment fix

2019-06-05 Thread marcandre . lureau
From: Marc-André Lureau Signed-off-by: Marc-André Lureau --- src/qemu/qemu_tpm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/qemu/qemu_tpm.c b/src/qemu/qemu_tpm.c index 835a9caf46..41fef1f8f5 100644 --- a/src/qemu/qemu_tpm.c +++ b/src/qemu/qemu_tpm.c @@ -745,7

[libvirt] [PATCH 04/19] qemu: extract out qemuFetchConfigs from firmware

2019-06-05 Thread marcandre . lureau
From: Marc-André Lureau The same config files disovery & priority rules are used for vhost-user backends. Signed-off-by: Marc-André Lureau --- src/qemu/Makefile.inc.am | 2 + src/qemu/qemu_configs.c | 183 +++ src/qemu/qemu_configs.h | 31 +++

[libvirt] [PATCH 17/19] qemu: build vhost-user GPU devices

2019-06-05 Thread marcandre . lureau
From: Marc-André Lureau For each vhost-user GPUs, - build a socket chardev, and pass the vhost-user socket to it - build a vhost-user video device and associate it with the chardev Signed-off-by: Marc-André Lureau --- src/qemu/qemu_command.c | 46 +++-- 1

[libvirt] [PATCH 11/19] qemu: restrict 'virgl=' option to non-vhostuser video type

2019-06-05 Thread marcandre . lureau
From: Marc-André Lureau vhost-user device doesn't have a virgl option, it is passed to the vhost-user-gpu helper process instead. Signed-off-by: Marc-André Lureau --- src/qemu/qemu_command.c | 8 +--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/qemu/qemu_command.c

[libvirt] [PATCH 18/19] tests: mock execv/execve

2019-06-05 Thread marcandre . lureau
From: Marc-André Lureau Learn to override the paths to the program to execute (vhost-user helpers are executed to check for runtime capabilities). Signed-off-by: Marc-André Lureau --- tests/virfilewrapper.c | 22 ++ 1 file changed, 22 insertions(+) diff --git

[libvirt] [PATCH 13/19] qemu: add qemuSecurityStartVhostUserGPU helper

2019-06-05 Thread marcandre . lureau
From: Marc-André Lureau See function documentation. Used in a following patch. Signed-off-by: Marc-André Lureau --- src/qemu/qemu_security.c | 48 src/qemu/qemu_security.h | 6 + 2 files changed, 54 insertions(+) diff --git

[libvirt] [PATCH 08/19] qemu: add vhost-user-gpu capabilities checks

2019-06-05 Thread marcandre . lureau
From: Marc-André Lureau Those new devices are merged for QEMU 4.1. Signed-off-by: Marc-André Lureau --- src/qemu/qemu_capabilities.c | 6 ++ src/qemu/qemu_capabilities.h | 4 2 files changed, 10 insertions(+) diff --git a/src/qemu/qemu_capabilities.c b/src/qemu/qemu_capabilities.c

[libvirt] [PATCH 19/19] tests: add vhost-user-gpu xml2argv tests

2019-06-05 Thread marcandre . lureau
From: Marc-André Lureau Signed-off-by: Marc-André Lureau --- .../vhost-user-gpu-secondary.args | 35 +++ .../vhost-user-gpu-secondary.xml | 44 +++ tests/qemuxml2argvdata/vhost-user-vga.args| 32 ++

[libvirt] [PATCH 16/19] qemu: start/stop the vhost-user-gpu external device

2019-06-05 Thread marcandre . lureau
From: Marc-André Lureau Each vhost-user-gpu needs its own helper gpu process. Start/stop them, and apply the emulator cgroup controller. Signed-off-by: Marc-André Lureau --- src/qemu/qemu_extdevice.c | 49 +++ 1 file changed, 44 insertions(+), 5

[libvirt] [PATCH 10/19] qemu: validate virtio-gpu with vhost-user

2019-06-05 Thread marcandre . lureau
From: Marc-André Lureau Check qemu capability, and accept 3d acceleration. 3d acceleration support is checked when looking for a suitable vhost-user helper. Signed-off-by: Marc-André Lureau --- src/qemu/qemu_process.c | 14 -- 1 file changed, 12 insertions(+), 2 deletions(-) diff

[libvirt] [PATCH 09/19] qemu: check that qemu is vhost-user-vga capable

2019-06-05 Thread marcandre . lureau
From: Marc-André Lureau To support virtio VGA with vhost-user, vhost-user-vga device is necessary. Signed-off-by: Marc-André Lureau --- src/qemu/qemu_domain.c | 10 +++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/src/qemu/qemu_domain.c b/src/qemu/qemu_domain.c index

[libvirt] [PATCH 12/23] domain-conf: add network def private data

2019-07-08 Thread marcandre . lureau
From: Marc-André Lureau Signed-off-by: Marc-André Lureau --- src/conf/domain_conf.c | 21 - src/conf/domain_conf.h | 6 ++ 2 files changed, 26 insertions(+), 1 deletion(-) diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c index 3323c9a5b1..9e868b5337 100644

[libvirt] [PATCH 16/23] qemu-domain: save and restore slirp state

2019-07-08 Thread marcandre . lureau
From: Marc-André Lureau Save & restore the slirp helper PID associated with a network interface & the probed features. Signed-off-by: Marc-André Lureau --- src/qemu/qemu_domain.c | 137 + src/qemu/qemu_domain.h | 2 +- 2 files changed, 138

[libvirt] [PATCH 15/23] qemu: add slirp helper unit

2019-07-08 Thread marcandre . lureau
From: Marc-André Lureau The unit provides the functions associated with a slirp-helper: - probing / checking capabilities - opening the socketpair - starting / stoping the helper - registering for dbus-vmstate migration Signed-off-by: Marc-André Lureau --- src/qemu/Makefile.inc.am | 2 +

[libvirt] [PATCH 11/23] qemu: add dbus-vmstate helper migration support

2019-07-08 Thread marcandre . lureau
From: Marc-André Lureau Helper processes may have their state migrated with QEMU data stream thanks to the proposed object "dbus-vmstate". libvirt knows what helpers should be migrated. The "dbus-vmstate" is added when required, and given the list of helper Ids that must be present during

[libvirt] [PATCH 14/23] qemu-conf: add configurable slirp-helper location

2019-07-08 Thread marcandre . lureau
From: Marc-André Lureau A slirp helper is a process that provides user-mode networking through a unix domain socket. It is expected to follow the following specification: https://gitlab.freedesktop.org/slirp/libslirp-rs/blob/master/src/bin/README.rst Signed-off-by: Marc-André Lureau ---

[libvirt] [PATCH 18/23] qemu-migration: prevent migration if slirp cannot be migrated

2019-07-08 Thread marcandre . lureau
From: Marc-André Lureau Signed-off-by: Marc-André Lureau --- src/qemu/qemu_migration.c | 11 +++ 1 file changed, 11 insertions(+) diff --git a/src/qemu/qemu_migration.c b/src/qemu/qemu_migration.c index a11c6f1a9f..35fadfec44 100644 --- a/src/qemu/qemu_migration.c +++

[libvirt] [PATCH 10/23] qemu: add a DBus daemon helper unit

2019-07-08 Thread marcandre . lureau
From: Marc-André Lureau Add a unit to start & stop a private dbus-daemon. The daemon is meant to be started on demand, and associated with a QEMU process. It is stopped when the QEMU process is stopped. Signed-off-by: Marc-André Lureau --- src/qemu/Makefile.inc.am | 4 +

[libvirt] [PATCH 13/23] qemu: add qemuDomainNetworkPrivate

2019-07-08 Thread marcandre . lureau
From: Marc-André Lureau Signed-off-by: Marc-André Lureau --- src/qemu/qemu_domain.c | 39 +++ src/qemu/qemu_domain.h | 12 2 files changed, 51 insertions(+) diff --git a/src/qemu/qemu_domain.c b/src/qemu/qemu_domain.c index

[libvirt] [PATCH 08/23] qemu-conf: add dbusStateDir

2019-07-08 Thread marcandre . lureau
From: Marc-André Lureau Location of DBus daemon state configuration, socket, pid... Signed-off-by: Marc-André Lureau --- src/qemu/qemu_conf.c | 8 src/qemu/qemu_conf.h | 1 + 2 files changed, 9 insertions(+) diff --git a/src/qemu/qemu_conf.c b/src/qemu/qemu_conf.c index

[libvirt] [PATCH 05/23] qemu: add socket datagram capability

2019-07-08 Thread marcandre . lureau
From: Marc-André Lureau Datagram socket is available since qemu 4.0, commit fdec16e3c2a614e2861f3086b05d444b5d8c3406 ("net/socket: learn to talk with a unix dgram socket"). Required for slirp-helper communication. Signed-off-by: Marc-André Lureau --- src/qemu/qemu_capabilities.c

[libvirt] [PATCH 07/23] qemu-conf: add configurable dbus-daemon location

2019-07-08 Thread marcandre . lureau
From: Marc-André Lureau Signed-off-by: Marc-André Lureau --- m4/virt-driver-qemu.m4 | 5 + src/qemu/libvirtd_qemu.aug | 1 + src/qemu/qemu.conf | 3 +++ src/qemu/qemu_conf.c | 7 ++- src/qemu/qemu_conf.h | 1 +

[libvirt] [PATCH 06/23] qemu: add dbus-vmstate capability

2019-07-08 Thread marcandre . lureau
From: Marc-André Lureau This object is being proposed to qemu upstream "Add dbus-vmstate object". It handles data migration of external processes. Signed-off-by: Marc-André Lureau --- src/qemu/qemu_capabilities.c | 2 ++ src/qemu/qemu_capabilities.h | 1 + 2 files changed, 3 insertions(+)

[libvirt] [PATCH 03/23] qemu: replace logCtxt with qemuDomainLogAppendMessage()

2019-07-08 Thread marcandre . lureau
From: Marc-André Lureau Once QEMU is started, the qemuDomainLogContext is owned by it, and can no longer be used from libvirt. Instead, use qemuDomainLogAppendMessage() which will redirect the log. Signed-off-by: Marc-André Lureau --- src/qemu/qemu_extdevice.c | 40

[libvirt] [PATCH 02/23] dbus: correctly build reply message

2019-07-08 Thread marcandre . lureau
From: Marc-André Lureau dbus_message_new() does not construct correct replies by itself, it is recommended to use dbus_message_new_method_return() instead. Signed-off-by: Marc-André Lureau --- src/util/virdbus.c | 18 -- src/util/virdbus.h | 6 --

[libvirt] [PATCH 01/23] Add .editorconfig

2019-07-08 Thread marcandre . lureau
From: Marc-André Lureau Consistent code style across editors. Signed-off-by: Marc-André Lureau --- .editorconfig | 21 + 1 file changed, 21 insertions(+) create mode 100644 .editorconfig diff --git a/.editorconfig b/.editorconfig new file mode 100644 index

  1   2   3   4   >