Re: [libvirt] [Qemu-devel] Call for volunteers: LWN.net articles about KVM Forum talks

2019-09-17 Thread Pankaj Gupta
Hi Stefan, > > Hi, > LWN.net is a popular open source news site that covers Linux and other > open source communities (Python, GNOME, Debian, etc). It has published > a few KVM articles in the past too. > > Let's raise awareness of QEMU, KVM, and libvirt by submitting articles > covering >

Re: [libvirt] [Qemu-devel] Call for volunteers: LWN.net articles about KVM Forum talks

2019-09-17 Thread Sergio Lopez
Stefan Hajnoczi writes: > Hi, > LWN.net is a popular open source news site that covers Linux and other > open source communities (Python, GNOME, Debian, etc). It has published > a few KVM articles in the past too. > > Let's raise awareness of QEMU, KVM, and libvirt by submitting articles >

[libvirt] [PATCHv2] maint: Use flake8 to check python code

2019-09-17 Thread Shi Lei
Replace 'sc_prohibit_semicolon_at_eol_in_python' with generic 'sc_flake8' rule to check python code style. Now 'sc_flake8' just check the error E703: 'statement ends with a semicolon'. In future, we could use '--select' to introduce more rules. Signed-off-by: Shi Lei --- v1:

Re: [libvirt] [dbus PATCH] build: convert to Meson/Ninja build system

2019-09-17 Thread Fabiano Fidêncio
On Tue, Sep 17, 2019 at 8:17 PM Pavel Hrdina wrote: > > On Tue, Sep 17, 2019 at 06:53:30PM +0200, Fabiano Fidêncio wrote: > > On Tue, Sep 17, 2019 at 5:22 PM Pavel Hrdina wrote: > > > > > > Meson build system is simple and quick compared to Autotools and it's > > > able to fully replace our

Re: [libvirt] [dbus PATCH] build: convert to Meson/Ninja build system

2019-09-17 Thread Pavel Hrdina
On Tue, Sep 17, 2019 at 06:53:30PM +0200, Fabiano Fidêncio wrote: > On Tue, Sep 17, 2019 at 5:22 PM Pavel Hrdina wrote: > > > > Meson build system is simple and quick compared to Autotools and it's > > able to fully replace our Autotools usage. There are few drawbacks as > > it's a fairly new

Re: [libvirt] [dbus PATCH] build: convert to Meson/Ninja build system

2019-09-17 Thread Pavel Hrdina
On Tue, Sep 17, 2019 at 06:39:17PM +0200, Ján Tomko wrote: > On Tue, Sep 17, 2019 at 05:20:43PM +0200, Pavel Hrdina wrote: > > Meson build system is simple and quick compared to Autotools and it's > > able to fully replace our Autotools usage. There are few drawbacks as > > it's a fairly new

Re: [libvirt] [PATCH v2 0/2] qemu: Enable slirp-helper iff dbus-vmstate present

2019-09-17 Thread Ján Tomko
On Tue, Sep 10, 2019 at 11:17:58AM +0200, Michal Privoznik wrote: This is technically a v2 of: https://www.redhat.com/archives/libvir-list/2019-September/msg00281.html It implements what Jano suggested - use dbus-vmstate capability to decide if slirp-helper is used. Michal Prívozník (2):

Re: [libvirt] [PATCH] maint: Use flake8 to check python code

2019-09-17 Thread Ján Tomko
On Tue, Sep 17, 2019 at 05:37:24PM +0200, Ján Tomko wrote: On Fri, Sep 13, 2019 at 01:37:20AM +0800, Shi Lei wrote: Replace 'sc_prohibit_semicolon_at_eol_in_python' with generic 'sc_flake8' rule to check python code style. Now 'sc_flake8' just check the error E703: 'statement ends with a

Re: [libvirt] [dbus PATCH] build: convert to Meson/Ninja build system

2019-09-17 Thread Fabiano Fidêncio
On Tue, Sep 17, 2019 at 5:22 PM Pavel Hrdina wrote: > > Meson build system is simple and quick compared to Autotools and it's > able to fully replace our Autotools usage. There are few drawbacks as > it's a fairly new build system, it requires Python 3.5 and Ninja 1.5.0, > it's still evolving

Re: [libvirt] [PATCH] util: remove some no-op thread functions

2019-09-17 Thread Daniel Henrique Barboza
On 9/16/19 1:45 PM, Daniel P. Berrangé wrote: Neither virThreadInitialize or virThreadOnExit do anything since we dropped the Win32 threads impl, in favour of win-pthreads. Signed-off-by: Daniel P. Berrangé --- src/libvirt-admin.c | 3 +-- src/libvirt.c | 6

Re: [libvirt] [dbus PATCH] build: convert to Meson/Ninja build system

2019-09-17 Thread Ján Tomko
On Tue, Sep 17, 2019 at 05:20:43PM +0200, Pavel Hrdina wrote: Meson build system is simple and quick compared to Autotools and it's able to fully replace our Autotools usage. There are few drawbacks as it's a fairly new build system, it requires Python 3.5 and Ninja 1.5.0, it's still evolving

Re: [libvirt] [PATCH] maint: Use flake8 to check python code

2019-09-17 Thread Ján Tomko
On Fri, Sep 13, 2019 at 01:37:20AM +0800, Shi Lei wrote: Replace 'sc_prohibit_semicolon_at_eol_in_python' with generic 'sc_flake8' rule to check python code style. Now 'sc_flake8' just check the error E703: 'statement ends with a semicolon'. In future, we could use '--select' to introduce more

Re: [libvirt] [PATCH 1/6] test_driver: implement virDomainAttachDeviceFlags

2019-09-17 Thread Daniel Henrique Barboza
On 9/17/19 12:26 PM, Ilias Stamatis wrote: On Tue, Sep 17, 2019 at 5:51 PM Daniel Henrique Barboza wrote: On 8/1/19 9:54 AM, Ilias Stamatis wrote: Signed-off-by: Ilias Stamatis --- src/test/test_driver.c | 290 + 1 file changed, 290

Re: [libvirt] [PATCH 1/6] test_driver: implement virDomainAttachDeviceFlags

2019-09-17 Thread Ilias Stamatis
On Tue, Sep 17, 2019 at 5:51 PM Daniel Henrique Barboza wrote: > > > > On 8/1/19 9:54 AM, Ilias Stamatis wrote: > > Signed-off-by: Ilias Stamatis > > --- > > src/test/test_driver.c | 290 + > > 1 file changed, 290 insertions(+) > > > > diff --git

[libvirt] [dbus PATCH] build: convert to Meson/Ninja build system

2019-09-17 Thread Pavel Hrdina
Meson build system is simple and quick compared to Autotools and it's able to fully replace our Autotools usage. There are few drawbacks as it's a fairly new build system, it requires Python 3.5 and Ninja 1.5.0, it's still evolving and the user base is not that large and there were some tweaks

Re: [libvirt] [PATCH 0/6] test_driver: implement device attach/detach APIs

2019-09-17 Thread Daniel Henrique Barboza
Hi, I didn't review the whole series because I believe you need to look at merging patches 1 and 2 and seeing how to deal with the new API of virDomainDeviceDefParse. Since this will change the series a bit I'll wait for the newer version. Also, I think your file has different permissions than

Re: [libvirt] [PATCH 1/6] test_driver: implement virDomainAttachDeviceFlags

2019-09-17 Thread Daniel Henrique Barboza
On 8/1/19 9:54 AM, Ilias Stamatis wrote: Signed-off-by: Ilias Stamatis --- src/test/test_driver.c | 290 + 1 file changed, 290 insertions(+) diff --git a/src/test/test_driver.c b/src/test/test_driver.c index aae9875194..c8aad6a0bb 100755 ---

Re: [libvirt] [PATCH 5/5] virsh: Don't open-code virJSONStringReformat in cmdQemuMonitorCommand

2019-09-17 Thread Daniel Henrique Barboza
On 9/16/19 9:45 AM, Peter Krempa wrote: Signed-off-by: Peter Krempa --- Reviewed-by: Daniel Henrique Barboza tools/virsh-domain.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/tools/virsh-domain.c b/tools/virsh-domain.c index 8c24935938..fbfdc09c0d 100644 ---

Re: [libvirt] [PATCH 4/5] virsh: Use VIR_AUTO machinery in cmdQemuMonitorCommand

2019-09-17 Thread Daniel Henrique Barboza
On 9/16/19 9:45 AM, Peter Krempa wrote: Signed-off-by: Peter Krempa --- Reviewed-by: Daniel Henrique Barboza tools/virsh-domain.c | 24 +++- 1 file changed, 7 insertions(+), 17 deletions(-) diff --git a/tools/virsh-domain.c b/tools/virsh-domain.c index

Re: [libvirt] [PATCH 3/5] virsh: Use virshDomain type in 'inject-nmi'

2019-09-17 Thread Daniel Henrique Barboza
On 9/16/19 9:45 AM, Peter Krempa wrote: With a nice side-effect of fixing alignment. Signed-off-by: Peter Krempa --- Reviewed-by: Daniel Henrique Barboza tools/virsh-domain.c | 8 +++- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/tools/virsh-domain.c

Re: [libvirt] [PATCH 1/5] virsh: Allow using VIR_AUTOPTR for releasing virDomainPtr in virsh

2019-09-17 Thread Daniel Henrique Barboza
On 9/16/19 9:45 AM, Peter Krempa wrote: I opted to alias the 'virDomainType' to 'virshDomain' so that it's obvious in all cases that this is a virsh-only construct. This is also somewhat consistent with virsh's use of 'virshDomainFree' wrapper for the freeing function which actually accepts

Re: [libvirt] [PATCH 2/5] virsh: demonstrate use of VIR_AUTOPTR(virshDomain) on 'send-process-signal'

2019-09-17 Thread Daniel Henrique Barboza
On 9/16/19 9:45 AM, Peter Krempa wrote: Refactor the command code to use the new type. Signed-off-by: Peter Krempa --- Reviewed-by: Daniel Henrique Barboza tools/virsh-domain.c | 17 ++--- 1 file changed, 6 insertions(+), 11 deletions(-) diff --git

Re: [libvirt] [virttools-planet PATCH] README: add instructions for adding a new blog

2019-09-17 Thread Daniel P . Berrangé
On Tue, Sep 17, 2019 at 02:31:51PM +0100, Stefan Hajnoczi wrote: > Signed-off-by: Stefan Hajnoczi > --- > README | 22 ++ > updater/virt-tools/basic/index.html.tmpl | 1 + > 2 files changed, 23 insertions(+) Reviewed-by: Daniel P. Berrangé

[libvirt] [PATCH v3 05/12] qemu: handle host usb device add/del udev events

2019-09-17 Thread Nikolay Shirokovskiy
Now when code handling attaching/detaching usb hostdev is appropriately changed use it to handle host usb device udev add/del events. As device adding/deleting needs acquiring job condition it is done in thread pool rather in event loop thread itself where udev events are delivered. However

[libvirt] [PATCH v3 03/12] qemu: support host usb device unplug

2019-09-17 Thread Nikolay Shirokovskiy
Handle host usb device unplug in DEVICE_DELETED handle execution path. Signed-off-by: Nikolay Shirokovskiy Reviewed-by: Daniel Henrique Barboza --- src/qemu/qemu_hotplug.c | 38 +++--- 1 file changed, 31 insertions(+), 7 deletions(-) diff --git

[libvirt] [PATCH v3 06/12] qemu: handle libvirtd restart after host usb device unplug

2019-09-17 Thread Nikolay Shirokovskiy
It is possible for libvirtd to go down before DEVICE_DELETED event is delivered upon usb hostdev unplug and to receive the event after the libvirtd is up. In order to handle this case we need to save usb hostdev deleteAction in status file. Signed-off-by: Nikolay Shirokovskiy Reviewed-by: Daniel

[libvirt] [PATCH v3 04/12] qemu: support usb hostdev plugging back

2019-09-17 Thread Nikolay Shirokovskiy
We are going to use qemuDomainAttachHostUSBDevice when host usb device is plugged back to node. Signed-off-by: Nikolay Shirokovskiy Reviewed-by: Daniel Henrique Barboza --- src/qemu/qemu_hotplug.c | 29 - 1 file changed, 24 insertions(+), 5 deletions(-) diff --git

[libvirt] [PATCH v3 10/12] qemu: don't mess with non mandatory hostdevs on reattaching

2019-09-17 Thread Nikolay Shirokovskiy
First I don't want to add code to handle dummy device that is used when host usb device is not present at the moment of starting/migrating etc. Second supporting non mandatory policies would require to handle races when host usb device is plugged to host and libvirtd starts adding device but if in

[libvirt] [PATCH v3 11/12] qemu: handle detaching of unplugged hostdev

2019-09-17 Thread Nikolay Shirokovskiy
If hostdev is unplugged we don't need to delete it's correspondent device from qemu etc. Just remove it from config immediately. Signed-off-by: Nikolay Shirokovskiy --- src/qemu/qemu_hotplug.c | 16 +++- src/util/virhostdev.c | 2 ++ 2 files changed, 17 insertions(+), 1

[libvirt] [PATCH v3 12/12] conf: parse hostdev missing flag

2019-09-17 Thread Nikolay Shirokovskiy
We want to keep this flag across libvirtd restarts. Signed-off-by: Nikolay Shirokovskiy Reviewed-by: Daniel Henrique Barboza --- src/conf/domain_conf.c | 6 ++ 1 file changed, 6 insertions(+) diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c index c2d141fc74..0af19e63d1 100644

[libvirt] [PATCH v3 01/12] conf: add replug option for usb hostdev

2019-09-17 Thread Nikolay Shirokovskiy
If usb device attached to a domain is unplugged from host and then plugged back then it will no longer be available in guest. We are going to support this case so that device will be detached from qemu on unplug and attached back on replug. As sometimes this behaviour is not desirable and for

[libvirt] [PATCH v3 00/12] hostdev: handle usb detach/attach on node

2019-09-17 Thread Nikolay Shirokovskiy
Diff to v2[1] version: - add 'replug' attribute for hostdev element to allow replug semantics - avoid accuiring domain lock in event loop thread on udev events as suggested by Peter - nit picks after review by Daniel Henrique Barboza * is used to mark patches that were 'Reviewed-by' by Daniel

[libvirt] [PATCH v3 02/12] qemu: track hostdev delete intention

2019-09-17 Thread Nikolay Shirokovskiy
So we are going to support replug of usb device on host. We need to delete device from qemu when the device is unplugged on host and to add device when the device is plugged back. As to deleting let's use same code as when we detach device from domain. But we need to keep the usb hostdev etc in

[libvirt] [PATCH v3 09/12] qemu: handle host usb device plug/unplug when libvirtd is down

2019-09-17 Thread Nikolay Shirokovskiy
Somebody can easily unplug usb device from host while libvirtd is being stopped. Also usb device can be plugged or unplugged/plugged back and so forth. Let's handle such cases. Signed-off-by: Nikolay Shirokovskiy Reviewed-by: Daniel Henrique Barboza --- src/qemu/qemu_process.c | 56

[libvirt] [PATCH v3 08/12] qemu: hotplug: update device list on device deleted event

2019-09-17 Thread Nikolay Shirokovskiy
I guess this is the missing piece for [1]. It did not hurt before (like we didn't even see any errors/warns in logs) because in qemuProcessUpdateDevices function virDomainDefFindDevice does not find device deleted from libvirt config. But now in case of unpluggind usb device from host we leave

[libvirt] [PATCH v3 07/12] qemu: handle race on device deletion and usb host device plugging

2019-09-17 Thread Nikolay Shirokovskiy
Imagine host usb device is unplugged from host and as a result we send command to qemu to delete appropriate device. Then before qemu device is deleted host usb device is plugged back. Currently code supposes there is no remnant device in qemu and will try to add new device and the attempt will

[libvirt] [virttools-planet PATCH] README: add instructions for adding a new blog

2019-09-17 Thread Stefan Hajnoczi
Signed-off-by: Stefan Hajnoczi --- README | 22 ++ updater/virt-tools/basic/index.html.tmpl | 1 + 2 files changed, 23 insertions(+) diff --git a/README b/README index 1013e71..ad388f8 100644 --- a/README +++ b/README @@ -6,6 +6,28 @@ This

[libvirt] Call for volunteers: LWN.net articles about KVM Forum talks

2019-09-17 Thread Stefan Hajnoczi
Hi, LWN.net is a popular open source news site that covers Linux and other open source communities (Python, GNOME, Debian, etc). It has published a few KVM articles in the past too. Let's raise awareness of QEMU, KVM, and libvirt by submitting articles covering KVM Forum. I am looking for ~5

Re: [libvirt] [RFC] quirks of interface target device name

2019-09-17 Thread Laine Stump
On 9/16/19 3:44 PM, Laine Stump wrote: I vote for putting a check in virDomainNetDefValidate() that errors out if it finds target dev present but empty. There may be some who would say "it's existing behavior and has been like this for a long time, so we have to preserve it", but since the

Re: [libvirt] [PATCH 0/2] Fix systemd socket activation for systemd < v227

2019-09-17 Thread Daniel P . Berrangé
On Tue, Sep 17, 2019 at 05:03:55PM +1000, Michael Chapman wrote: > A couple of bugs were encountered using socket activated libvirtd on > CentOS 7: It actually hits on new distros too > - When resolving a tls_port/tcp_port from the config file (needed even > when using socket activation on

Re: [libvirt] [PATCH 1/2] util: fix byte order of port in virSocketAddrResolveService

2019-09-17 Thread Daniel P . Berrangé
On Tue, Sep 17, 2019 at 05:03:56PM +1000, Michael Chapman wrote: > The ports in the socket address structures returned by getaddrinfo() are > in network byte order. Convert to host byte order before returning them. > > Signed-off-by: Michael Chapman > --- > src/util/virsocketaddr.c | 4 ++-- >

Re: [libvirt] [PATCH 2/2] remote: fix registration of TLS socket

2019-09-17 Thread Daniel P . Berrangé
On Tue, Sep 17, 2019 at 05:03:57PM +1000, Michael Chapman wrote: > Signed-off-by: Michael Chapman > --- > src/remote/remote_daemon.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/src/remote/remote_daemon.c b/src/remote/remote_daemon.c > index 966f3da2d0..7195ac9218

Re: [libvirt] [RFC] quirks of interface target device name

2019-09-17 Thread Nikolay Shirokovskiy
On 16.09.2019 22:44, Laine Stump wrote: > On 9/16/19 10:44 AM, Nikolay Shirokovskiy wrote: >> Hi, all >> >> I recently discovered that input is allowed[*] > > > So you're saying this previously failed? Catastrophically (SEGV)? Or did it > log an error and refuse to start the domain? Without

[libvirt] [PATCH 1/2] util: fix byte order of port in virSocketAddrResolveService

2019-09-17 Thread Michael Chapman
The ports in the socket address structures returned by getaddrinfo() are in network byte order. Convert to host byte order before returning them. Signed-off-by: Michael Chapman --- src/util/virsocketaddr.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git

[libvirt] [PATCH 2/2] remote: fix registration of TLS socket

2019-09-17 Thread Michael Chapman
Signed-off-by: Michael Chapman --- src/remote/remote_daemon.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/remote/remote_daemon.c b/src/remote/remote_daemon.c index 966f3da2d0..7195ac9218 100644 --- a/src/remote/remote_daemon.c +++ b/src/remote/remote_daemon.c @@

[libvirt] [PATCH 0/2] Fix systemd socket activation for systemd < v227

2019-09-17 Thread Michael Chapman
A couple of bugs were encountered using socket activated libvirtd on CentOS 7: - When resolving a tls_port/tcp_port from the config file (needed even when using socket activation on systemd < v227), the port endianness was incorrect. - The wrong name was used when checking whether