Re: [PATCH] Support x-vga=on for PCI host passthrough devices

2020-10-07 Thread Laine Stump
On 10/7/20 5:44 PM, Steven Newbury wrote: On Wed, 2020-10-07 at 13:17 -0600, Alex Williamson wrote: Are you aware that you can add arbitrary options to devices using the support in libvirt? For example: ... ... ...

Re: [libvirt PATCHv2 00/16] refactor qemuAgentGetInterfaces

2020-10-07 Thread Neal Gompa
On Wed, Oct 7, 2020 at 8:35 AM Ján Tomko wrote: > > v2: > * add new patch separating error checking in qemuAgentGetInterfaceOneAddress > * split out naddrs++ on a separate line > * added documentation for qemuAgentGetInterfaceAddresses > * added qemuAgentGetAllInterfaceAddresses > > Ján Tomko

Re: [libvirt PATCH 00/13] conf: use g_new0 (glib chronicles)

2020-10-07 Thread Neal Gompa
On Wed, Oct 7, 2020 at 3:22 PM Ján Tomko wrote: > > *** BLURB HERE *** > *** BLURB THERE *** > *** BLURB EVEYWHERE *** > > Ján Tomko (13): > conf: domain: use g_new0 > conf: capabilities: use g_new0 > conf: network: use g_new0 > conf: node_device: use g_new0 > conf: domain_addr: use

Re: [PATCH] spec: Add cpu.rng to %files

2020-10-07 Thread Neal Gompa
On Wed, Oct 7, 2020 at 7:22 PM Cole Robinson wrote: > > Fixes: 51v5d325240c645ea6c1a0902c695cf299410b1f90c > > Signed-off-by: Cole Robinson > --- > Pushed as trivial > > libvirt.spec.in | 1 + > 1 file changed, 1 insertion(+) > > diff --git a/libvirt.spec.in b/libvirt.spec.in > index

[PATCH] spec: Add cpu.rng to %files

2020-10-07 Thread Cole Robinson
Fixes: 51v5d325240c645ea6c1a0902c695cf299410b1f90c Signed-off-by: Cole Robinson --- Pushed as trivial libvirt.spec.in | 1 + 1 file changed, 1 insertion(+) diff --git a/libvirt.spec.in b/libvirt.spec.in index 933e12f4d2..52f30be096 100644 --- a/libvirt.spec.in +++ b/libvirt.spec.in @@ -1868,6

Re: [PATCH] Support x-vga=on for PCI host passthrough devices

2020-10-07 Thread Steven Newbury
On Wed, 2020-10-07 at 13:17 -0600, Alex Williamson wrote: > Are you aware that you can add arbitrary options to devices using the > support in libvirt? For example: > > > ... > > ... > > > function='0x0'/> > >function='0x0'/> > > >

Re: [libvirt PATCHv2 00/16] refactor qemuAgentGetInterfaces

2020-10-07 Thread Jonathon Jongsma
On Wed, 7 Oct 2020 14:35:21 +0200 Ján Tomko wrote: > v2: > * add new patch separating error checking in > qemuAgentGetInterfaceOneAddress > * split out naddrs++ on a separate line > * added documentation for qemuAgentGetInterfaceAddresses > * added qemuAgentGetAllInterfaceAddresses > > Ján

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

2020-10-07 Thread Daniel Henrique Barboza
On 10/7/20 5:01 AM, 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 combination with -numa is not

Re: [libvirt PATCH] tools: spell out the type instead of using typeof

2020-10-07 Thread Daniel Henrique Barboza
On 10/7/20 4:10 PM, Ján Tomko wrote: Signed-off-by: Ján Tomko --- Reviewed-by: Daniel Henrique Barboza tools/virsh-completer-domain.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tools/virsh-completer-domain.c b/tools/virsh-completer-domain.c index

[libvirt PATCH 07/13] conf: numa: use g_new0

2020-10-07 Thread Ján Tomko
Signed-off-by: Ján Tomko --- src/conf/numa_conf.c | 23 ++- 1 file changed, 6 insertions(+), 17 deletions(-) diff --git a/src/conf/numa_conf.c b/src/conf/numa_conf.c index 6653ba05a6..f8a7a01ac9 100644 --- a/src/conf/numa_conf.c +++ b/src/conf/numa_conf.c @@ -851,9 +851,7 @@

[libvirt PATCH 11/13] conf: cpu: use g_new0

2020-10-07 Thread Ján Tomko
Signed-off-by: Ján Tomko --- src/conf/cpu_conf.c | 15 --- 1 file changed, 4 insertions(+), 11 deletions(-) diff --git a/src/conf/cpu_conf.c b/src/conf/cpu_conf.c index 1910470836..7778e01131 100644 --- a/src/conf/cpu_conf.c +++ b/src/conf/cpu_conf.c @@ -153,9 +153,7 @@

[libvirt PATCH 12/13] conf: use g_new0

2020-10-07 Thread Ján Tomko
Signed-off-by: Ján Tomko --- src/conf/checkpoint_conf.c| 4 ++-- src/conf/domain_capabilities.c| 7 +-- src/conf/domain_event.c | 3 +-- src/conf/domain_nwfilter.c| 3 +-- src/conf/netdev_bandwidth_conf.c | 9 +++--

[libvirt PATCH 04/13] conf: node_device: use g_new0

2020-10-07 Thread Ján Tomko
Signed-off-by: Ján Tomko --- src/conf/node_device_conf.c | 37 + 1 file changed, 13 insertions(+), 24 deletions(-) diff --git a/src/conf/node_device_conf.c b/src/conf/node_device_conf.c index e478238675..4adfdef572 100644 --- a/src/conf/node_device_conf.c +++

[libvirt PATCH 13/13] conf: virDomainUSBAddressHubNew: refactor

2020-10-07 Thread Ján Tomko
Remove the pointless variable and pointer stealing. Signed-off-by: Ján Tomko --- src/conf/domain_addr.c | 6 ++ 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/conf/domain_addr.c b/src/conf/domain_addr.c index ab508b0c8f..03d0c6825d 100644 --- a/src/conf/domain_addr.c +++

[libvirt PATCH 08/13] conf: storage: use g_new0

2020-10-07 Thread Ján Tomko
Signed-off-by: Ján Tomko --- src/conf/storage_conf.c | 21 +++-- 1 file changed, 7 insertions(+), 14 deletions(-) diff --git a/src/conf/storage_conf.c b/src/conf/storage_conf.c index ae63cc725e..09769e6c79 100644 --- a/src/conf/storage_conf.c +++ b/src/conf/storage_conf.c @@

[libvirt PATCH 01/13] conf: domain: use g_new0

2020-10-07 Thread Ján Tomko
Signed-off-by: Ján Tomko --- src/conf/domain_conf.c | 347 - 1 file changed, 132 insertions(+), 215 deletions(-) diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c index c003b5c030..51efeb0e42 100644 --- a/src/conf/domain_conf.c +++

[libvirt PATCH 09/13] conf: virsecretobj: use g_new0

2020-10-07 Thread Ján Tomko
Signed-off-by: Ján Tomko --- src/conf/virsecretobj.c | 21 ++--- 1 file changed, 6 insertions(+), 15 deletions(-) diff --git a/src/conf/virsecretobj.c b/src/conf/virsecretobj.c index 81c9f2c346..c98d52f1e4 100644 --- a/src/conf/virsecretobj.c +++ b/src/conf/virsecretobj.c @@

[libvirt PATCH 03/13] conf: network: use g_new0

2020-10-07 Thread Ján Tomko
Signed-off-by: Ján Tomko --- src/conf/network_conf.c | 37 - 1 file changed, 12 insertions(+), 25 deletions(-) diff --git a/src/conf/network_conf.c b/src/conf/network_conf.c index 2fcd498107..4f1115e103 100644 --- a/src/conf/network_conf.c +++

[libvirt PATCH 02/13] conf: capabilities: use g_new0

2020-10-07 Thread Ján Tomko
Signed-off-by: Ján Tomko --- src/conf/capabilities.c | 39 --- 1 file changed, 12 insertions(+), 27 deletions(-) diff --git a/src/conf/capabilities.c b/src/conf/capabilities.c index 0ba7323ee8..90ad4e0c13 100644 --- a/src/conf/capabilities.c +++

[libvirt PATCH 05/13] conf: domain_addr: use g_new0

2020-10-07 Thread Ján Tomko
Signed-off-by: Ján Tomko --- src/conf/domain_addr.c | 31 ++- 1 file changed, 10 insertions(+), 21 deletions(-) diff --git a/src/conf/domain_addr.c b/src/conf/domain_addr.c index 9114f2d8d0..ab508b0c8f 100644 --- a/src/conf/domain_addr.c +++ b/src/conf/domain_addr.c

[libvirt PATCH 00/13] conf: use g_new0 (glib chronicles)

2020-10-07 Thread Ján Tomko
*** BLURB HERE *** *** BLURB THERE *** *** BLURB EVEYWHERE *** Ján Tomko (13): conf: domain: use g_new0 conf: capabilities: use g_new0 conf: network: use g_new0 conf: node_device: use g_new0 conf: domain_addr: use g_new0 conf: interface: use g_new0 conf: numa: use g_new0 conf:

[libvirt PATCH 10/13] conf: nwfilter_params: use g_new0

2020-10-07 Thread Ján Tomko
Signed-off-by: Ján Tomko --- src/conf/nwfilter_params.c | 21 + 1 file changed, 5 insertions(+), 16 deletions(-) diff --git a/src/conf/nwfilter_params.c b/src/conf/nwfilter_params.c index f2ec08012a..1210079954 100644 --- a/src/conf/nwfilter_params.c +++

[libvirt PATCH 06/13] conf: interface: use g_new0

2020-10-07 Thread Ján Tomko
Signed-off-by: Ján Tomko --- src/conf/interface_conf.c | 29 + 1 file changed, 9 insertions(+), 20 deletions(-) diff --git a/src/conf/interface_conf.c b/src/conf/interface_conf.c index 1e478ac075..7bb5ec4deb 100644 --- a/src/conf/interface_conf.c +++

Re: [PATCH] Support x-vga=on for PCI host passthrough devices

2020-10-07 Thread Alex Williamson
On Wed, 07 Oct 2020 19:59:36 +0100 steve wrote: > Original message > From: Alex Williamson > Date: 07/10/2020 18:08 (GMT+00:00) > To: Steven Newbury > Cc: Peter Krempa , libvir-list@redhat.com > Subject: Re: [PATCH] Support x-vga=on for PCI host passthrough devices > > On

Re: [PATCH] tests: commandhelper: Accept POLLNVAL on macOS

2020-10-07 Thread Roman Bolshakov
On Wed, Oct 07, 2020 at 07:17:05PM +0200, Ján Tomko wrote: > On a Wednesday in 2020, Roman Bolshakov wrote: Hi Jano, > > *indefinitely > Thanks, I'll correct it. > > BUGS > >The poll() system call currently does not support devices. > > > > Is there a bug that track this? If so,

[libvirt PATCH] tools: spell out the type instead of using typeof

2020-10-07 Thread Ján Tomko
Signed-off-by: Ján Tomko --- tools/virsh-completer-domain.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tools/virsh-completer-domain.c b/tools/virsh-completer-domain.c index 50a8a31fcd..c657627ac1 100644 --- a/tools/virsh-completer-domain.c +++

Re: [PATCH] Support x-vga=on for PCI host passthrough devices

2020-10-07 Thread steve
Original message From: Alex Williamson Date: 07/10/2020 18:08 (GMT+00:00) To: Steven Newbury Cc: Peter Krempa , libvir-list@redhat.com Subject: Re: [PATCH] Support x-vga=on for PCI host passthrough devices On Wed, 07 Oct 2020 14:20:21 +0100Steven Newbury wrote:> On

Re: [PATCH] tests: commandhelper: Accept POLLNVAL on macOS

2020-10-07 Thread Roman Bolshakov
On Wed, Oct 07, 2020 at 06:57:21PM +0200, Andrea Bolognani wrote: > On Wed, 2020-10-07 at 15:20 +0300, Roman Bolshakov wrote: > > for (i = 0; i < numpollfds; i++) { > > -if (fds[i].revents & (POLLIN | POLLHUP | POLLERR)) { > > +if (fds[i].revents & (POLLIN |

Re: [PATCH] qemu: Add support for -device ati-vga (models: rage128p and rv100)

2020-10-07 Thread Steven Newbury
On Wed, 2020-10-07 at 19:09 +0200, Ján Tomko wrote: > On a Wednesday in 2020, Steven Newbury wrote: > > QEMU since 5.0 has two new video devices rage128p and rv100. > > Are you sure about the QEMU version? > > The way you check it (presence of 'ati-vga') says it's available > since 4.0.0. > >

Re: [PATCH] wireshark: Fix missing bool_t on macOS

2020-10-07 Thread Andrea Bolognani
On Wed, 2020-10-07 at 15:20 +0300, Roman Bolshakov wrote: > The header has to be explicitly added to pull definition of bool_t and a > few other types. Otherwise packet-libvirt.c can't be compiled. > > Signed-off-by: Roman Bolshakov > --- > tools/wireshark/src/packet-libvirt.c | 1 + > 1 file

Re: [PATCH] tests: commandhelper: Accept POLLNVAL on macOS

2020-10-07 Thread Ján Tomko
On a Wednesday in 2020, Roman Bolshakov wrote: commandhelper hangs indefinetely in poll() on macOS on commandtest test2 *indefinitely and later because POLLNVAL is returned on revents for input file descriptor opened from /dev/null, i.e this hangs: $ tests/commandhelper < /dev/null BEGIN

Re: [PATCH] Support x-vga=on for PCI host passthrough devices

2020-10-07 Thread Alex Williamson
On Wed, 07 Oct 2020 14:20:21 +0100 Steven Newbury wrote: > On Wed, 2020-10-07 at 15:07 +0200, Peter Krempa wrote: > > On Wed, Oct 07, 2020 at 13:59:35 +0100, Steven Newbury wrote: > > > When using a passthrough GPU with libvirt there is no option to > > > pass "x-vga=on" to the device

Re: [PATCH] qemu: Add support for -device ati-vga (models: rage128p and rv100)

2020-10-07 Thread Ján Tomko
On a Wednesday in 2020, Steven Newbury wrote: QEMU since 5.0 has two new video devices rage128p and rv100. Are you sure about the QEMU version? The way you check it (presence of 'ati-vga') says it's available since 4.0.0. commit 862b4a291dcf143fdb227e97feb7fd45e6466aca hw/display: Add

Re: [PATCH] tests: commandhelper: Accept POLLNVAL on macOS

2020-10-07 Thread Andrea Bolognani
On Wed, 2020-10-07 at 15:20 +0300, Roman Bolshakov wrote: > for (i = 0; i < numpollfds; i++) { > -if (fds[i].revents & (POLLIN | POLLHUP | POLLERR)) { > +if (fds[i].revents & (POLLIN | POLLHUP | POLLERR | > +# ifdef __APPLE__ > + /*

Re: [PATCH] Support x-vga=on for PCI host passthrough devices

2020-10-07 Thread Steven Newbury
On Wed, 2020-10-07 at 15:56 +0100, Steven Newbury wrote: > > As I see it there are two distinct validation requirements: > > 1) It should only apply to hostdev PCI vfio devices > I think I've come up with a solution: Add a new enum to extFlags to allow vga, and set the flag for vfio pci

Re: [libvirt PATCH] cputest: Update QEMU data for Ryzen 9 3900X

2020-10-07 Thread Michal Privoznik
On 10/7/20 6:29 PM, Jiri Denemark wrote: The CPU should be identified as EPYC-Rome, but the QEMU binary used to gather the original test data did not support this model. Let's update the supported models to QEMU 5.1.0. Signed-off-by: Jiri Denemark --- tests/cputest.c

[libvirt PATCH] cputest: Update QEMU data for Ryzen 9 3900X

2020-10-07 Thread Jiri Denemark
The CPU should be identified as EPYC-Rome, but the QEMU binary used to gather the original test data did not support this model. Let's update the supported models to QEMU 5.1.0. Signed-off-by: Jiri Denemark --- tests/cputest.c | 2 +-

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

2020-10-07 Thread Jiri Denemark
On Wed, Oct 07, 2020 at 15:56:31 +0200, Markus Schade wrote: > Am 06.10.20 um 16:50 schrieb Jiri Denemark: > > But, since I don't really like going through the CPU model definition > > again (even though it would be just a diff), I can do these trivial > > changes just before pushing. Just let me

Re: [PATCH] docs: bhyve: style improvements

2020-10-07 Thread Andrea Bolognani
On Sun, 2020-10-04 at 06:29 +0400, Roman Bogorodskiy wrote: > - Wrap long lines in "domxml-to-native" example so it fits >content width, > - For changeset revision links, use "FreeBSD changeset rN" or >"changeset rN" instead of just "rN" to make it more readable. > > Signed-off-by:

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

2020-10-07 Thread Jiri Denemark
On Wed, Oct 07, 2020 at 15:54:50 +0200, Markus Schade wrote: > Am 06.10.20 um 15:44 schrieb Jiri Denemark: > > QEMU definition of EPYC-Rome also contains 'npt' (CPUID_SVM_NPT), > > 'nrip-save' (CPUID_SVM_NRIPSAVE), and 'umip' (CPUID_7_0_ECX_UMIP). Any > > specific reason for not including them in

Re: [PATCH] Support x-vga=on for PCI host passthrough devices

2020-10-07 Thread Steven Newbury
On Wed, 2020-10-07 at 14:20 +0100, Steven Newbury wrote: > On Wed, 2020-10-07 at 15:07 +0200, Peter Krempa wrote: > > On Wed, Oct 07, 2020 at 13:59:35 +0100, Steven Newbury wrote: > > > > > > 7 files changed, 26 insertions(+) > > > > > > diff --git a/src/conf/device_conf.c

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

2020-10-07 Thread Markus Schade
Am 06.10.20 um 16:50 schrieb Jiri Denemark: > But, since I don't really like going through the CPU model definition > again (even though it would be just a diff), I can do these trivial > changes just before pushing. Just let me know if you're OK with this and > reply to my question in patch 2/4.

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

2020-10-07 Thread Markus Schade
Am 06.10.20 um 15:44 schrieb Jiri Denemark: > QEMU definition of EPYC-Rome also contains 'npt' (CPUID_SVM_NPT), > 'nrip-save' (CPUID_SVM_NRIPSAVE), and 'umip' (CPUID_7_0_ECX_UMIP). Any > specific reason for not including them in libvirt? I have not included the SVM feature flags, because they are

Re: [PATCH] Support x-vga=on for PCI host passthrough devices

2020-10-07 Thread Steven Newbury
On Wed, 2020-10-07 at 15:07 +0200, Peter Krempa wrote: > On Wed, Oct 07, 2020 at 13:59:35 +0100, Steven Newbury wrote: > > When using a passthrough GPU with libvirt there is no option to > > pass "x-vga=on" to the device specification. This means legacy > > Please note that we don't add support

Re: [PATCH] Support x-vga=on for PCI host passthrough devices

2020-10-07 Thread Steven Newbury
On Wed, 2020-10-07 at 15:07 +0200, Peter Krempa wrote: > On Wed, Oct 07, 2020 at 13:59:35 +0100, Steven Newbury wrote: > > When using a passthrough GPU with libvirt there is no option to > > pass "x-vga=on" to the device specification. This means legacy > > Please note that we don't add support

[PATCH] qemu: Add support for -device ati-vga (models: rage128p and rv100)

2020-10-07 Thread Steven Newbury
When using a passthrough GPU with libvirt there is no option to pass "x-vga=on" to the device specification. This means legacy VGA support isn't available which prevents any non-UEFI cards from POSTing and prevents some drivers from initialising for example Windows 10 NVIDIA driver for GeForce

Re: [PATCH] Support x-vga=on for PCI host passthrough devices

2020-10-07 Thread Peter Krempa
On Wed, Oct 07, 2020 at 13:59:35 +0100, Steven Newbury wrote: > When using a passthrough GPU with libvirt there is no option to > pass "x-vga=on" to the device specification. This means legacy Please note that we don't add support for experimental qemu features (prefixed with "x-") until they

Re: [PATCH] qemu: Add support for -device ati-vga (models: rage128p and rv100)

2020-10-07 Thread Steven Newbury
Please see the other patch, I copy/pasted the wrong text! On Wed, 2020-10-07 at 13:50 +0100, Steven Newbury wrote: > When using a passthrough GPU with libvirt there is no option to > pass "x-vga=on" to the device specification. This means legacy > VGA support isn't available which prevents any

[PATCH] Support x-vga=on for PCI host passthrough devices

2020-10-07 Thread Steven Newbury
When using a passthrough GPU with libvirt there is no option to pass "x-vga=on" to the device specification. This means legacy VGA support isn't available which prevents any non-UEFI cards from POSTing and prevents some drivers from initialising for example Windows 10 NVIDIA driver for GeForce

[PATCH] qemu: Add support for -device ati-vga (models: rage128p and rv100)

2020-10-07 Thread Steven Newbury
QEMU since 5.0 has two new video devices rage128p and rv100. These emulate ATI Rage128 Pro and Radeon GPUs respectively, at least to some extent. This can be useful for OS without virtualisation drivers or support for VBE or the old Cirrus emulation. Signed-off-by: Steven Newbury ---

[libvirt PATCHv2 12/16] qemu: agent: remove cleanup in qemuAgentGetInterfaces

2020-10-07 Thread Ján Tomko
Signed-off-by: Ján Tomko Reviewed-by: Jonathon Jongsma --- 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 39c955fdf1..06e143b0b9 100644 --- a/src/qemu/qemu_agent.c +++

[libvirt PATCHv2 07/16] qemu: agent: use virHashNew

2020-10-07 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 PATCHv2 00/16] refactor qemuAgentGetInterfaces

2020-10-07 Thread Ján Tomko
v2: * add new patch separating error checking in qemuAgentGetInterfaceOneAddress * split out naddrs++ on a separate line * added documentation for qemuAgentGetInterfaceAddresses * added qemuAgentGetAllInterfaceAddresses Ján Tomko (16): qemu: agent: remove redundant checks qemu: agent:

[libvirt PATCHv2 08/16] qemu: agent: simplify access to ifaces_ret

2020-10-07 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 Reviewed-by: Jonathon Jongsma --- src/qemu/qemu_agent.c | 8 +++- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git

[libvirt PATCHv2 05/16] qemu: agent: expand addrs upfront

2020-10-07 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 PATCHv2 06/16] qemu: agent: use g_auto for ifname

2020-10-07 Thread Ján Tomko
This lets us conveniently reduce its scope to the outer loop. Signed-off-by: Ján Tomko Reviewed-by: Jonathon Jongsma --- 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 0394a72518..b11f8afde7

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

2020-10-07 Thread Ján Tomko
Signed-off-by: Ján Tomko Reviewed-by: Jonathon Jongsma --- src/qemu/qemu_agent.c | 16 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/src/qemu/qemu_agent.c b/src/qemu/qemu_agent.c index 5cb6257bfc..301707b136 100644 --- a/src/qemu/qemu_agent.c +++

[libvirt PATCHv2 01/16] qemu: agent: remove redundant checks

2020-10-07 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 Reviewed-by: Jonathon Jongsma --- src/qemu/qemu_agent.c | 12 1 file changed, 12 deletions(-) diff --git

[libvirt PATCHv2 15/16] qemuAgentGetInterfaceOneAddress: check for errors early

2020-10-07 Thread Ján Tomko
For readability, and to ensure we do allocation when returning 0. Signed-off-by: Ján Tomko --- src/qemu/qemu_agent.c | 15 +-- 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/src/qemu/qemu_agent.c b/src/qemu/qemu_agent.c index 301707b136..60247e1616 100644 ---

[libvirt PATCHv2 16/16] qemu: agent: split out qemuAgentGetAllInterfaceAddresses

2020-10-07 Thread Ján Tomko
Remove more logic from qemuAgentGetInterfaces. Signed-off-by: Ján Tomko --- src/qemu/qemu_agent.c | 57 --- 1 file changed, 32 insertions(+), 25 deletions(-) diff --git a/src/qemu/qemu_agent.c b/src/qemu/qemu_agent.c index 60247e1616..c9c4b034d3 100644

[libvirt PATCHv2 04/16] qemu: agent: reduce scope of addrs_count

2020-10-07 Thread Ján Tomko
Signed-off-by: Ján Tomko Reviewed-by: Jonathon Jongsma --- 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 @@

[libvirt PATCHv2 10/16] qemu: agent: use GetArray to remove a check

2020-10-07 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 PATCHv2 09/16] qemu: agent: split out qemuAgentGetInterfaceAddresses

2020-10-07 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 PATCHv2 11/16] qemu: agent: use g_auto in qemuAgentGetInterfaces

2020-10-07 Thread Ján Tomko
Signed-off-by: Ján Tomko Reviewed-by: Jonathon Jongsma --- 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 e7ea03f840..39c955fdf1 100644 --- a/src/qemu/qemu_agent.c +++ b/src/qemu/qemu_agent.c

[libvirt PATCHv2 03/16] qemu: agent: remove impossible errors

2020-10-07 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 Reviewed-by: Jonathon Jongsma --- src/qemu/qemu_agent.c | 14 -- 1 file changed, 14 deletions(-) diff

[libvirt PATCHv2 02/16] qemu: agent: split out qemuAgentGetInterfaceOneAddress

2020-10-07 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

[libvirt PATCHv2 13/16] qemuAgentGetInterfaceAddresses: turn ifname into char*

2020-10-07 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 Reviewed-by: Jonathon

[PATCH] tests: commandhelper: Accept POLLNVAL on macOS

2020-10-07 Thread Roman Bolshakov
commandhelper hangs indefinetely in poll() on macOS on commandtest test2 and later because POLLNVAL is returned on revents for input file descriptor opened from /dev/null, i.e this hangs: $ tests/commandhelper < /dev/null BEGIN STDOUT BEGIN STDERR ^C But it works fine with regular stdin:

[PATCH] wireshark: Fix missing bool_t on macOS

2020-10-07 Thread Roman Bolshakov
The header has to be explicitly added to pull definition of bool_t and a few other types. Otherwise packet-libvirt.c can't be compiled. Signed-off-by: Roman Bolshakov --- tools/wireshark/src/packet-libvirt.c | 1 + 1 file changed, 1 insertion(+) diff --git

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

2020-10-07 Thread Ján Tomko
On a Tuesday in 2020, Jonathon Jongsma wrote: 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

Re: [libvirt PATCH v4 1/5] schema: Make element "topology" in host CPU definition optional

2020-10-07 Thread Jiri Denemark
On Wed, Oct 07, 2020 at 11:08:21 +0200, Peter Krempa wrote: > On Wed, Oct 07, 2020 at 10:54:54 +0200, Tim Wiederhake wrote: > > This element is not always present, see e.g. > > x86_64-cpuid-Xeon-X5460-host.xml, x86_64-cpuid-Pentium-P6100-host.xml, > > or

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

2020-10-07 Thread Ján Tomko
On a Tuesday in 2020, Jonathon Jongsma wrote: 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

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

2020-10-07 Thread Ján Tomko
On a Tuesday in 2020, Jonathon Jongsma wrote: 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 ---

Re: [libvirt PATCH v4 0/5] Make unknown XML elements fail CPU comparison

2020-10-07 Thread Peter Krempa
On Wed, Oct 07, 2020 at 10:54:53 +0200, Tim Wiederhake wrote: > We currently ignore unknown elements in the CPU XML description, e.g. > with virsh cpu-compare and hypervisor-cpu-compare. This makes > '' (note the typo in "faeture") > semantically identic to ''. No error is reported. > > This

Re: [libvirt PATCH v4 5/5] virsh: Add "validate" argument to [hypervisor-]cpu-compare

2020-10-07 Thread Peter Krempa
On Wed, Oct 07, 2020 at 10:54:58 +0200, Tim Wiederhake wrote: > Signed-off-by: Tim Wiederhake > --- > docs/manpages/virsh.rst | 9 ++--- > tools/virsh-host.c | 14 ++ > 2 files changed, 20 insertions(+), 3 deletions(-) Reviewed-by: Peter Krempa

Re: [libvirt PATCH v4 2/5] cpu: Wire in XML validation

2020-10-07 Thread Peter Krempa
On Wed, Oct 07, 2020 at 10:54:55 +0200, Tim Wiederhake wrote: > This adds a new value to virConnectCompareCPUFlags, > "VIR_CONNECT_CPU_VALIDATE_XML", that governs XML document validation in > virCPUDefParseXML. > > In src/conf/cpu_conf.c, include configmake.h for PKGDATADIR and > virfile.h for

Re: [libvirt PATCH v4 3/5] tests: Rename some test files in cputestdata

2020-10-07 Thread Peter Krempa
On Wed, Oct 07, 2020 at 10:54:56 +0200, Tim Wiederhake wrote: > The files contained the "-invalid" marker in their filename, marking > them as test cases that are supposed to fail. Unfortunately, the are supposed to fail in the virschematest. > "-invalid" marker does not discriminate between

Re: [libvirt PATCH v4 1/5] schema: Make element "topology" in host CPU definition optional

2020-10-07 Thread Peter Krempa
On Wed, Oct 07, 2020 at 10:54:54 +0200, Tim Wiederhake wrote: > This element is not always present, see e.g. > x86_64-cpuid-Xeon-X5460-host.xml, x86_64-cpuid-Pentium-P6100-host.xml, > or x86_64-cpuid-EPYC-7601-32-Core-ibpb-host.xml. Unfortunately this is not enough to persuade me that the change

Re: [libvirt PATCH v4 4/5] tests: Enable CPU XML validation in the tests.

2020-10-07 Thread Peter Krempa
On Wed, Oct 07, 2020 at 10:54:57 +0200, Tim Wiederhake wrote: Please always provide a short summary. E.g. that this is adding schema validation via virschematest with a custom schema to match the undescribed files. > Signed-off-by: Tim Wiederhake > --- > docs/schemas/cpu_test.rng | 48

[libvirt PATCH v4 3/5] tests: Rename some test files in cputestdata

2020-10-07 Thread Tim Wiederhake
The files contained the "-invalid" marker in their filename, marking them as test cases that are supposed to fail. Unfortunately, the "-invalid" marker does not discriminate between different tests the files might be used in. A later patch will introduce a new test validating the XML. This test

[libvirt PATCH v4 5/5] virsh: Add "validate" argument to [hypervisor-]cpu-compare

2020-10-07 Thread Tim Wiederhake
Signed-off-by: Tim Wiederhake --- docs/manpages/virsh.rst | 9 ++--- tools/virsh-host.c | 14 ++ 2 files changed, 20 insertions(+), 3 deletions(-) diff --git a/docs/manpages/virsh.rst b/docs/manpages/virsh.rst index c855269041..8fee4c7afe 100644 ---

[libvirt PATCH v4 4/5] tests: Enable CPU XML validation in the tests.

2020-10-07 Thread Tim Wiederhake
Signed-off-by: Tim Wiederhake --- docs/schemas/cpu_test.rng | 48 +++ docs/schemas/meson.build | 1 + tests/cputest.c | 2 +- tests/virschematest.c | 1 + 4 files changed, 51 insertions(+), 1 deletion(-) create mode 100644

[libvirt PATCH v4 2/5] cpu: Wire in XML validation

2020-10-07 Thread Tim Wiederhake
This adds a new value to virConnectCompareCPUFlags, "VIR_CONNECT_CPU_VALIDATE_XML", that governs XML document validation in virCPUDefParseXML. In src/conf/cpu_conf.c, include configmake.h for PKGDATADIR and virfile.h for virFileFindResource. Signed-off-by: Tim Wiederhake ---

[libvirt PATCH v4 1/5] schema: Make element "topology" in host CPU definition optional

2020-10-07 Thread Tim Wiederhake
This element is not always present, see e.g. x86_64-cpuid-Xeon-X5460-host.xml, x86_64-cpuid-Pentium-P6100-host.xml, or x86_64-cpuid-EPYC-7601-32-Core-ibpb-host.xml. Signed-off-by: Tim Wiederhake --- docs/schemas/cputypes.rng | 24 +--- 1 file changed, 13 insertions(+), 11

[libvirt PATCH v4 0/5] Make unknown XML elements fail CPU comparison

2020-10-07 Thread Tim Wiederhake
We currently ignore unknown elements in the CPU XML description, e.g. with virsh cpu-compare and hypervisor-cpu-compare. This makes '' (note the typo in "faeture") semantically identic to ''. No error is reported. This series adds checks for unrecognized attributes and elements in the ""

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

2020-10-07 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 PATCH v3 0/8] Make unknown XML elements fail CPU comparison

2020-10-07 Thread Peter Krempa
On Wed, Sep 30, 2020 at 13:54:57 +0200, Tim Wiederhake wrote: > We currently ignore unknown elements in the CPU XML description, e.g. > with virsh cpu-compare and hypervisor-cpu-compare. This makes > '' (note the typo in "faeture") > semantically identic to ''. No error is reported. > > This

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

2020-10-07 Thread Peter Krempa
On Tue, Oct 06, 2020 at 19:36:03 +0100, Brian Turek wrote: > 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: > > >