Re: [libvirt PATCH 9/9] spec: Introduce arches_*

2020-10-06 Thread Neal Gompa
On Tue, Oct 6, 2020 at 12:35 PM Andrea Bolognani wrote: > > On Tue, 2020-10-06 at 08:15 -0400, Neal Gompa wrote: > > Then can we flip this conditional to %if 0%{?rhel} for the > > architecture list? As it is, it's unclear that the reason that *RHEL* > > is the less-capable variant. > > Are you

Re: [libvirt PATCH 00/14] refactor qemuAgentGetInterfaces

2020-10-06 Thread Jonathon Jongsma
On Tue, 6 Oct 2020 08:58:36 +0200 Ján Tomko wrote: > Recently, I have spent some time trying to figure out what this > function does. Let me share that with you before I forget. > > Ján Tomko (14): > qemu: agent: remove redundant checks > qemu: agent: split out

Re: [libvirt PATCH 09/14] qemu: agent: split out qemuAgentGetInterfaceAddresses

2020-10-06 Thread Jonathon Jongsma
On Tue, 6 Oct 2020 08:58:45 +0200 Ján Tomko wrote: > Convert one interface from the "return" array returned by > "guest-network-get-interfaces" to virDomainInterface. > > Due to the functionality of squashing interface aliases together, > this is not a pure function - it either: > * Adds the

Re: [PATCH v2 01/10] hyperv: make Msvm_ComputerSystem WQL queries locale agnostic

2020-10-06 Thread Matt Coleman
> On Oct 6, 2020, at 4:21 AM, Daniel P. Berrangé wrote: > > On Mon, Oct 05, 2020 at 09:13:29PM -0400, Matt Coleman wrote: >>> On Oct 5, 2020, at 8:54 PM, Neal Gompa wrote: >>> >>> Should we require a bump to openwsman 2.6 for this? >> >> That won’t make any difference: openwsman 2.6+ supports

Re: [libvirt PATCH 05/14] qemu: agent: expand addrs upfront

2020-10-06 Thread Jonathon Jongsma
On Tue, 6 Oct 2020 08:58:41 +0200 Ján Tomko wrote: > qemuAgentGetInterfaceOneAddress returns exactly one address > for every iteration of the loop (and we error out if not). > > Instead of expanding the addrs by one on every iteration, > do it upfront since we know how many times the loop will

Re: [PATCH 0/2] qemu: migration corner case fix and cleanup

2020-10-06 Thread Nikolay Shirokovskiy
Polite ping On 14.09.2020 19:10, Nikolay Shirokovskiy wrote: > There is issue with second patch. Probably this unset/set was too mysterious > and I miss one point - we do need to call unset on error path as in case > of non p2p migration confirm step will not be called. > > So this need to be

Re: [libvirt PATCH 02/14] qemu: agent: split out qemuAgentGetInterfaceOneAddress

2020-10-06 Thread Jonathon Jongsma
On Tue, 6 Oct 2020 08:58:38 +0200 Ján Tomko wrote: > A function that takes one entry from the "ip-addresses" array > returned by "guest-network-get-interfaces" and converts it > into virDomainIPAddress. > > Signed-off-by: Ján Tomko > --- > src/qemu/qemu_agent.c | 78 >

Re: [libvirt PATCHv3 0/4] Add support for QEMU's fmode and dmode

2020-10-06 Thread Brian Turek
Peter Krempa wrote: > Since the qemu command line option is formatted as 4 octal digits, a > mode such as '1775' which is a valid mode for a directory will still be > formatted as something which looks like a decimal number: > > -fsdev

Re: [libvirt PATCH 1/9] spec: Simplify setting features off by default

2020-10-06 Thread Andrea Bolognani
On Tue, 2020-10-06 at 07:41 -0400, Neal Gompa wrote: > On Tue, Oct 6, 2020 at 6:09 AM Andrea Bolognani wrote: > > On Mon, 2020-10-05 at 20:42 -0400, Neal Gompa wrote: > > > This crazy setup is an attempt to implement rpm %bcond behavior > > > without actually using %bcond statements. Instead of

Re: [libvirt PATCH 9/9] spec: Introduce arches_*

2020-10-06 Thread Andrea Bolognani
On Tue, 2020-10-06 at 08:15 -0400, Neal Gompa wrote: > Then can we flip this conditional to %if 0%{?rhel} for the > architecture list? As it is, it's unclear that the reason that *RHEL* > is the less-capable variant. Are you thinking of something like %define arches_qemu_kvm

[RFC] qemu: virtiofs can be used without NUMA nodes

2020-10-06 Thread Marc Hartmayer
...if a machine memory-backend using shared memory is configured for the guest. This is especially important for QEMU machine types that don't have NUMA but virtiofs support. An example snippet: test 2097152 ...

Re: [RFC] bhyve: modeling virtio-9p

2020-10-06 Thread Daniel P . Berrangé
On Tue, Oct 06, 2020 at 07:31:30PM +0400, Roman Bogorodskiy wrote: > Daniel P. Berrangé wrote: > > > On Tue, Oct 06, 2020 at 06:51:52PM +0400, Roman Bogorodskiy wrote: > > > Hi, > > > > > > Recently bhyve got virtio-9p support. Modeling it appears to be pretty > > > straight-forward, but

Re: [RFC] bhyve: modeling virtio-9p

2020-10-06 Thread Roman Bogorodskiy
Daniel P. Berrangé wrote: > On Tue, Oct 06, 2020 at 06:51:52PM +0400, Roman Bogorodskiy wrote: > > Hi, > > > > Recently bhyve got virtio-9p support. Modeling it appears to be pretty > > straight-forward, but probably I'm missing something, so decided to > > discuss first before proceeding with

Re: [libvirt PATCH 6/9] spec: Move _vpath_builddir definition

2020-10-06 Thread Andrea Bolognani
On Tue, 2020-10-06 at 07:51 -0400, Neal Gompa wrote: > On Tue, Oct 6, 2020 at 6:28 AM Andrea Bolognani wrote: > > We're installing Meson from PyPi instead of EPEL on CentOS as part of > > our CI setup, but indeed it looks like that's not necessary and we > > could simply use the EPEL package.

Re: [RFC] bhyve: modeling virtio-9p

2020-10-06 Thread Daniel P . Berrangé
On Tue, Oct 06, 2020 at 06:51:52PM +0400, Roman Bogorodskiy wrote: > Hi, > > Recently bhyve got virtio-9p support. Modeling it appears to be pretty > straight-forward, but probably I'm missing something, so decided to > discuss first before proceeding with the implementation. > > On the host

[RFC] bhyve: modeling virtio-9p

2020-10-06 Thread Roman Bogorodskiy
Hi, Recently bhyve got virtio-9p support. Modeling it appears to be pretty straight-forward, but probably I'm missing something, so decided to discuss first before proceeding with the implementation. On the host side it looks like this: bhyve -s

Re: [PATCH v2 0/4] cpu_map: Add EPYC-Rome model

2020-10-06 Thread Jiri Denemark
On Thu, Oct 01, 2020 at 12:22:00 +0200, Markus Schade wrote: > this patch series adds testdata from an AMD EPYC 7502 system, > defines and enables the qemu EPYC-Rome model and changes > the existing Ryzen 9 host definition to the new model > > Markus Schade (4): > Add testdata for AMD EPYC 7502

Re: [PATCH v2 2/4] cpu_map: Defined and enable EPYC-Rome model

2020-10-06 Thread Jiri Denemark
On Thu, Oct 01, 2020 at 12:22:02 +0200, Markus Schade wrote: > Signed-off-by: Markus Schade > --- > src/cpu_map/index.xml | 1 + > src/cpu_map/meson.build | 1 + > src/cpu_map/x86_EPYC-Rome.xml | 81 +++ > 3 files changed, 83 insertions(+) >

Re: [PATCH v2 1/4] Add testdata for AMD EPYC 7502

2020-10-06 Thread Jiri Denemark
On Thu, Oct 01, 2020 at 12:22:01 +0200, Markus Schade wrote: > Signed-off-by: Markus Schade > --- > tests/cputest.c |1 + > ...86_64-cpuid-EPYC-7502-32-Core-disabled.xml |9 + > ...x86_64-cpuid-EPYC-7502-32-Core-enabled.xml | 11 + >

Re: [libvirt PATCH] Fix incorrect g_new0 conversions

2020-10-06 Thread Martin Kletzander
On Tue, Oct 06, 2020 at 03:05:11PM +0200, Ján Tomko wrote: On a Tuesday in 2020, Martin Kletzander wrote: On Tue, Oct 06, 2020 at 01:15:01PM +0200, Ján Tomko wrote: I left in a 'return' or 'goto cleanup' in a few places that where I did the conversion manually. Did you mean s/that// maybe?

Re: [PATCH v2 00/10] hyperv: implement new APIs & more

2020-10-06 Thread Neal Gompa
On Mon, Oct 5, 2020 at 9:07 PM Neal Gompa wrote: > > On Mon, Oct 5, 2020 at 12:20 PM Matt Coleman wrote: > > > > These patches fix a couple bugs, consolidate duplicate code, and > > implement several APIs. > > > > Currently, some interactions with Hyper-V systems fail when the system > > is not

Re: [libvirt PATCH] Fix incorrect g_new0 conversions

2020-10-06 Thread Ján Tomko
On a Tuesday in 2020, Martin Kletzander wrote: On Tue, Oct 06, 2020 at 01:15:01PM +0200, Ján Tomko wrote: I left in a 'return' or 'goto cleanup' in a few places that where I did the conversion manually. Did you mean s/that// maybe? Thanks, I fixed it before you pointed it out. Did you

Re: [libvirt PATCH] Fix incorrect g_new0 conversions

2020-10-06 Thread Martin Kletzander
On Tue, Oct 06, 2020 at 01:15:01PM +0200, Ján Tomko wrote: I left in a 'return' or 'goto cleanup' in a few places that where I did the conversion manually. Did you mean s/that// maybe? Signed-off-by: Ján Tomko Reported-by: John Ferlan --- src/esx/esx_storage_backend_vmfs.c | 1 -

Re: [libvirt PATCH 9/9] spec: Introduce arches_*

2020-10-06 Thread Neal Gompa
On Tue, Oct 6, 2020 at 6:41 AM Andrea Bolognani wrote: > > On Mon, 2020-10-05 at 20:40 -0400, Neal Gompa wrote: > > On Mon, Oct 5, 2020 at 2:41 PM Andrea Bolognani wrote: > > > %if 0%{?fedora} > > > +%define arches_qemu_kvm %{arches_x86} %{power64} s390x %{arm} > > > aarch64 > > >

Re: [libvirt PATCH] Fix incorrect g_new0 conversions

2020-10-06 Thread John Ferlan
On 10/6/20 7:15 AM, Ján Tomko wrote: > I left in a 'return' or 'goto cleanup' in a few places that > where I did the conversion manually. > > Signed-off-by: Ján Tomko > Reported-by: John Ferlan > --- > src/esx/esx_storage_backend_vmfs.c | 1 - > src/libxl/libxl_capabilities.c

Re: [libvirt PATCH 6/9] spec: Move _vpath_builddir definition

2020-10-06 Thread Neal Gompa
On Tue, Oct 6, 2020 at 6:28 AM Andrea Bolognani wrote: > > On Mon, 2020-10-05 at 20:46 -0400, Neal Gompa wrote: > > On Mon, Oct 5, 2020 at 2:41 PM Andrea Bolognani wrote: > > > It belongs before package-specific feature flags are defined. > > > > > > Signed-off-by: Andrea Bolognani > > > --- >

Re: [libvirt PATCH 1/9] spec: Simplify setting features off by default

2020-10-06 Thread Neal Gompa
On Tue, Oct 6, 2020 at 6:09 AM Andrea Bolognani wrote: > > On Mon, 2020-10-05 at 20:42 -0400, Neal Gompa wrote: > > On Mon, Oct 5, 2020 at 2:40 PM Andrea Bolognani wrote: > > > -%define with_fuse 0%{!?_without_fuse:0} > > > -%define with_sanlock 0%{!?_without_sanlock:0} > > >

Re: [libvirt PATCHv2] qemu: process: use g_new0

2020-10-06 Thread Ján Tomko
On a Tuesday in 2020, John Ferlan wrote: [...] Coverity notes... @@ -1074,20 +1070,17 @@ qemuProcessHandleGraphics(qemuMonitorPtr mon G_GNUC_UNUSED, virDomainEventGraphicsSubjectPtr subject = NULL; size_t i; -if (VIR_ALLOC(localAddr) < 0) -goto error; +localAddr =

Re: [libvirt PATCH 9/9] qemu: use g_new0

2020-10-06 Thread Ján Tomko
On a Tuesday in 2020, John Ferlan wrote: Coverity notes ... diff --git a/src/qemu/qemu_hotplug.c b/src/qemu/qemu_hotplug.c index 11b549b12b..09f8525cfa 100644 --- a/src/qemu/qemu_hotplug.c +++ b/src/qemu/qemu_hotplug.c @@ -1282,10 +1277,9 @@ qemuDomainAttachNetDevice(virQEMUDriverPtr driver,

[libvirt PATCH] Fix incorrect g_new0 conversions

2020-10-06 Thread Ján Tomko
I left in a 'return' or 'goto cleanup' in a few places that where I did the conversion manually. Signed-off-by: Ján Tomko Reported-by: John Ferlan --- src/esx/esx_storage_backend_vmfs.c | 1 - src/libxl/libxl_capabilities.c | 2 -- src/libxl/libxl_driver.c

Re: [libvirt PATCHv2] qemu: process: use g_new0

2020-10-06 Thread John Ferlan
[...] Coverity notes... > @@ -1074,20 +1070,17 @@ qemuProcessHandleGraphics(qemuMonitorPtr mon > G_GNUC_UNUSED, > virDomainEventGraphicsSubjectPtr subject = NULL; > size_t i; > > -if (VIR_ALLOC(localAddr) < 0) > -goto error; > +localAddr =

Re: [libvirt PATCH 9/9] qemu: use g_new0

2020-10-06 Thread John Ferlan
Coverity notes ... > diff --git a/src/qemu/qemu_hotplug.c b/src/qemu/qemu_hotplug.c > index 11b549b12b..09f8525cfa 100644 > --- a/src/qemu/qemu_hotplug.c > +++ b/src/qemu/qemu_hotplug.c > @@ -928,8 +928,7 @@ qemuDomainFindOrCreateSCSIDiskController(virQEMUDriverPtr > driver, > > /* No

Re: [libvirt PATCH] examples: fix storage volume size schema

2020-10-06 Thread Peter Krempa
On Tue, Oct 06, 2020 at 12:47:23 +0200, Peter Krempa wrote: > On Tue, Oct 06, 2020 at 10:22:27 +0100, Daniel Berrange wrote: > > There is no such element, and exist at > > the top level. > > > > Signed-off-by: Daniel P. Berrangé > > --- > > examples/xml/storage/vol-cow.xml| 6 ++ > >

Re: [libvirt PATCH] examples: fix storage volume size schema

2020-10-06 Thread Peter Krempa
On Tue, Oct 06, 2020 at 10:22:27 +0100, Daniel Berrange wrote: > There is no such element, and exist at > the top level. > > Signed-off-by: Daniel P. Berrangé > --- > examples/xml/storage/vol-cow.xml| 6 ++ > examples/xml/storage/vol-qcow.xml | 6 ++ >

Re: [libvirt PATCH 9/9] spec: Introduce arches_*

2020-10-06 Thread Andrea Bolognani
On Mon, 2020-10-05 at 20:40 -0400, Neal Gompa wrote: > On Mon, Oct 5, 2020 at 2:41 PM Andrea Bolognani wrote: > > %if 0%{?fedora} > > +%define arches_qemu_kvm %{arches_x86} %{power64} s390x %{arm} > > aarch64 > > %else > > +%define arches_qemu_kvm x86_64 %{power64} aarch64

Re: [libvirt PATCH 6/9] spec: Move _vpath_builddir definition

2020-10-06 Thread Andrea Bolognani
On Mon, 2020-10-05 at 20:46 -0400, Neal Gompa wrote: > On Mon, Oct 5, 2020 at 2:41 PM Andrea Bolognani wrote: > > It belongs before package-specific feature flags are defined. > > > > Signed-off-by: Andrea Bolognani > > --- > > libvirt.spec.in | 10 +- > > 1 file changed, 5

Re: [libvirt PATCH 1/9] spec: Simplify setting features off by default

2020-10-06 Thread Andrea Bolognani
On Mon, 2020-10-05 at 20:42 -0400, Neal Gompa wrote: > On Mon, Oct 5, 2020 at 2:40 PM Andrea Bolognani wrote: > > -%define with_fuse 0%{!?_without_fuse:0} > > -%define with_sanlock 0%{!?_without_sanlock:0} > > -%define with_numad 0%{!?_without_numad:0} > > -%define

Re: [PATCH] mailmap: consolidate my email addresses

2020-10-06 Thread Andrea Bolognani
On Mon, 2020-10-05 at 15:14 -0400, Matt Coleman wrote: > Signed-off-by: Matt Coleman > --- > .mailmap | 1 + > 1 file changed, 1 insertion(+) Reviewed-by: Andrea Bolognani and pushed. -- Andrea Bolognani / Red Hat / Virtualization

[libvirt PATCH] examples: fix storage volume size schema

2020-10-06 Thread Daniel P . Berrangé
There is no such element, and exist at the top level. Signed-off-by: Daniel P. Berrangé --- examples/xml/storage/vol-cow.xml| 6 ++ examples/xml/storage/vol-qcow.xml | 6 ++ examples/xml/storage/vol-qcow2.xml | 6 ++ examples/xml/storage/vol-raw.xml| 6 ++

Re: [PATCH] qemu: Don't generate '-machine memory-backend' and '-numa memdev'

2020-10-06 Thread Peter Krempa
On Tue, Oct 06, 2020 at 10:03:29 +0200, Michal Privoznik wrote: > In 88957116c9 I've switched to -machine memory-backend=ID and > -object memory-backend-* because QEMU is obsoleting -mem-path > and -mem-prealloc. However, what I did not foresee was that using > -machine memory-backend in

Re: [PATCH v2 01/10] hyperv: make Msvm_ComputerSystem WQL queries locale agnostic

2020-10-06 Thread Daniel P . Berrangé
On Mon, Oct 05, 2020 at 09:13:29PM -0400, Matt Coleman wrote: > > On Oct 5, 2020, at 8:54 PM, Neal Gompa wrote: > > > > Should we require a bump to openwsman 2.6 for this? > > That won’t make any difference: openwsman 2.6+ supports specifying the > locale, but Windows ignores it. So, this

Re: [libvirt PATCH 00/12] util: use g_new0 (glib chronicles)

2020-10-06 Thread Erik Skultety
On Mon, Oct 05, 2020 at 07:48:15PM +0200, Ján Tomko wrote: > Ján Tomko (12): > util: resctrl fix spacing in comment > util: split out VIR_ALLOC calls > util: resctrl: use g_new0 > util: storagefile: use g_new0 > util: sysinfo: use g_new0 > util: command: use g_new0 > util: netdev:

[PATCH] qemu: Don't generate '-machine memory-backend' and '-numa memdev'

2020-10-06 Thread Michal Privoznik
In 88957116c9 I've switched to -machine memory-backend=ID and -object memory-backend-* because QEMU is obsoleting -mem-path and -mem-prealloc. However, what I did not foresee was that using -machine memory-backend in combination with -numa is not allowed in QEMU. This was reported upstream and

Re: [libvirt PATCHv3 2/4] qemu: add support for 'fmode' and 'dmode' options

2020-10-06 Thread Peter Krempa
On Mon, Oct 05, 2020 at 19:40:14 +0100, Brian Turek wrote: > Expose QEMU's 9pfs 'fmode' and 'dmode' options via attributes on the > 'filesystem' node in the domain XML. These options control the creation > mode of files and directories, respectively, when using > accessmode=mapped. QEMU defaults

Re: [libvirt PATCHv3 0/4] Add support for QEMU's fmode and dmode

2020-10-06 Thread Peter Krempa
On Mon, Oct 05, 2020 at 19:40:12 +0100, Brian Turek wrote: > Apologies for the second submission here. I got a kickback on two of the > emails saying it was "rejected due to security policies." > > This third version of the patches fixes a bug where QEMU interpreted the > command line value

Re: [libvirt PATCHv3 1/4] qemu: capabilities: add QEMU_CAPS_FSDEV_CREATEMODE

2020-10-06 Thread Peter Krempa
On Mon, Oct 05, 2020 at 19:40:13 +0100, Brian Turek wrote: > The QEMU 9pfs 'fmode' and 'dmode' options have existed since QEMU 2.10. > Probe QEMU's command line set to check whether these options are > available, and if yes, enable this new QEMU_CAPS_FSDEV_CREATEMODE > capability on libvirt side.

Re: [libvirt][PATCH v1 1/1] introduce an attribute "migratable" to numatune memory element

2020-10-06 Thread Peter Krempa
On Tue, Oct 06, 2020 at 13:47:25 +0800, Luyao Zhong wrote: > > > > > > > Attribute ``migratable`` will be 'no' by default, and 'yes' indicates > that it allows operating system or hypervisor migrating the memory > pages between different memory nodes, that also means we will

Re: [PATCH 1/1] Optional free-page-reporting can be enabled/disabled for memballon device of model 'virtio'.

2020-10-06 Thread Peter Krempa
On Mon, Oct 05, 2020 at 17:40:48 -0400, Nico Pache wrote: > I'm not super familiar with the code base so followed the 2 > autodeflate commits as a guide. > > I had a few questions regarding your feedback. > > > > The patch is also missing test XML addition for the qemuxml2argvtest and > >

[libvirt PATCH 11/14] qemu: agent: use g_auto in qemuAgentGetInterfaces

2020-10-06 Thread Ján Tomko
Signed-off-by: Ján Tomko --- src/qemu/qemu_agent.c | 9 +++-- 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/src/qemu/qemu_agent.c b/src/qemu/qemu_agent.c index 8cd1aa6cb0..847300c86e 100644 --- a/src/qemu/qemu_agent.c +++ b/src/qemu/qemu_agent.c @@ -2197,12 +2197,12 @@

[libvirt PATCH 06/14] qemu: agent: use g_auto for ifname

2020-10-06 Thread Ján Tomko
This lets us conveniently reduce its scope to the outer loop. Signed-off-by: Ján Tomko --- src/qemu/qemu_agent.c | 8 +--- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/src/qemu/qemu_agent.c b/src/qemu/qemu_agent.c index dc989622b9..3b92b2ec33 100644 ---

[libvirt PATCH 14/14] qemu: agent: rename tmp_iface to iface_obj

2020-10-06 Thread Ján Tomko
Signed-off-by: Ján Tomko --- src/qemu/qemu_agent.c | 12 ++-- 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/qemu/qemu_agent.c b/src/qemu/qemu_agent.c index b6c37b6b0d..3de951fc97 100644 --- a/src/qemu/qemu_agent.c +++ b/src/qemu/qemu_agent.c @@ -2108,7 +2108,7 @@

[libvirt PATCH 07/14] qemu: agent: use virHashNew

2020-10-06 Thread Ján Tomko
We're passing 'ifaces_count' to virHashCreate as the initial hash table size just after we've initialized it to zero. This translates to a default of 256 inside virHashCreateFull. Instead of this obfuscation, use virHashNew (default of 32), to make it obvious we don't care about the initial hash

[libvirt PATCH 01/14] qemu: agent: remove redundant checks

2020-10-06 Thread Ján Tomko
virJSONValueObjectGetArray returns NULL if the object with the supplied key is not an array. Calling virJSONValueIsArray right after is redundant. Signed-off-by: Ján Tomko --- src/qemu/qemu_agent.c | 12 1 file changed, 12 deletions(-) diff --git a/src/qemu/qemu_agent.c

[libvirt PATCH 13/14] qemuAgentGetInterfaceAddresses: turn ifname into char*

2020-10-06 Thread Ján Tomko
We only care about the first part of the 'ifname' string, splitting it is overkill. Instead, just replace the ':' with a '\0' in a copy of the string. This reduces the count of the varaibles containing some form of the interface name to two. Signed-off-by: Ján Tomko --- src/qemu/qemu_agent.c |

[libvirt PATCH 05/14] qemu: agent: expand addrs upfront

2020-10-06 Thread Ján Tomko
qemuAgentGetInterfaceOneAddress returns exactly one address for every iteration of the loop (and we error out if not). Instead of expanding the addrs by one on every iteration, do it upfront since we know how many times the loop will execute. Signed-off-by: Ján Tomko --- src/qemu/qemu_agent.c

[libvirt PATCH 08/14] qemu: agent: simplify access to ifaces_ret

2020-10-06 Thread Ján Tomko
We have a local 'iface' variable that contains the same value eventually. Initialize it early instead of indexing two more times. Signed-off-by: Ján Tomko --- src/qemu/qemu_agent.c | 8 +++- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/src/qemu/qemu_agent.c

[libvirt PATCH 04/14] qemu: agent: reduce scope of addrs_count

2020-10-06 Thread Ján Tomko
Signed-off-by: Ján Tomko --- src/qemu/qemu_agent.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/qemu/qemu_agent.c b/src/qemu/qemu_agent.c index 51c597f57e..c6878c8590 100644 --- a/src/qemu/qemu_agent.c +++ b/src/qemu/qemu_agent.c @@ -2125,7 +2125,6 @@

[libvirt PATCH 12/14] qemu: agent: remove cleanup in qemuAgentGetInterfaces

2020-10-06 Thread Ján Tomko
Signed-off-by: Ján Tomko --- src/qemu/qemu_agent.c | 14 +- 1 file changed, 5 insertions(+), 9 deletions(-) diff --git a/src/qemu/qemu_agent.c b/src/qemu/qemu_agent.c index 847300c86e..210b308610 100644 --- a/src/qemu/qemu_agent.c +++ b/src/qemu/qemu_agent.c @@ -2195,7 +2195,6 @@

[libvirt PATCH 09/14] qemu: agent: split out qemuAgentGetInterfaceAddresses

2020-10-06 Thread Ján Tomko
Convert one interface from the "return" array returned by "guest-network-get-interfaces" to virDomainInterface. Due to the functionality of squashing interface aliases together, this is not a pure function - it either: * Adds the interface to ifaces_ret, incrementing ifaces_count and adds a

[libvirt PATCH 10/14] qemu: agent: use GetArray to remove a check

2020-10-06 Thread Ján Tomko
The error check for ValueObjectGet("return") is redundant, qemuAgentCommand already checked for us that the reply contains a "return" object. It does not guarantee, that it is an array. Use virJSONValueObjectGetArray that combines getting the object with checking for its type and return the more

[libvirt PATCH 03/14] qemu: agent: remove impossible errors

2020-10-06 Thread Ján Tomko
For both 'ip_addr_arr' and 'ret_array', we: 1) already checked that they are arrays 2) only iterate up to the array size Remove the duplicate checks. Signed-off-by: Ján Tomko --- src/qemu/qemu_agent.c | 14 -- 1 file changed, 14 deletions(-) diff --git a/src/qemu/qemu_agent.c

[libvirt PATCH 00/14] refactor qemuAgentGetInterfaces

2020-10-06 Thread Ján Tomko
Recently, I have spent some time trying to figure out what this function does. Let me share that with you before I forget. Ján Tomko (14): qemu: agent: remove redundant checks qemu: agent: split out qemuAgentGetInterfaceOneAddress qemu: agent: remove impossible errors qemu: agent: reduce

[libvirt PATCH 02/14] qemu: agent: split out qemuAgentGetInterfaceOneAddress

2020-10-06 Thread Ján Tomko
A function that takes one entry from the "ip-addresses" array returned by "guest-network-get-interfaces" and converts it into virDomainIPAddress. Signed-off-by: Ján Tomko --- src/qemu/qemu_agent.c | 78 +-- 1 file changed, 46 insertions(+), 32

Re: [libvirt PATCH 0/4] virsh: use g_new0 (glib chronicles)

2020-10-06 Thread Erik Skultety
On Mon, Oct 05, 2020 at 07:02:35PM +0200, Ján Tomko wrote: > Ján Tomko (4): > virsh: do not add bools into size calculations > virsh: use g_new0 instead of vsh[CM]alloc > virsh: delete vsh[CM]alloc > virsh: network-port: remove pointless comment Reviewed-by: Erik Skultety