Re: [PATCH] qemu: Do not report eof when processing monitor IO

2021-10-15 Thread Jim Fehlig
On 10/15/21 01:22, Michal Prívozník wrote: On 10/15/21 1:53 AM, Jim Fehlig wrote: There have been countless reports from users concerned about the following error reported by libvirtd when qemu domains are shutdown internal error: End of file from qemu monitor While the error is harmless, user

Re: [PATCH v2 00/15] qdev: Add JSON -device

2021-10-15 Thread Kevin Wolf
Am 08.10.2021 um 15:34 hat Kevin Wolf geschrieben: > It's still a long way until we'll have QAPIfied devices, but there are > some improvements that we can already make now to make the future switch > easier. > > One important part of this is having code paths without QemuOpts, which > we want to

[PATCH 1/2] objecteventtest: Drop lifecycleEventCounter_reset()

2021-10-15 Thread Michal Privoznik
The sole purpose of the lifecycleEventCounter_reset() function is to zero out given lifecycleEventCounter struct. Well, we can let the compiler zero it out when declaring a variable and just remove the function. Signed-off-by: Michal Privoznik --- tests/objecteventtest.c | 66 +--

[PATCH 2/2] objecteventtest: Don't overwrite @ret on failure

2021-10-15 Thread Michal Privoznik
Our general pattern is to initialize @ret to -1 and set it to 0 only at the end of a function. Some functions in objecteventtest.c do not follow this pattern. Signed-off-by: Michal Privoznik --- tests/objecteventtest.c | 63 ++--- 1 file changed, 22 insertions

[PATCH 0/2] objecteventtest: Two simple improvements

2021-10-15 Thread Michal Privoznik
*** BLURB HERE *** Michal Prívozník (2): objecteventtest: Drop lifecycleEventCounter_reset() objecteventtest: Don't overwrite @ret on failure tests/objecteventtest.c | 129 +++- 1 file changed, 36 insertions(+), 93 deletions(-) -- 2.32.0

Re: [PATCH 3/4] qemu_driver: add check for qemu capabilities requirements

2021-10-15 Thread Michal Prívozník
On 10/15/21 11:49 AM, Hiroki Narukawa wrote: > query-dirty-rate command is used for virsh domstats by default, but this > is available only on qemu >=5.2.0. > > By this commit, qemu domain stats will check capabilities requirements before > issuing actual query. > > Signed-off-by: Hiroki Narukaw

Re: [PATCH 2/4] qemu_driver: add required capabilities to qemuDomainGetStatsWorkers

2021-10-15 Thread Michal Prívozník
On 10/15/21 11:49 AM, Hiroki Narukawa wrote: > One of qemuDomainGetStatsWorkers requires capabilities to run. > > This commit adds capability information to qemuDomainGetStatsWorkers. > > Signed-off-by: Hiroki Narukawa > --- > src/qemu/qemu_driver.c | 32 +--- > 1 fi

Re: [PATCH 0/4] Fix the bug about virsh domstats on qemu <5.2.0

2021-10-15 Thread Michal Prívozník
On 10/15/21 11:49 AM, Hiroki Narukawa wrote: > query-dirty-rate command is used for virsh domstats regardless of qemu > version, but this is available only on qemu >=5.2.0. > > So virsh domstats fails if qemu is older. > > This patchset fixes the bug. > > I added it to NEWS because I thought it

Re: [PATCH 4/4] NEWS: document bug fix about virsh domstats on qemu < 5.2.0

2021-10-15 Thread Michal Prívozník
On 10/15/21 11:49 AM, Hiroki Narukawa wrote: > I think that virsh domstats problem on qemu < 5.2.0 is what users want > to find which version fixes. > --- > NEWS.rst | 5 + > 1 file changed, 5 insertions(+) > > diff --git a/NEWS.rst b/NEWS.rst > index ae678bffc4..2c51628278 100644 > --- a/NEW

Re: [PATCH v2 00/15] qdev: Add JSON -device

2021-10-15 Thread Peter Krempa
On Fri, Oct 08, 2021 at 15:34:27 +0200, Kevin Wolf wrote: > It's still a long way until we'll have QAPIfied devices, but there are > some improvements that we can already make now to make the future switch > easier. > > One important part of this is having code paths without QemuOpts, which > we w

Re: [PATCH 2/2] virnetsocket: Use g_auto* more

2021-10-15 Thread Ján Tomko
On a Friday in 2021, Michal Privoznik wrote: There are few functions in virnetsocket.c where an object/memory is freed by explicit call. Use g_autoptr()/g_autofree/VIR_AUTOCLOSE to do that automatically. Signed-off-by: Michal Privoznik --- src/rpc/virnetsocket.c | 57 +++

Re: [PATCH 1/2] virnetsocket: Don't free virCommand in virNetSocketNewConnectCommand()

2021-10-15 Thread Ján Tomko
On a Friday in 2021, Michal Privoznik wrote: The aim of virNetSocketNewConnectCommand() is to execute passed command and attach socket pair/pipe to it so that client socket can be opened (this is used for connections with alternative transports, e.g. ssh). The virCommand is created in a caller an

Re: [PATCH 1/1] qemu_validate: Fix capability check for disk queue_size

2021-10-15 Thread Michal Prívozník
On 10/15/21 12:11 PM, Hiroki Narukawa wrote: > Commit ad209e7d adds QEMU_CAPS_VIRTIO_BLK_QUEUE_SIZE capability, but > the following commit 2d6d67e1 missed to use it and uses > QEMU_CAPS_VIRTIO_BLK_NUM_QUEUES instead. > > This commit fixes the mistake. > > Signed-off-by: Hiroki Narukawa > --- >

[PATCH 2/2] virnetsocket: Use g_auto* more

2021-10-15 Thread Michal Privoznik
There are few functions in virnetsocket.c where an object/memory is freed by explicit call. Use g_autoptr()/g_autofree/VIR_AUTOCLOSE to do that automatically. Signed-off-by: Michal Privoznik --- src/rpc/virnetsocket.c | 57 +++--- 1 file changed, 20 insertions

[PATCH 1/2] virnetsocket: Don't free virCommand in virNetSocketNewConnectCommand()

2021-10-15 Thread Michal Privoznik
The aim of virNetSocketNewConnectCommand() is to execute passed command and attach socket pair/pipe to it so that client socket can be opened (this is used for connections with alternative transports, e.g. ssh). The virCommand is created in a caller and then passed to virNetSocketNewConnectCommand(

[PATCH 0/2] virnetsocket: Use g_auto* more

2021-10-15 Thread Michal Privoznik
*** BLURB HERE *** Michal Prívozník (2): virnetsocket: Don't free virCommand in virNetSocketNewConnectCommand() virnetsocket: Use g_auto* more src/rpc/virnetsocket.c | 64 +++--- 1 file changed, 22 insertions(+), 42 deletions(-) -- 2.32.0

Re: [PATCH 4/5] qemuxml2argvtest: Drop negative virtio-*-ats tests

2021-10-15 Thread Peter Krempa
On Fri, Oct 15, 2021 at 12:26:29 +0200, Michal Privoznik wrote: > There are some tests cases in qemuxml2argvtest that aim to check > whether our validator rejects when > QEMU_CAPS_VIRTIO_PCI_ATS capability is not present. Well, such > scenario can't happen really because the capability will alway

Re: [PATCH 5/5] qemu: capabilities: Retire QEMU_CAPS_VIRTIO_PCI_ATS

2021-10-15 Thread Peter Krempa
On Fri, Oct 15, 2021 at 12:26:30 +0200, Michal Privoznik wrote: > The capability reflects whether QEMU is capable of -device > virtio-*,ats=. Since the property was introduced in QEMU commit > v2.9.0-rc0~162^2~32 we can safely assume the property is always > present as the minimal version required

Re: [PATCH 2/5] qemuxml2argvtest: Drop negative virtio-*-iommu tests

2021-10-15 Thread Peter Krempa
On Fri, Oct 15, 2021 at 12:26:27 +0200, Michal Privoznik wrote: > There are some tests cases in qemuxml2argvtest that aim to check > whether our validator rejects when > QEMU_CAPS_VIRTIO_PCI_IOMMU_PLATFORM capability is not present. > Well, such scenario can't happen really because the capability

Re: [PATCH 3/5] qemu: capabilities: Retire QEMU_CAPS_VIRTIO_PCI_IOMMU_PLATFORM

2021-10-15 Thread Peter Krempa
On Fri, Oct 15, 2021 at 12:26:28 +0200, Michal Privoznik wrote: > The capability reflects whether QEMU is capable of -device > virtio-*,iommu_platform=. Since the property was introduced in > QEMU commit v2.9.0-rc0~162^2~37 we can safely assume the property > is always present as the minimal versio

Re: [PATCH 1/5] test: Drop unused .args or .xml files

2021-10-15 Thread Peter Krempa
On Fri, Oct 15, 2021 at 12:26:26 +0200, Michal Privoznik wrote: > There are a few files containing expected output for test cases > that no longer exist. Remove them. > > Signed-off-by: Michal Privoznik > --- > .../luks-disks-source-qcow2.args | 49 --- > .../qemuxml

[PATCH 3/5] qemu: capabilities: Retire QEMU_CAPS_VIRTIO_PCI_IOMMU_PLATFORM

2021-10-15 Thread Michal Privoznik
The capability reflects whether QEMU is capable of -device virtio-*,iommu_platform=. Since the property was introduced in QEMU commit v2.9.0-rc0~162^2~37 we can safely assume the property is always present as the minimal version required is 2.11.0. Signed-off-by: Michal Privoznik --- src/qemu/qe

[PATCH 5/5] qemu: capabilities: Retire QEMU_CAPS_VIRTIO_PCI_ATS

2021-10-15 Thread Michal Privoznik
The capability reflects whether QEMU is capable of -device virtio-*,ats=. Since the property was introduced in QEMU commit v2.9.0-rc0~162^2~32 we can safely assume the property is always present as the minimal version required is 2.11.0. Signed-off-by: Michal Privoznik --- src/qemu/qemu_capabili

[PATCH 4/5] qemuxml2argvtest: Drop negative virtio-*-ats tests

2021-10-15 Thread Michal Privoznik
There are some tests cases in qemuxml2argvtest that aim to check whether our validator rejects when QEMU_CAPS_VIRTIO_PCI_ATS capability is not present. Well, such scenario can't happen really because the capability will always be present. Signed-off-by: Michal Privoznik --- .../virtio-options-

[PATCH 2/5] qemuxml2argvtest: Drop negative virtio-*-iommu tests

2021-10-15 Thread Michal Privoznik
There are some tests cases in qemuxml2argvtest that aim to check whether our validator rejects when QEMU_CAPS_VIRTIO_PCI_IOMMU_PLATFORM capability is not present. Well, such scenario can't happen really because the capability will always be present. Signed-off-by: Michal Privoznik --- .../virti

[PATCH 1/5] test: Drop unused .args or .xml files

2021-10-15 Thread Michal Privoznik
There are a few files containing expected output for test cases that no longer exist. Remove them. Signed-off-by: Michal Privoznik --- .../luks-disks-source-qcow2.args | 49 --- .../qemuxml2xmloutdata/disk-virtio-queues.xml | 1 - tests/qemuxml2xmloutdata/panic-isa.

[PATCH 0/5] qemu: Retire two virtio related capabilities

2021-10-15 Thread Michal Privoznik
*** BLURB HERE *** Michal Prívozník (5): test: Drop unused .args or .xml files qemuxml2argvtest: Drop negative virtio-*-iommu tests qemu: capabilities: Retire QEMU_CAPS_VIRTIO_PCI_IOMMU_PLATFORM qemuxml2argvtest: Drop negative virtio-*-ats tests qemu: capabilities: Retire QEMU_CAPS_VIRTI

[PATCH 0/1] Fix the bug on disk->queue_size capability validation

2021-10-15 Thread Hiroki Narukawa
Sorry, the patch I send in September 2021 had a mistake on capability check. This patch fixes that. Hiroki Narukawa (1): qemu_validate: Fix capability check for disk queue_size src/qemu/qemu_validate.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- 2.17.1

[PATCH 1/1] qemu_validate: Fix capability check for disk queue_size

2021-10-15 Thread Hiroki Narukawa
Commit ad209e7d adds QEMU_CAPS_VIRTIO_BLK_QUEUE_SIZE capability, but the following commit 2d6d67e1 missed to use it and uses QEMU_CAPS_VIRTIO_BLK_NUM_QUEUES instead. This commit fixes the mistake. Signed-off-by: Hiroki Narukawa --- src/qemu/qemu_validate.c | 2 +- 1 file changed, 1 insertion(+)

[libvirt PATCH v4 4/5] qemu: add guest interface information in 'qemuDomainGetGuestInfo'

2021-10-15 Thread zhanglei
Support return guest interface information from guest agent Signed-off-by: zhanglei --- src/qemu/qemu_driver.c | 88 +- 1 file changed, 87 insertions(+), 1 deletion(-) diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c index 7e058a9309..06889641

[libvirt PATCH v4 3/5] qemu: refactor 'qemuAgentGetInterfaces'

2021-10-15 Thread zhanglei
Add report_unsupported parameter to qemuAgentGetInterfaces Signed-off-by: zhanglei --- src/qemu/qemu_agent.c | 9 ++--- src/qemu/qemu_agent.h | 3 ++- src/qemu/qemu_driver.c | 2 +- tests/qemuagenttest.c | 2 +- 4 files changed, 10 insertions(+), 6 deletions(-) diff --git a/src/qemu/qemu

[libvirt PATCH v4 2/5] virsh: add interface information to guestinfo command

2021-10-15 Thread zhanglei
The new parameter group returns information about network interfaces Signed-off-by: zhanglei --- docs/manpages/virsh.rst | 12 ++-- src/libvirt-domain.c| 2 +- tools/virsh-domain.c| 6 ++ 3 files changed, 17 insertions(+), 3 deletions(-) diff --git a/docs/manpages/virsh.rs

[libvirt PATCH v4 5/5] NEWS: add guest interface information in 'virDomainGetGuestInfo'

2021-10-15 Thread zhanglei
Signed-off-by: zhanglei --- NEWS.rst | 5 + 1 file changed, 5 insertions(+) diff --git a/NEWS.rst b/NEWS.rst index ae678bffc4..0d343bf33c 100644 --- a/NEWS.rst +++ b/NEWS.rst @@ -42,6 +42,11 @@ v7.9.0 (unreleased) * **Improvements** + * qemu: Report guest interface information in ``vir

[libvirt PATCH v4 0/5] add interface infomation in guestinfo command

2021-10-15 Thread zhanglei
zhanglei (5): domain: add interface information to 'virDomainGetGuestInfo' virsh: add interface information to guestinfo command qemu: refactor 'qemuAgentGetInterfaces' qemu: add guest interface information in 'qemuDomainGetGuestInfo' NEWS: add guest interface information in 'virDomain

[libvirt PATCH v4 1/5] domain: add interface information to 'virDomainGetGuestInfo'

2021-10-15 Thread zhanglei
Signed-off-by: zhanglei --- include/libvirt/libvirt-domain.h | 1 + src/libvirt-domain.c | 12 2 files changed, 13 insertions(+) diff --git a/include/libvirt/libvirt-domain.h b/include/libvirt/libvirt-domain.h index eaafcc6b29..2f017c5b68 100644 --- a/include/libvirt/li

[PATCH 2/4] qemu_driver: add required capabilities to qemuDomainGetStatsWorkers

2021-10-15 Thread Hiroki Narukawa
One of qemuDomainGetStatsWorkers requires capabilities to run. This commit adds capability information to qemuDomainGetStatsWorkers. Signed-off-by: Hiroki Narukawa --- src/qemu/qemu_driver.c | 32 +--- 1 file changed, 21 insertions(+), 11 deletions(-) diff --git a/s

[PATCH 4/4] NEWS: document bug fix about virsh domstats on qemu < 5.2.0

2021-10-15 Thread Hiroki Narukawa
I think that virsh domstats problem on qemu < 5.2.0 is what users want to find which version fixes. --- NEWS.rst | 5 + 1 file changed, 5 insertions(+) diff --git a/NEWS.rst b/NEWS.rst index ae678bffc4..2c51628278 100644 --- a/NEWS.rst +++ b/NEWS.rst @@ -44,6 +44,11 @@ v7.9.0 (unreleased)

[PATCH 1/4] qemu_capabilities: Add QEMU_CAPS_QUERY_DIRTY_RATE capability

2021-10-15 Thread Hiroki Narukawa
query-dirty-rate command is used for virsh domstats by default, but this is available only on qemu >=5.2.0. In this commit, add capability flag for query-dirty-rate first. Signed-off-by: Hiroki Narukawa --- src/qemu/qemu_capabilities.c | 2 ++ src/qemu/qemu_capabilities.h

[PATCH 0/4] Fix the bug about virsh domstats on qemu <5.2.0

2021-10-15 Thread Hiroki Narukawa
query-dirty-rate command is used for virsh domstats regardless of qemu version, but this is available only on qemu >=5.2.0. So virsh domstats fails if qemu is older. This patchset fixes the bug. I added it to NEWS because I thought it is a bug that users want to find, but if it is not so pleas

[PATCH 3/4] qemu_driver: add check for qemu capabilities requirements

2021-10-15 Thread Hiroki Narukawa
query-dirty-rate command is used for virsh domstats by default, but this is available only on qemu >=5.2.0. By this commit, qemu domain stats will check capabilities requirements before issuing actual query. Signed-off-by: Hiroki Narukawa --- src/qemu/qemu_driver.c | 40 +++

Re: [PATCH v3 0/2] Implement paeg-per-vq to virtio devices

2021-10-15 Thread Michal Prívozník
On 10/15/21 8:09 AM, Han Han wrote: > Diff from v2: > - Remove the code of qemu capabilities since the least supported QEMU > version is over the version introducing paeg-per-vq. > - Rebase to latest upstream > > v2: https://listman.redhat.com/archives/libvir-list/2021-October/msg00489.html > >

Re: [PATCH v2 09/15] softmmu/qdev-monitor: add error handling in qdev_set_id

2021-10-15 Thread Kevin Wolf
Am 13.10.2021 um 23:37 hat Eric Blake geschrieben: > On Wed, Oct 13, 2021 at 03:10:38PM +0200, Damien Hedde wrote: > > > > @@ -691,7 +703,13 @@ DeviceState *qdev_device_add(QemuOpts *opts, Error > > > > **errp) > > > > } > > > > } > > > > -qdev_set_id(dev, g_strdup(qemu_opts_id

Re: [PATCH] qemu: Do not report eof when processing monitor IO

2021-10-15 Thread Michal Prívozník
On 10/15/21 1:53 AM, Jim Fehlig wrote: > There have been countless reports from users concerned about the following > error reported by libvirtd when qemu domains are shutdown > > internal error: End of file from qemu monitor > > While the error is harmless, users often mistaken it for real probl

Re: [RFC PATCH] qemu: Do not report eof when processing monitor IO

2021-10-15 Thread Jim Fehlig
On 10/13/21 05:02, Michal Prívozník wrote: On 10/8/21 11:37 PM, Jim Fehlig wrote: There have been countless reports from users concerned about the following error reported by libvirtd when qemu domains are shutdown internal error: End of file from qemu monitor While the error is harmless, user