[libvirt] [PATCH 4/5] qemu: caps: Add max_unmap_size property of scsi-disk

2020-06-16 Thread Lin Ma
Signed-off-by: Lin Ma --- src/qemu/qemu_capabilities.c | 2 ++ src/qemu/qemu_capabilities.h | 1 + tests/qemucapabilitiesdata/caps_2.1.1.x86_64.xml | 1 + tests/qemucapabilitiesdata/caps_2.10.0.aarch64.xml | 1 + tests/qemucapabilitiesdata/caps_2.10.0

[libvirt] [PATCH 1/5] conf: Add support for discard granularity

2020-06-16 Thread Lin Ma
Signed-off-by: Lin Ma --- docs/formatdomain.html.in | 6 +- docs/schemas/domaincommon.rng | 5 + src/conf/domain_conf.c| 19 ++- src/conf/domain_conf.h| 1 + src/qemu/qemu_domain.c| 2 ++ 5 files changed, 31 insertions(+), 2 deletions(-) di

[libvirt] [PATCH 3/5] conf: Add support for unmap limit

2020-06-16 Thread Lin Ma
Signed-off-by: Lin Ma --- docs/formatdomain.html.in | 12 docs/schemas/domaincommon.rng | 5 + src/conf/domain_conf.c| 26 +- src/conf/domain_conf.h| 1 + src/qemu/qemu_domain.c| 2 ++ 5 files changed, 45 insertions(+), 1 del

[libvirt] [PATCH 5/5] qemu: Add support for max_unmap_size property of scsi-disk

2020-06-16 Thread Lin Ma
The default max_unmap_size is set to 1GB by qemu. The Maximum unmap LBA count field in the block limits VPD page is impacted by it: Maximum unmap LBA count = max unmap size / logical block size Signed-off-by: Lin Ma --- src/qemu/qemu_command.c | 10 ++ .../disk-scsi-d

[libvirt] [PATCH 2/5] qemu: Add Support for discard granularity

2020-06-16 Thread Lin Ma
The default discard granularity is set to the logical block size or 4k by qemu, whichever is largest. The Optimal Unmap Granularity field in the block limits VPD page is impacted by it: Optimal Unmap Granularity = discard granularity / logical block size Signed-off-by: Lin Ma --- src/qemu/qem

[libvirt] [PATCH 0/5] Add support for fine grained discard control of qemu

2020-06-16 Thread Lin Ma
* The 'discard_granularity' property is available to 'scsi-hd', 'virtio-blk' and 'ide-*'. It impacts the 'Optimal Unmap Granularity' field in the block limits VPD page: Optimal Unmap Granularity = discard granularity / logical block size * The 'max_unmap_size' property is available to 's

Re: [PATCH] virtlogd: solve some memory leaks

2020-06-16 Thread Andrea Bolognani
On Tue, 2020-06-16 at 14:26 +0800, wangjian wrote: > We used asan to find some memory leaks in virtlogd. In the virThreadPoolFree > function, > When job->data is of type virNetServerJobPtr, the following memory leak > problem exists. Please don't CC random developers when posting patches, or sen

[PATCH] virQEMUDriverConfigNew: Add slash to cfg->defaultTLSx509certdir for non-embedded driver

2020-06-16 Thread Peter Krempa
Commit 068efae5b1a9ef accidentally removed the slash. https://bugzilla.redhat.com/show_bug.cgi?id=1847234 Signed-off-by: Peter Krempa --- src/qemu/qemu_conf.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/qemu/qemu_conf.c b/src/qemu/qemu_conf.c index b49299e1de..33b398

Re: [PATCH 2/2] qemu: format address wdith on intel-iommu command line

2020-06-16 Thread Menno Lageman
On 04-06-2020 11:43, Peter Krempa wrote: On Thu, Jun 04, 2020 at 11:34:52 +0200, Menno Lageman wrote: On 04/06/2020 10:38, Peter Krempa wrote: On Thu, Jun 04, 2020 at 09:42:43 +0200, Menno Lageman wrote: Format the address width attribute. Depending on the version of QEMU it is named 'aw-bits'

Re: [PATCH libvirt v1 3/6] conf: fix ZPCI address auto-generation on s390

2020-06-16 Thread Shalini Chellathurai Saroja
Hi Andrea, Thank you for the review. On 6/3/20 12:58 PM, Andrea Bolognani wrote: On Thu, 2020-04-09 at 12:31 +0200, Shalini Chellathurai Saroja wrote: +++ b/src/conf/domain_addr.c @@ -145,12 +145,18 @@ static void virDomainZPCIAddressReleaseIds(virDomainZPCIAddressIdsPtr zpciIds,

Re: [PATCH] virQEMUDriverConfigNew: Add slash to cfg->defaultTLSx509certdir for non-embedded driver

2020-06-16 Thread Andrea Bolognani
On Tue, 2020-06-16 at 12:38 +0200, Peter Krempa wrote: > Commit 068efae5b1a9ef accidentally removed the slash. > > https://bugzilla.redhat.com/show_bug.cgi?id=1847234 > > Signed-off-by: Peter Krempa > --- > src/qemu/qemu_conf.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) Reviewed-b

Re: [PATCH v3 2/7] qemu: check if s390 secure guest support is enabled

2020-06-16 Thread Boris Fiuczynski
On 6/15/20 5:51 PM, Erik Skultety wrote: On Mon, Jun 15, 2020 at 04:49:30PM +0200, Boris Fiuczynski wrote: On 6/15/20 4:17 PM, Erik Skultety wrote: On Mon, Jun 15, 2020 at 10:28:07AM +0200, Paulo de Rezende Pinatti wrote: This patch introduces a common function to verify if the availability of

[PATCH] virsysinfo: Don't leak fw_cfg

2020-06-16 Thread Michal Privoznik
In v6.4.0-72-g3dda889a44 I've introduced parsing and formatting of new sysinfo type 'fwcfg'. However, I've forgot to introduce code that would free parsed data. Signed-off-by: Michal Privoznik --- src/util/virsysinfo.c | 17 + 1 file changed, 17 insertions(+) diff --git a/src/ut

Re: [PATCH libvirt v1 3/6] conf: fix ZPCI address auto-generation on s390

2020-06-16 Thread Andrea Bolognani
On Tue, 2020-06-16 at 12:43 +0200, Shalini Chellathurai Saroja wrote: > On 6/3/20 12:58 PM, Andrea Bolognani wrote: > > On Thu, 2020-04-09 at 12:31 +0200, Shalini Chellathurai Saroja wrote: > > > +++ b/tests/qemuxml2xmloutdata/hostdev-vfio-zpci-multidomain-many.xml > > > @@ -39,7 +39,7 @@ > > >

Re: [libvirt PATCH v2 00/10] Add ability to create mediated devices in libvirt

2020-06-16 Thread Michal Privoznik
On 6/10/20 10:09 PM, Jonathon Jongsma wrote: On Wed, 2020-06-10 at 20:01 +0200, Michal Privoznik wrote: Patches look good to me. I've raised couple of small issues (mostly mem leaks), but suggested what needs to be squashed in. I'm keeping it all in my local branch, ready to push if you agree

[PATCH 7/9] conf: Fix memory leak in openvzReadFSConf

2020-06-16 Thread John Ferlan
Since 1f5deed9, @veid_str has been leaked in the error path. Found by Coverity. Signed-off-by: John Ferlan --- src/openvz/openvz_conf.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/openvz/openvz_conf.c b/src/openvz/openvz_conf.c index c06bfa13e3..190c57b622 100644

[PATCH 8/9] conf: Fix memory leak in virCPUDefParseXML

2020-06-16 Thread John Ferlan
Since a08669c31, @tsc is not automatically free'd by any g_auto* method. Found by Coverity. Signed-off-by: John Ferlan --- src/conf/cpu_conf.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/conf/cpu_conf.c b/src/conf/cpu_conf.c index b40737e407..e1b0a5653f 100644 --- a/

[PATCH 6/9] conf: Fix memory leak in openvzWriteConfigParam

2020-06-16 Thread John Ferlan
Since 60623a7c, @temp_file was not properly free'd on the non error path. Found by Coverity. Signed-off-by: John Ferlan --- src/openvz/openvz_conf.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/openvz/openvz_conf.c b/src/openvz/openvz_conf.c index 78547b8b28..c06bfa

[PATCH 0/9] Some Coverity memory leak patches

2020-06-16 Thread John Ferlan
Even though I changed roles, the cron job still runs. I recently updated to a newer coverity version and it found some new stuff and even more false positives. It's still very unhappy with the usage of GLIB_DEPRECATED_ENUMERATOR_IN_* macros for *glib/gspawn.h and *gobject/gparam.h, but I can work

[PATCH 4/9] util: Fix memory leak in virPCIProbeStubDriver

2020-06-16 Thread John Ferlan
Since 9ea90206, @drvpath could be overwritten if we jumped to recheck Found by Coverity. Signed-off-by: John Ferlan --- src/util/virpci.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/util/virpci.c b/src/util/virpci.c index 6c7e6bbcab..16936c4be9 100644 --- a/src/util/virpci.c +++ b/s

[PATCH 5/9] test: Fix memory leak in testParseXMLDocFromFile

2020-06-16 Thread John Ferlan
Since ceb3255c, @absFile could be leaked if we jumped to error. Found by Coverity. Signed-off-by: John Ferlan --- src/test/test_driver.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/test/test_driver.c b/src/test/test_driver.c index 7a1db21718..993f405f3c 100644 --- a/

[PATCH 1/9] util: Fix memory leak in virAuthGetCredential

2020-06-16 Thread John Ferlan
Since 5084091a, @tmp is filled by a g_key_file_get_string which is now an allocated string as opposed to some hash table lookup value, so we need to treat it as so. Found by Coverity Signed-off-by: John Ferlan --- src/remote/remote_driver.c | 2 +- src/util/virauth.c | 5 + src/util

[PATCH 9/9] util: Avoid using wrong free function

2020-06-16 Thread John Ferlan
Since 1e2ae2e31, changes to use the automagic free logic didn't take into account that one path uses posix_memalign and the other uses VIR_ALLOC_N - the former requires using VIR_FREE() and not g_free() to free the memory. Found by Coverity. Signed-off-by: John Ferlan --- src/util/iohelper.c |

[PATCH 3/9] lxc: Fix memory leak in virLXCControllerPopulateDevices

2020-06-16 Thread John Ferlan
Since 5b82f7f3, @path should have been placed inside the for loop since it'd need to be free'd for each pass through the loop; otherwise, we'd leak like a sieve. Found by Coverity. Signed-off-by: John Ferlan --- src/lxc/lxc_controller.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) d

[PATCH 2/9] util: Fix memory leak in virAuthConfigLookup

2020-06-16 Thread John Ferlan
Since 5084091a, @authcred is filled by a g_key_file_get_string which is now an allocated string as opposed to some hash table lookup value, so we need to treat it as so. Found by Coverity Signed-off-by: John Ferlan --- src/util/virauthconfig.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(

Re: [libvirt PATCH 5/5] qemu: Avoid deprecated migrate-set-cache-size QMP command

2020-06-16 Thread Peter Krempa
On Wed, Jun 10, 2020 at 20:24:31 +0200, Jiri Denemark wrote: > The same functionality can be achieved using migrate-set-parameters QMP > command with xbzrle-cache-size parameter. > > https://bugzilla.redhat.com/show_bug.cgi?id=1845012 > > Signed-off-by: Jiri Denemark > --- > src/qemu/qemu_drive

Re: [PATCH 1/1] manpages/virsh.rst: clarify numatune memory migration on Linux

2020-06-16 Thread Andrea Bolognani
On Thu, 2020-06-11 at 14:00 -0300, Daniel Henrique Barboza wrote: > On Linux, changing the nodeset on 'numatune' does not imply that > the guest memory will be migrated on the spot to the new nodeset. > The memory migration is tied on guest usage of the memory pages, > and an idle guest will take l

Re: [libvirt PATCH 0/5] Avoid deprecated commands for migration parameters

2020-06-16 Thread Peter Krempa
On Wed, Jun 10, 2020 at 20:24:26 +0200, Jiri Denemark wrote: > Jiri Denemark (5): > qemu: Probe for a few params supported by migrate-set-parameters > qemu: Avoid deprecated migrate_set_speed QMP command > qemu: Avoid deprecated migrate_set_downtime QMP command > qemu: Avoid deprecated quer

Re: [PATCH 9/9] util: Avoid using wrong free function

2020-06-16 Thread Peter Krempa
On Tue, Jun 16, 2020 at 08:07:10 -0400, John Ferlan wrote: > Since 1e2ae2e31, changes to use the automagic free logic didn't take > into account that one path uses posix_memalign and the other uses > VIR_ALLOC_N - the former requires using VIR_FREE() and not g_free() > to free the memory. I don't

Re: [PATCH 9/9] util: Avoid using wrong free function

2020-06-16 Thread Daniel P . Berrangé
On Tue, Jun 16, 2020 at 08:07:10AM -0400, John Ferlan wrote: > Since 1e2ae2e31, changes to use the automagic free logic didn't take > into account that one path uses posix_memalign and the other uses > VIR_ALLOC_N - the former requires using VIR_FREE() and not g_free() > to free the memory. VIR_FR

Re: [PATCH 4/9] util: Fix memory leak in virPCIProbeStubDriver

2020-06-16 Thread Peter Krempa
On Tue, Jun 16, 2020 at 08:07:05 -0400, John Ferlan wrote: > Since 9ea90206, @drvpath could be overwritten if we jumped to recheck > > Found by Coverity. > > Signed-off-by: John Ferlan > --- > src/util/virpci.c | 1 + > 1 file changed, 1 insertion(+) > > diff --git a/src/util/virpci.c b/src/ut

Re: [PATCH 5/9] test: Fix memory leak in testParseXMLDocFromFile

2020-06-16 Thread Peter Krempa
On Tue, Jun 16, 2020 at 08:07:06 -0400, John Ferlan wrote: > Since ceb3255c, @absFile could be leaked if we jumped to error. It's leaked even on success path.

Re: [PATCH 0/9] Some Coverity memory leak patches

2020-06-16 Thread Peter Krempa
On Tue, Jun 16, 2020 at 08:07:01 -0400, John Ferlan wrote: > Even though I changed roles, the cron job still runs. I recently > updated to a newer coverity version and it found some new stuff and > even more false positives. It's still very unhappy with the usage > of GLIB_DEPRECATED_ENUMERATOR_IN

Re: [PATCH 9/9] util: Avoid using wrong free function

2020-06-16 Thread John Ferlan
On 6/16/20 8:16 AM, Daniel P. Berrangé wrote: > On Tue, Jun 16, 2020 at 08:07:10AM -0400, John Ferlan wrote: >> Since 1e2ae2e31, changes to use the automagic free logic didn't take >> into account that one path uses posix_memalign and the other uses >> VIR_ALLOC_N - the former requires using VIR

Re: [PATCH 1/1] manpages/virsh.rst: clarify numatune memory migration on Linux

2020-06-16 Thread Daniel Henrique Barboza
On 6/16/20 9:09 AM, Andrea Bolognani wrote: On Thu, 2020-06-11 at 14:00 -0300, Daniel Henrique Barboza wrote: On Linux, changing the nodeset on 'numatune' does not imply that the guest memory will be migrated on the spot to the new nodeset. The memory migration is tied on guest usage of the m

Re: [PATCH 0/9] Some Coverity memory leak patches

2020-06-16 Thread John Ferlan
On 6/16/20 8:25 AM, Peter Krempa wrote: > On Tue, Jun 16, 2020 at 08:07:01 -0400, John Ferlan wrote: >> Even though I changed roles, the cron job still runs. I recently >> updated to a newer coverity version and it found some new stuff and >> even more false positives. It's still very unhappy w

Re: [PATCH] Fixed missing VM vport when batch start or migration partially failed

2020-06-16 Thread Laine Stump
On 6/15/20 11:10 PM, Wei Gong wrote:   environment:libvirt-4.3.0 qemu-kvm-ev-2.10.0 kernel-3.10.0-1062 centos7 openvswitch-2.3.1  vm network xml :                               function='0x0'/> qemuProcessStart in qemu_process.c failed to start. The first is qemu process stop(At

Re: [PATCH] virtlogd: solve some memory leaks

2020-06-16 Thread Michal Privoznik
On 6/16/20 8:26 AM, wangjian wrote: We used asan to find some memory leaks in virtlogd. In the virThreadPoolFree function, When job->data is of type virNetServerJobPtr, the following memory leak problem exists. 1. job->data is not released Direct leak of 24 byte(s) in 1 object(s) allocated fro

Re: [PATCH] virsysinfo: Don't leak fw_cfg

2020-06-16 Thread Daniel Henrique Barboza
On 6/16/20 8:38 AM, Michal Privoznik wrote: In v6.4.0-72-g3dda889a44 I've introduced parsing and formatting of new sysinfo type 'fwcfg'. However, I've forgot to introduce code that would free parsed data. Signed-off-by: Michal Privoznik --- Reviewed-by: Daniel Henrique Barboza

[libvirt PATCH v3 00/11] Add ability to create mediated devices in libvirt

2020-06-16 Thread Jonathon Jongsma
This is the first portion of an effort to support persistent mediated devices with libvirt. This first series simply enables creating and destroying non-persistent mediated devices via the virNodeDeviceCreateXML() and virNodeDeviceDestroy() functions. The 'mdevctl' utility[1] provides the backend i

[libvirt PATCH v3 03/11] nodedev: add support for mdev attributes

2020-06-16 Thread Jonathon Jongsma
Mediated devices support arbitrary vendor-specific attributes that can be attached to a mediated device. These attributes are ordered, and are written to sysfs in order after a device is created. This patch adds support for these attributes to the mdev data types and XML schema. Signed-off-by: Jon

[libvirt PATCH v3 01/11] nodedev: make iommuGroup optional for mdevs

2020-06-16 Thread Jonathon Jongsma
When parsing a nodedev xml file, the iommuGroup element should be optional. This element should be read-only and is determined by the device driver. While this is a change to existing behavior, it doesn't break backwards-compatibility because it makes the parser less strict. Signed-off-by: Jonatho

[libvirt PATCH v3 05/11] nodedev: store mdev UUID in mdev caps

2020-06-16 Thread Jonathon Jongsma
In order to allow libvirt to create and start new mediated devices, we need to be able to verify that the device has been started. In order to do this, we'll need to save the UUID of newly-discovered devices within the virNodeDevCapMdev structure. This allows us to search the device list by UUID an

[libvirt PATCH v3 02/11] nodedev: factor out nodeDeviceHasCapability()

2020-06-16 Thread Jonathon Jongsma
Currently nodeDeviceCreateXML() and nodeDeviceDestroy() only support NPIV HBAs, but we want to be able to create mdev devices as well. This is a first step to enabling that support. Signed-off-by: Jonathon Jongsma --- src/node_device/node_device_driver.c | 91 ++-- 1 file

[libvirt PATCH v3 07/11] nodedev: Build a non-loadable driver lib

2020-06-16 Thread Jonathon Jongsma
In order to test the nodedev driver, we need to link against a non-loadable module. Similar to other loadable modules already in the repository, create an _impl library that can be linked against the unit tests and then create a loadable module from that. Signed-off-by: Jonathon Jongsma --- src/

[libvirt PATCH v3 09/11] nodedev: add mdev support to virNodeDeviceDestroy()

2020-06-16 Thread Jonathon Jongsma
Add the ability to destroy mdev node devices via the mdevctl utility. Signed-off-by: Jonathon Jongsma --- src/node_device/node_device_driver.c | 33 src/node_device/node_device_driver.h | 2 ++ 2 files changed, 35 insertions(+) diff --git a/src/node_device/node_dev

[libvirt PATCH v3 10/11] nodedev: Add testing for 'mdevctl stop'

2020-06-16 Thread Jonathon Jongsma
Test that we run 'mdevctl' with the proper arguments when we destroy mediated devices with virNodeDeviceDestroy() Signed-off-by: Jonathon Jongsma --- tests/nodedevmdevctldata/mdevctl-stop.argv | 1 + tests/nodedevmdevctltest.c | 42 ++ 2 files changed, 43 ins

[libvirt PATCH v3 08/11] nodedev: Add testing for 'mdevctl start'

2020-06-16 Thread Jonathon Jongsma
Test that we run 'mdevctl' with the proper arguments when creating new mediated devices with virNodeDeviceCreateXML(). Signed-off-by: Jonathon Jongsma --- build-aux/syntax-check.mk | 2 +- tests/Makefile.am | 14 + ...019_36ea_4111_8f0a_8c9a70e2

[libvirt PATCH v3 06/11] nodedev: add mdev support to virNodeDeviceCreateXML()

2020-06-16 Thread Jonathon Jongsma
With recent additions to the node device xml schema, an xml schema can now describe a mdev device sufficiently for libvirt to create and start the device using the mdevctl utility. Note that some of the the configuration for a mediated device must be passed to mdevctl as a JSON-formatted file. In

[libvirt PATCH v3 04/11] nodedev: refactor nodeDeviceFindNewDevice()

2020-06-16 Thread Jonathon Jongsma
In preparation for creating mediated devices in libvirt, we will need to wait for new mediated devices to be created as well. Refactor nodeDeviceFindNewDevice() so that we can re-use the main logic from this function to wait for different device types by passing a different 'find' function. Signed

[libvirt PATCH v3 11/11] docs: note node device fields that are read-only

2020-06-16 Thread Jonathon Jongsma
As noted by Erik Skultety, we use the same XML schema to report existing devices and to define new devices. However, some schema elements are "read-only". In other words, they are used to report information from the node device driver and cannot be used to define a new device. Note these in the doc

[PATCH] qemu: do not add model when actual iface type is hostdev

2020-06-16 Thread Paulo de Rezende Pinatti
No default model should be added to the interface entry at post parse when its actual network type is hostdev as doing so might cause a mismatch between the interface definition and its actual device type. --- src/qemu/qemu_domain.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/qemu/qemu

Re: [PATCH 1/1] qemuDomainSetNumaParamsLive: set nodeset for root cgroup

2020-06-16 Thread Michal Privoznik
On 6/11/20 8:54 PM, Daniel Henrique Barboza wrote: This function handles the change of NUMA nodeset for a given guest, setting CpusetMems for the emulator, vcpus and IOThread sub-groups. It doesn't set the same nodeset to the root cgroup though. This means that cpuset.mems of the root cgroup end

[libvirt PATCH] utils: add mutex to avoid races in virfile

2020-06-16 Thread Bihong Yu
>From d9f7ed2af581222804392f9b93dc6aaf7d8c8995 Mon Sep 17 00:00:00 2001 From: Bihong Yu Date: Tue, 16 Jun 2020 22:08:55 +0800 Subject: [PATCH] utils: add mutex to avoid races in virfile There are races condiction to make '/run/libvirt/qemu/dbus' directory in virDirCreateNoFork() while concurrent

[RFC] Expanding hooks API for running several scripts by one call virHookCall

2020-06-16 Thread Dmitry Nesterenko
Hi, all. I have the proposal about subject. Libvirt hook calls only one script (/etc/libvirt/hooks/) now. This is not convenient if scripts for hook are provided by many vendors. Script one vendor can replace previously installed script other vendor. Let's use usual linux scheme - running all s

Re: [libvirt PATCH v3 01/11] nodedev: make iommuGroup optional for mdevs

2020-06-16 Thread Erik Skultety
On Tue, Jun 16, 2020 at 09:27:49AM -0500, Jonathon Jongsma wrote: > When parsing a nodedev xml file, the iommuGroup element should be > optional. This element should be read-only and is determined by the > device driver. While this is a change to existing behavior, it doesn't > break backwards-comp

Re: [libvirt PATCH v3 02/11] nodedev: factor out nodeDeviceHasCapability()

2020-06-16 Thread Erik Skultety
On Tue, Jun 16, 2020 at 09:27:50AM -0500, Jonathon Jongsma wrote: > Currently nodeDeviceCreateXML() and nodeDeviceDestroy() only support > NPIV HBAs, but we want to be able to create mdev devices as well. This > is a first step to enabling that support. > > Signed-off-by: Jonathon Jongsma > --- Re

Re: [PATCH] qemu: do not add model when actual iface type is hostdev

2020-06-16 Thread Paulo de Rezende Pinatti
Sorry, forgot to include my signed-off-by, so: On 16/06/20 16:32, Paulo de Rezende Pinatti wrote: No default model should be added to the interface entry at post parse when its actual network type is hostdev as doing so might cause a mismatch between the interface definition and its actual devic

Re: [libvirt PATCH] utils: add mutex to avoid races in virfile

2020-06-16 Thread Daniel P . Berrangé
On Tue, Jun 16, 2020 at 10:39:46PM +0800, Bihong Yu wrote: > >From d9f7ed2af581222804392f9b93dc6aaf7d8c8995 Mon Sep 17 00:00:00 2001 > From: Bihong Yu > Date: Tue, 16 Jun 2020 22:08:55 +0800 > Subject: [PATCH] utils: add mutex to avoid races in virfile > > There are races condiction to make '/run

Re: [RFC] Expanding hooks API for running several scripts by one call virHookCall

2020-06-16 Thread Daniel P . Berrangé
On Tue, Jun 16, 2020 at 02:44:02PM +, Dmitry Nesterenko wrote: > Hi, all. > > I have the proposal about subject. Libvirt hook calls only one script > (/etc/libvirt/hooks/) now. This is not convenient if scripts > for hook are provided by many vendors. Script one vendor can replace > previously

Re: [libvirt PATCH v3 04/11] nodedev: refactor nodeDeviceFindNewDevice()

2020-06-16 Thread Erik Skultety
On Tue, Jun 16, 2020 at 09:27:52AM -0500, Jonathon Jongsma wrote: > In preparation for creating mediated devices in libvirt, we will need to > wait for new mediated devices to be created as well. Refactor > nodeDeviceFindNewDevice() so that we can re-use the main logic from this > function to wait

Re: [libvirt PATCH v3 04/11] nodedev: refactor nodeDeviceFindNewDevice()

2020-06-16 Thread Erik Skultety
On Tue, Jun 16, 2020 at 09:27:52AM -0500, Jonathon Jongsma wrote: > In preparation for creating mediated devices in libvirt, we will need to > wait for new mediated devices to be created as well. Refactor > nodeDeviceFindNewDevice() so that we can re-use the main logic from this > function to wait

Re: [libvirt PATCH v3 05/11] nodedev: store mdev UUID in mdev caps

2020-06-16 Thread Erik Skultety
On Tue, Jun 16, 2020 at 09:27:53AM -0500, Jonathon Jongsma wrote: > In order to allow libvirt to create and start new mediated devices, we > need to be able to verify that the device has been started. In order to > do this, we'll need to save the UUID of newly-discovered devices within > the virNod

Re: [libvirt PATCH v3 06/11] nodedev: add mdev support to virNodeDeviceCreateXML()

2020-06-16 Thread Erik Skultety
On Tue, Jun 16, 2020 at 09:27:54AM -0500, Jonathon Jongsma wrote: > With recent additions to the node device xml schema, an xml schema can > now describe a mdev device sufficiently for libvirt to create and start > the device using the mdevctl utility. > > Note that some of the the configuration fo

Re: [PATCH 1/1] manpages/virsh.rst: clarify numatune memory migration on Linux

2020-06-16 Thread Andrea Bolognani
On Tue, 2020-06-16 at 10:32 -0300, Daniel Henrique Barboza wrote: > On 6/16/20 9:09 AM, Andrea Bolognani wrote: > > I've tweaked the formatting for the manpage and commit message ever > > so slightly, added a reference to > > > >https://bugzilla.redhat.com/show_bug.cgi?id=1640869 > > > > and

Re: [libvirt PATCH v3 00/11] Add ability to create mediated devices in libvirt

2020-06-16 Thread Erik Skultety
On Tue, Jun 16, 2020 at 09:27:48AM -0500, Jonathon Jongsma wrote: > This is the first portion of an effort to support persistent mediated devices > with libvirt. This first series simply enables creating and destroying > non-persistent mediated devices via the virNodeDeviceCreateXML() and > virNode

Re: [libvirt PATCH v3 07/11] nodedev: Build a non-loadable driver lib

2020-06-16 Thread Erik Skultety
On Tue, Jun 16, 2020 at 09:27:55AM -0500, Jonathon Jongsma wrote: > In order to test the nodedev driver, we need to link against a > non-loadable module. Similar to other loadable modules already in the > repository, create an _impl library that can be linked against the unit > tests and then creat

Re: [libvirt PATCH v3 09/11] nodedev: add mdev support to virNodeDeviceDestroy()

2020-06-16 Thread Erik Skultety
On Tue, Jun 16, 2020 at 09:27:57AM -0500, Jonathon Jongsma wrote: > Add the ability to destroy mdev node devices via the mdevctl utility. > > Signed-off-by: Jonathon Jongsma > --- Reviewed-by: Erik Skultety

Re: [libvirt PATCH v3 10/11] nodedev: Add testing for 'mdevctl stop'

2020-06-16 Thread Erik Skultety
On Tue, Jun 16, 2020 at 09:27:58AM -0500, Jonathon Jongsma wrote: > Test that we run 'mdevctl' with the proper arguments when we destroy > mediated devices with virNodeDeviceDestroy() > > Signed-off-by: Jonathon Jongsma > --- > tests/nodedevmdevctldata/mdevctl-stop.argv | 1 + > tests/nodedevmde

Re: [libvirt PATCH v3 11/11] docs: note node device fields that are read-only

2020-06-16 Thread Erik Skultety
On Tue, Jun 16, 2020 at 09:27:59AM -0500, Jonathon Jongsma wrote: > As noted by Erik Skultety, we use the same XML schema to report > existing devices and to define new devices. However, some schema > elements are "read-only". In other words, they are used to report > information from the node devi

Re: [libvirt PATCH v3 00/11] Add ability to create mediated devices in libvirt

2020-06-16 Thread Erik Skultety
On Tue, Jun 16, 2020 at 07:23:40PM +0200, Erik Skultety wrote: > On Tue, Jun 16, 2020 at 09:27:48AM -0500, Jonathon Jongsma wrote: > > This is the first portion of an effort to support persistent mediated > > devices > > with libvirt. This first series simply enables creating and destroying > > no

Re: [libvirt PATCH v3 08/11] nodedev: Add testing for 'mdevctl start'

2020-06-16 Thread Erik Skultety
On Tue, Jun 16, 2020 at 09:27:56AM -0500, Jonathon Jongsma wrote: > Test that we run 'mdevctl' with the proper arguments when creating new > mediated devices with virNodeDeviceCreateXML(). > > Signed-off-by: Jonathon Jongsma > --- So, unless Michal has further comments on the binary placeholder t

Re: [libvirt PATCH v3 03/11] nodedev: add support for mdev attributes

2020-06-16 Thread Erik Skultety
On Tue, Jun 16, 2020 at 09:27:51AM -0500, Jonathon Jongsma wrote: > Mediated devices support arbitrary vendor-specific attributes that can > be attached to a mediated device. These attributes are ordered, and are > written to sysfs in order after a device is created. This patch adds > support for t

Re: [PATCH v2 4/4] formatdomain.html.in: document the NUMA cpus auto fill feature

2020-06-16 Thread Daniel Henrique Barboza
On 6/10/20 3:35 PM, Daniel Henrique Barboza wrote: We're not mentioning that we're replicating QEMU behavior on purpose. First because QEMU will one day, maybe, change the behavior and start to refuse incomplete NUMA setups, and then our documentation is now deprecated. Second, auto filling the C

Re: [RFC] Expanding hooks API for running several scripts by one call virHookCall

2020-06-16 Thread Michal Privoznik
On 6/16/20 4:44 PM, Dmitry Nesterenko wrote: Hi, all. I have the proposal about subject. Libvirt hook calls only one script (/etc/libvirt/hooks/) now. This is not convenient if scripts for hook are provided by many vendors. Script one vendor can replace previously installed script other vendo

Re: [libvirt PATCH v3 00/11] Add ability to create mediated devices in libvirt

2020-06-16 Thread Michal Privoznik
On 6/16/20 7:23 PM, Erik Skultety wrote: On Tue, Jun 16, 2020 at 09:27:48AM -0500, Jonathon Jongsma wrote: This is the first portion of an effort to support persistent mediated devices with libvirt. This first series simply enables creating and destroying non-persistent mediated devices via the

Re: [libvirt PATCH v3 01/11] nodedev: make iommuGroup optional for mdevs

2020-06-16 Thread Michal Privoznik
On 6/16/20 4:27 PM, Jonathon Jongsma wrote: When parsing a nodedev xml file, the iommuGroup element should be optional. This element should be read-only and is determined by the device driver. While this is a change to existing behavior, it doesn't break backwards-compatibility because it makes t

Re: [libvirt PATCH v3 08/11] nodedev: Add testing for 'mdevctl start'

2020-06-16 Thread Michal Privoznik
On 6/16/20 4:27 PM, Jonathon Jongsma wrote: Test that we run 'mdevctl' with the proper arguments when creating new mediated devices with virNodeDeviceCreateXML(). Signed-off-by: Jonathon Jongsma --- build-aux/syntax-check.mk | 2 +- tests/Makefile.am

[PATCH 0/1] configure: prefer python's sphinx module

2020-06-16 Thread John Snow
Hi, this is a followup to my patch which attempted to prefer 'sphinx-build' to 'sphinx-build-3' which intended to prefer a VENV installation of sphinx over Fedora's system installation. That got confusing, though, so here's something that's simpler and better: use python to invoke sphinx so we don

[PATCH 1/1] configure: prefer python's sphinx module

2020-06-16 Thread John Snow
Using an explicit entry path script for sphinx can lead to confusing results: If the python binary belongs to a virtual environment, our configure script may still select a sphinx script that belongs to the system distribution packages. It is likely best to use python itself (whichever one the use

Re: [libvirt PATCH v3 00/11] Add ability to create mediated devices in libvirt

2020-06-16 Thread Jonathon Jongsma
On Tue, 2020-06-16 at 19:53 +0200, Erik Skultety wrote: > On Tue, Jun 16, 2020 at 07:23:40PM +0200, Erik Skultety wrote: > > On Tue, Jun 16, 2020 at 09:27:48AM -0500, Jonathon Jongsma wrote: > > > This is the first portion of an effort to support persistent > > > mediated devices > > > with libvirt

Re: [PATCH 0/1] configure: prefer python's sphinx module

2020-06-16 Thread no-reply
Patchew URL: https://patchew.org/QEMU/20200616190942.24624-1-js...@redhat.com/ Hi, This series failed the docker-mingw@fedora build test. Please find the testing commands and their output below. If you have Docker installed, you can probably reproduce it locally. === TEST SCRIPT BEGIN === #!

Re: [PATCH 0/1] configure: prefer python's sphinx module

2020-06-16 Thread no-reply
Patchew URL: https://patchew.org/QEMU/20200616190942.24624-1-js...@redhat.com/ Hi, This series failed the asan build test. Please find the testing commands and their output below. If you have Docker installed, you can probably reproduce it locally. === TEST SCRIPT BEGIN === #!/bin/bash export

Re: [PATCH] network: Fix a race condition when shutdown & start vm at the same time

2020-06-16 Thread Laine Stump
(BTW, this other patch is also trying to solve the same problem: https://www.redhat.com/archives/libvir-list/2020-June/msg00525.html I made comments there earlier, and have learned a bit more since then: https://www.redhat.com/archives/libvir-list/2020-June/msg00634.html On 6/15/20 2:36 PM

Re: [PATCH] Fixed missing VM vport when batch start or migration partially failed

2020-06-16 Thread Laine Stump
To complete the circle, here is my response to a *different* patch trying to fix this same problem. I did a bit more investigating during my reply, so there is better / more complete information: https://www.redhat.com/archives/libvir-list/2020-June/msg00681.html On 6/15/20 11:10 PM, Wei Gong

Re: [libvirt PATCH] utils: add mutex to avoid races in virfile

2020-06-16 Thread Bihong Yu
Yes, it a good idea. I will fix it. On 2020/6/16 23:16, Daniel P. Berrangé wrote: > On Tue, Jun 16, 2020 at 10:39:46PM +0800, Bihong Yu wrote: >> >From d9f7ed2af581222804392f9b93dc6aaf7d8c8995 Mon Sep 17 00:00:00 2001 >> From: Bihong Yu >> Date: Tue, 16 Jun 2020 22:08:55 +0800 >> Subject: [PATCH]

[PATCH] utils: check flags and errno before reporting errno

2020-06-16 Thread Bihong Yu
>From 099707463944faeae75da640b0d1d780cb675406 Mon Sep 17 00:00:00 2001 From: Bihong Yu Date: Tue, 16 Jun 2020 22:08:55 +0800 Subject: [PATCH] utils: check flags and errno before reporting errno There are races condiction to make '/run/libvirt/qemu/dbus' directory in virDirCreateNoFork() while co

Re: [PATCH] qemu: do not add model when actual iface type is hostdev

2020-06-16 Thread Laine Stump
On 6/16/20 10:32 AM, Paulo de Rezende Pinatti wrote: No default model should be added to the interface entry at post parse when its actual network type is hostdev as doing so might cause a mismatch between the interface definition and its actual device type. Have you encountered a real problem

Re: [libvirt] Request for a new release of libvirt-java in Maven

2020-06-16 Thread Slavka Peleva
Hi, I know that it is a busy time, but is there any chance anyone could take a look at this? Best regards, Slavka Peleva On Fri, May 22, 2020 at 2:36 PM Slavka Peleva wrote: > Hello, > > The Apache CloudStack project is using Maven libvirt java bindings in KVM > code. In libvirt-java project we