Re: [libvirt] [RFC PATCH 0/9] Introduce mediate ops in vfio-pci

2019-12-17 Thread Jason Wang
On 2019/12/12 下午1:47, Yan Zhao wrote: On Thu, Dec 12, 2019 at 11:48:25AM +0800, Jason Wang wrote: On 2019/12/6 下午8:49, Yan Zhao wrote: On Fri, Dec 06, 2019 at 05:40:02PM +0800, Jason Wang wrote: On 2019/12/6 下午4:22, Yan Zhao wrote: On Thu, Dec 05, 2019 at 09:05:54PM +0800, Jason Wang wrote:

[libvirt] [PATCH v2 1/4] qemu: command: move NVDIMM validation to qemu_domain.c

2019-12-17 Thread Daniel Henrique Barboza
Move the NVDIMM validation from qemuBuildMachineCommandLine() to a new function in qemu_domain.c, qemuDomainDeviceDefValidateMemory(), which is called by qemuDomainDeviceDefValidate(). This allows NVDIMM validation to occur in domain define time. It also increments memory hotplug validation,

[libvirt] [PATCH v2 3/4] qemu: move qemuBuildSmartcardCommandLine validation to qemu_domain.c

2019-12-17 Thread Daniel Henrique Barboza
Move smartcard validation being done by qemuBuildSmartcardCommandLine() to the existing qemuDomainSmartcardDefValidate() function. This function is called by qemuDomainDeviceDefValidate(), allowing smartcard validation in domain define time. Tests were adapted to consider the new caps being

[libvirt] [PATCH v2 4/4] qemu: command: move validation of vmcoreinfo to qemu_domain.c

2019-12-17 Thread Daniel Henrique Barboza
Move the validation of vmcoreinfo from qemuBuildVMCoreInfoCommandLine() to qemuDomainDefValidateFeatures(), allowing for validation at domain define time. qemuxml2xmltest.c was changed to account for this caps being now validated at this earlier stage. Signed-off-by: Daniel Henrique Barboza ---

[libvirt] [PATCH v2 2/4] qemu: command: move qemuBuildGraphicsEGLHeadlessCommandLine validation to qemu_domain.c

2019-12-17 Thread Daniel Henrique Barboza
Move EGL Headless validation from qemuBuildGraphicsEGLHeadlessCommandLine() to qemuDomainDeviceDefValidateGraphics(). This function is called by qemuDomainDefValidate(), validating the graphics parameters in domain define time. Signed-off-by: Daniel Henrique Barboza --- src/qemu/qemu_command.c

[libvirt] [PATCH v2 0/4] move qemucaps validations from qemu_command to qemu_domain

2019-12-17 Thread Daniel Henrique Barboza
Most of the patches were pushed in the first version. These are the patches that didn't make the cut and needed new versions. After these patches I'll refrain from doing more validation moves to qemu_domain.c. I'll send a RFC discussing how we can move all the validations to a new file first,

Re: [libvirt] [PATCH v6 0/4] PCI hostdev partial assignment support

2019-12-17 Thread Alex Williamson
On Tue, 17 Dec 2019 17:35:01 -0300 Daniel Henrique Barboza wrote: > changes from previous version 5 [1]: > - changes in the commit message of patch 1 and the > documentation included in patches 3 and 4, all of them > suggested/hinted by Alex Williamson. Seems conceptually sound and believe the

[libvirt] [PATCH v3 4/4] util: Rewrite virGetUserRuntimeDirectory() using g_get_user_runtime_dir()

2019-12-17 Thread Fabiano Fidêncio
Signed-off-by: Fabiano Fidêncio --- src/util/virutil.c | 39 ++- 1 file changed, 10 insertions(+), 29 deletions(-) diff --git a/src/util/virutil.c b/src/util/virutil.c index 2e8b4e95b7..52b12126d7 100644 --- a/src/util/virutil.c +++ b/src/util/virutil.c @@

[libvirt] [PATCH v3 0/4] Rewrite virGetUser*Directory() functions using g_get_*_dir()

2019-12-17 Thread Fabiano Fidêncio
By rewriting virGetUser*Directory() functions using g_get_*_dir() functions allows us to drop all the different implementations we keep, as GLib already takes care of those for us. Changes since v2: https://www.redhat.com/archives/libvir-list/2019-December/msg01064.html - Addressed comments made

[libvirt] [PATCH v3 3/4] util: Rewrite virGetUserCacheDirectory() using g_get_user_cache_dir()

2019-12-17 Thread Fabiano Fidêncio
Signed-off-by: Fabiano Fidêncio --- src/util/virutil.c | 57 -- 1 file changed, 10 insertions(+), 47 deletions(-) diff --git a/src/util/virutil.c b/src/util/virutil.c index 1bcdde9ad6..2e8b4e95b7 100644 --- a/src/util/virutil.c +++

[libvirt] [PATCH v3 1/4] util: Rewrite virGetUserDirectory() using g_get_home_dir()

2019-12-17 Thread Fabiano Fidêncio
Signed-off-by: Fabiano Fidêncio --- src/util/virutil.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/util/virutil.c b/src/util/virutil.c index ed1f696e37..7008c3119c 100644 --- a/src/util/virutil.c +++ b/src/util/virutil.c @@ -582,7 +582,7 @@ virGetHostnameQuiet(void)

[libvirt] [PATCH v3 2/4] util: Rewrite virGetUserConfigDirectory() using g_get_user_config_dir()

2019-12-17 Thread Fabiano Fidêncio
Signed-off-by: Fabiano Fidêncio --- src/util/virutil.c | 39 ++- 1 file changed, 10 insertions(+), 29 deletions(-) diff --git a/src/util/virutil.c b/src/util/virutil.c index 7008c3119c..1bcdde9ad6 100644 --- a/src/util/virutil.c +++ b/src/util/virutil.c @@

[libvirt] [PATCH v6 3/4] formatdomain.html.in: document

2019-12-17 Thread Daniel Henrique Barboza
Signed-off-by: Daniel Henrique Barboza --- docs/formatdomain.html.in | 10 ++ 1 file changed, 10 insertions(+) diff --git a/docs/formatdomain.html.in b/docs/formatdomain.html.in index e06cf2061b..dd04a05f09 100644 --- a/docs/formatdomain.html.in +++ b/docs/formatdomain.html.in @@

[libvirt] [PATCH v6 0/4] PCI hostdev partial assignment support

2019-12-17 Thread Daniel Henrique Barboza
changes from previous version 5 [1]: - changes in the commit message of patch 1 and the documentation included in patches 3 and 4, all of them suggested/hinted by Alex Williamson. Daniel Henrique Barboza (4): Introducing new address type='unassigned' for PCI hostdevs qemu: handle unassigned

[libvirt] [PATCH v6 1/4] Introducing new address type='unassigned' for PCI hostdevs

2019-12-17 Thread Daniel Henrique Barboza
This patch introduces a new PCI hostdev address type called 'unassigned'. This new type gives users the option to add PCI hostdevs to the domain XML in an 'unassigned' state, meaning that the device exists in the domain, is managed by Libvirt like any regular PCI hostdev, but the guest does not

[libvirt] [PATCH v6 4/4] news.xml: add address type='unassigned' entry

2019-12-17 Thread Daniel Henrique Barboza
Signed-off-by: Daniel Henrique Barboza --- docs/news.xml | 14 ++ 1 file changed, 14 insertions(+) diff --git a/docs/news.xml b/docs/news.xml index 2a25b6ca49..055353b9a5 100644 --- a/docs/news.xml +++ b/docs/news.xml @@ -54,6 +54,20 @@ written in the RST as an

[libvirt] [PATCH v6 2/4] qemu: handle unassigned PCI hostdevs in command line

2019-12-17 Thread Daniel Henrique Barboza
Previous patch made it possible for the QEMU driver to check if a given PCI hostdev is unassigned, by checking if dev->info->type is VIR_DOMAIN_DEVICE_ADDRESS_TYPE_UNASSIGNED, meaning that this device shouldn't be part of the actual guest launch. Signed-off-by: Daniel Henrique Barboza ---

[libvirt] [PATCH 3/3] virsh: Adjust logic checks in virshUpdateDiskXML

2019-12-17 Thread John Ferlan
Make it clearer that what we're trying to do is find @source and @target_node so that the unattentive or code analysis utility doesn't believe 'source' and 'target' could be found in the same node element. Signed-off-by: John Ferlan --- tools/virsh-domain.c | 5 ++--- 1 file changed, 2

[libvirt] [PATCH 2/3] vbox: Reset @ret after xmlFreeNode

2019-12-17 Thread John Ferlan
In the error path, if we xmlFreeNode @ret, then the return ret; a few lines later returns something that's already been free'd and could be reused, so let's reinit it. Found by Coverity Signed-off-by: John Ferlan --- src/vbox/vbox_snapshot_conf.c | 1 + 1 file changed, 1 insertion(+) diff

[libvirt] [PATCH 1/3] conf: Fix ATTRIBUTE_NONNULL usages

2019-12-17 Thread John Ferlan
Recent changes removed the virCapsPtr, but didn't adjust/remove the corresponding ATTRIBUTE_NONNULL resulting in a build failure to build in my Coverity environment. Signed-off-by: John Ferlan --- src/conf/domain_conf.h | 15 ++- 1 file changed, 6 insertions(+), 9 deletions(-) diff

[libvirt] [PATCH 0/3] Some coverity adjustments

2019-12-17 Thread John Ferlan
I upgraded to f31 and it resulted in an essentially hosed Coverity build/analysis environment with the following message during cov-emit processing (a preprocessing of sorts): "/usr/include/glib-2.0/glib/gspawn.h", line 76: error #67: expected a "}" G_SPAWN_ERROR_2BIG

Re: [libvirt] [PATCH v2 2/4] util: Rewrite virGetUserConfigDirectory() using g_get_user_config_dir()

2019-12-17 Thread Cole Robinson
On 12/17/19 11:41 AM, Fabiano Fidêncio wrote: > Signed-off-by: Fabiano Fidêncio > --- > src/util/virutil.c | 35 ++- > 1 file changed, 6 insertions(+), 29 deletions(-) > > diff --git a/src/util/virutil.c b/src/util/virutil.c > index 8c255abd7f..63680974b8 100644

Re: [libvirt] [PATCH v5 4/4] news.xml: add address type='unassigned' entry

2019-12-17 Thread Daniel Henrique Barboza
On 12/17/19 4:44 PM, Alex Williamson wrote: On Tue, 17 Dec 2019 16:06:47 -0300 Daniel Henrique Barboza wrote: Signed-off-by: Daniel Henrique Barboza --- docs/news.xml | 14 ++ 1 file changed, 14 insertions(+) diff --git a/docs/news.xml b/docs/news.xml index

Re: [libvirt] [PATCH v2 1/4] util: Rewrite virGetUserDirectory() using g_get_home_dir()

2019-12-17 Thread Cole Robinson
On 12/17/19 11:41 AM, Fabiano Fidêncio wrote: > Signed-off-by: Fabiano Fidêncio > --- > src/util/virutil.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/src/util/virutil.c b/src/util/virutil.c > index ed1f696e37..8c255abd7f 100644 > --- a/src/util/virutil.c > +++

Re: [libvirt] [PATCH v5 4/4] news.xml: add address type='unassigned' entry

2019-12-17 Thread Alex Williamson
On Tue, 17 Dec 2019 16:06:47 -0300 Daniel Henrique Barboza wrote: > Signed-off-by: Daniel Henrique Barboza > --- > docs/news.xml | 14 ++ > 1 file changed, 14 insertions(+) > > diff --git a/docs/news.xml b/docs/news.xml > index 2a25b6ca49..febda970f6 100644 > --- a/docs/news.xml >

Re: [libvirt] [PATCH] qemu: homogenize MAC address in live & config when hotplugging a netdev

2019-12-17 Thread Laine Stump
On 12/17/19 1:45 PM, Michal Prívozník wrote: On 12/17/19 6:04 PM, Laine Stump wrote: ... +static void +qemuDomainAttachDeviceLiveAndConfigHomogenize(const virDomainDeviceDef *devConf, + virDomainDeviceDefPtr devLive) +{ +/* + * fixup

Re: [libvirt] [PATCH 4/7] libvirt: support an "embed" URI path selector for opening drivers

2019-12-17 Thread Cole Robinson
On 12/17/19 2:28 PM, Michal Prívozník wrote: > > But this looks weird, isn't virt-install registerin an event loop? How > else does it get events? virt-install doesn't register an event loop, it polls for the single VM state change we care about. But if registering an event loop is necessary for

Re: [libvirt] [PATCH v5 3/4] formatdomain.html.in: document

2019-12-17 Thread Alex Williamson
On Tue, 17 Dec 2019 16:06:46 -0300 Daniel Henrique Barboza wrote: > Signed-off-by: Daniel Henrique Barboza > --- > docs/formatdomain.html.in | 13 + > 1 file changed, 13 insertions(+) > > diff --git a/docs/formatdomain.html.in b/docs/formatdomain.html.in > index

Re: [libvirt] [PATCH 4/4] kbase: Add document outlining backing chain XML config and troubleshooting

2019-12-17 Thread Peter Krempa
On Tue, Dec 17, 2019 at 13:17:22 -0600, Eric Blake wrote: > On 12/17/19 12:35 PM, Peter Krempa wrote: > > Signed-off-by: Peter Krempa > > --- [...] > > +If the ``backing file format:`` field is missing above the format was not > > +specified properly. The image can be fixed by the following

Re: [libvirt] [PATCH 4/7] libvirt: support an "embed" URI path selector for opening drivers

2019-12-17 Thread Michal Prívozník
On 12/17/19 6:41 PM, Cole Robinson wrote: > On 12/2/19 10:03 AM, Daniel P. Berrangé wrote: >> The driver URI scheme: >> >> "$drivername:///embed?root=/some/path" >> >> enables a new way to use the drivers by embedding them directly in the >> calling process. To use this the process must have a

Re: [libvirt] [PATCH v5 1/4] Introducing new address type='unassigned' for PCI hostdevs

2019-12-17 Thread Alex Williamson
On Tue, 17 Dec 2019 16:06:44 -0300 Daniel Henrique Barboza wrote: > Today, to use a PCI hostdev "A" in a domain, all PCI devices > that belongs to the same IOMMU group must also be declared in > the domain XML, meaning that all IOMMU devices are detached > from the host and all of them are

Re: [libvirt] [PATCH] virt-host-validate: warn if kvm_hv is not loaded for POWER hosts

2019-12-17 Thread Daniel Henrique Barboza
On 12/17/19 2:58 PM, Cole Robinson wrote: On 12/12/19 4:11 PM, Daniel Henrique Barboza wrote: POWER hosts does not implement CPU virtualization extensions like x86 or s390x. Instead, all bare-metal POWER hosts are considered to be virtualization ready. For POWER, the validation is done by

Re: [libvirt] [PATCH 4/4] kbase: Add document outlining backing chain XML config and troubleshooting

2019-12-17 Thread Eric Blake
On 12/17/19 12:35 PM, Peter Krempa wrote: Signed-off-by: Peter Krempa --- +Image detection caveats +--- + +Detection of the backing chain requires libvirt to read and understand the +``backing file`` field recorded in the image metadata and also being able to +recurse and

[libvirt] [PATCH v5 0/4] PCI hostdev partial assignment support

2019-12-17 Thread Daniel Henrique Barboza
changes from v4 [1]: - previous patch 3 was removed. The validation it was implementating proved to be too restrict, while providing no tangible benefits for the trouble of having existing domains failing to launch. This makes this series all about the new address type implementation and its

[libvirt] [PATCH v5 1/4] Introducing new address type='unassigned' for PCI hostdevs

2019-12-17 Thread Daniel Henrique Barboza
Today, to use a PCI hostdev "A" in a domain, all PCI devices that belongs to the same IOMMU group must also be declared in the domain XML, meaning that all IOMMU devices are detached from the host and all of them are visible to the guest. The result is that the guest will have access to all

[libvirt] [PATCH v5 2/4] qemu: handle unassigned PCI hostdevs in command line

2019-12-17 Thread Daniel Henrique Barboza
Previous patch made it possible for the QEMU driver to check if a given PCI hostdev is unassigned, by checking if dev->info->type is VIR_DOMAIN_DEVICE_ADDRESS_TYPE_UNASSIGNED, meaning that this device shouldn't be part of the actual guest launch. Signed-off-by: Daniel Henrique Barboza ---

[libvirt] [PATCH v5 4/4] news.xml: add address type='unassigned' entry

2019-12-17 Thread Daniel Henrique Barboza
Signed-off-by: Daniel Henrique Barboza --- docs/news.xml | 14 ++ 1 file changed, 14 insertions(+) diff --git a/docs/news.xml b/docs/news.xml index 2a25b6ca49..febda970f6 100644 --- a/docs/news.xml +++ b/docs/news.xml @@ -54,6 +54,20 @@ written in the RST as an

[libvirt] [PATCH v5 3/4] formatdomain.html.in: document

2019-12-17 Thread Daniel Henrique Barboza
Signed-off-by: Daniel Henrique Barboza --- docs/formatdomain.html.in | 13 + 1 file changed, 13 insertions(+) diff --git a/docs/formatdomain.html.in b/docs/formatdomain.html.in index e06cf2061b..7a5ebdd67e 100644 --- a/docs/formatdomain.html.in +++ b/docs/formatdomain.html.in @@

Re: [libvirt] [PATCH 0/4] qemu: Error out if backing image format is not recorded in image metadata

2019-12-17 Thread Michal Prívozník
On 12/17/19 7:35 PM, Peter Krempa wrote: > See patch 3/4 for explanation. > > Peter Krempa (4): > tests: storage: Use strict version of virStorageFileGetMetadata > tests: storage: Remove unused test modes > util: storage: Don't treat files with missing backing store format as > 'raw' >

Re: [libvirt] [PATCH v2 11/12] esx: implement storagePoolListAllVolumes

2019-12-17 Thread Cole Robinson
On 11/15/19 7:40 AM, Pino Toscano wrote: > Implement the .storagePoolListAllVolumes storage API in the esx storage > driver, and in all its subdrivers. > > Signed-off-by: Pino Toscano > --- > src/esx/esx_storage_backend_iscsi.c | 70 > src/esx/esx_storage_backend_vmfs.c

Re: [libvirt] [PATCH] qemu: homogenize MAC address in live & config when hotplugging a netdev

2019-12-17 Thread Michal Prívozník
On 12/17/19 6:04 PM, Laine Stump wrote: > Prior to commit 55ce6564634 (first in libvirt 4.6.0), the XML sent to > virDomainAttachDeviceFlags() was parsed only once, and the results of > that parse were inserted into both the live object of the running > domain and into the persistent config. Thus,

Re: [libvirt] [PATCH v2 10/12] esx: split scsilunToStorageVol helper

2019-12-17 Thread Cole Robinson
On 11/15/19 7:40 AM, Pino Toscano wrote: > Move the creation of a virStorageVolPtr object from the esxVI_ScsiLun > object of a SCSI lun out of esxStorageVolLookupByName and > esxStorageVolLookupByPath in an own helper. This way it can be used > also in other functions. > > Signed-off-by: Pino

Re: [libvirt] [PATCH v2 09/12] esx: split datastorePathToStorageVol helper

2019-12-17 Thread Cole Robinson
On 11/15/19 7:40 AM, Pino Toscano wrote: > Move the creation of a virStorageVolPtr object by lookup out of > esxStorageVolLookupByPath in an own helper. This way it can be used > also in other functions. > > Signed-off-by: Pino Toscano > --- > src/esx/esx_storage_backend_vmfs.c | 28

Re: [libvirt] [PATCH v2 08/12] esx: set vmfs fs type for vmfs-based datastores

2019-12-17 Thread Cole Robinson
On 11/15/19 7:40 AM, Pino Toscano wrote: > This way they are correctly represented: > > > > ... instead of 'auto'. > > Signed-off-by: Pino Toscano > --- > src/esx/esx_storage_backend_vmfs.c | 1 + > 1 file changed, 1 insertion(+) > > diff --git a/src/esx/esx_storage_backend_vmfs.c

Re: [libvirt] [PATCH v2 06/12] esx: implement connectListAllNetworks

2019-12-17 Thread Cole Robinson
On 11/15/19 7:40 AM, Pino Toscano wrote: > Implement the .connectListAllNetworks networks API in the esx network > driver. > > Signed-off-by: Pino Toscano > --- > src/esx/esx_network_driver.c | 66 > 1 file changed, 66 insertions(+) Needs the same treatment

Re: [libvirt] [PATCH v2 07/12] storage: add vmfs filesystem type

2019-12-17 Thread Cole Robinson
On 11/15/19 7:40 AM, Pino Toscano wrote: > It will be used to represent the type of a filesystem pool in ESXi. > > Signed-off-by: Pino Toscano > --- > docs/schemas/storagepool.rng | 1 + > docs/schemas/storagevol.rng | 1 + > docs/storage.html.in

Re: [libvirt] [PATCH v2 05/12] esx: split virtualswitchToNetwork helper

2019-12-17 Thread Cole Robinson
On 11/15/19 7:40 AM, Pino Toscano wrote: > Move the creation of a virNetworkPtr object from the > esxVI_HostVirtualSwitch object of a virtual switch out of > esxNetworkLookupByName in an own helper. This way it can be used also > in other functions. > > Signed-off-by: Pino Toscano Reviewed-by:

[libvirt] [PATCH 4/4] kbase: Add document outlining backing chain XML config and troubleshooting

2019-12-17 Thread Peter Krempa
Signed-off-by: Peter Krempa --- docs/kbase.html.in| 4 + docs/kbase/backing_chains.rst | 185 ++ 2 files changed, 189 insertions(+) create mode 100644 docs/kbase/backing_chains.rst diff --git a/docs/kbase.html.in b/docs/kbase.html.in index

[libvirt] [PATCH 2/4] tests: storage: Remove unused test modes

2019-12-17 Thread Peter Krempa
EXP_WARN and ALLOW_PROBE flags for the testStorageChain cases are no longer used so we can remove them. Signed-off-by: Peter Krempa --- tests/virstoragetest.c | 30 +- 1 file changed, 9 insertions(+), 21 deletions(-) diff --git a/tests/virstoragetest.c

[libvirt] [PATCH 3/4] util: storage: Don't treat files with missing backing store format as 'raw'

2019-12-17 Thread Peter Krempa
Assuming that the backing image format is raw is wrong when doing image detection: 1) In -drive mode qemu will still probe the image format of the backing image. This means it will try to open a backing file of the image which will fail if a more advanced security model is in use. 2) In

[libvirt] [PATCH 0/4] qemu: Error out if backing image format is not recorded in image metadata

2019-12-17 Thread Peter Krempa
See patch 3/4 for explanation. Peter Krempa (4): tests: storage: Use strict version of virStorageFileGetMetadata tests: storage: Remove unused test modes util: storage: Don't treat files with missing backing store format as 'raw' kbase: Add document outlining backing chain XML config

[libvirt] [PATCH 1/4] tests: storage: Use strict version of virStorageFileGetMetadata

2019-12-17 Thread Peter Krempa
Pass in 'true' as '@report_broken' of virStorageFileGetMetadata to make it fail in the tests. The most important code paths (when starting the VM) expect this function to fail rather than silently return partial data. Switch the test to exercise this more important code path. Signed-off-by: Peter

Re: [libvirt] [PATCH-for-4.2] hw/mips: Deprecate the r4k machine

2019-12-17 Thread Thomas Huth
Hi, On 25/11/2019 11.41, Philippe Mathieu-Daudé wrote: [...] > diff --git a/qemu-deprecated.texi b/qemu-deprecated.texi > index 4b4b7425ac..05265b43c8 100644 > --- a/qemu-deprecated.texi > +++ b/qemu-deprecated.texi > @@ -266,6 +266,11 @@ The 'scsi-disk' device is deprecated. Users should use >

Re: [libvirt] [PATCH] virt-host-validate: warn if kvm_hv is not loaded for POWER hosts

2019-12-17 Thread Cole Robinson
On 12/12/19 4:11 PM, Daniel Henrique Barboza wrote: > POWER hosts does not implement CPU virtualization extensions like > x86 or s390x. Instead, all bare-metal POWER hosts are considered > to be virtualization ready. > > For POWER, the validation is done by checking the virtualization > kernel

Re: [libvirt] [PATCH 4/7] libvirt: support an "embed" URI path selector for opening drivers

2019-12-17 Thread Cole Robinson
On 12/2/19 10:03 AM, Daniel P. Berrangé wrote: > The driver URI scheme: > > "$drivername:///embed?root=/some/path" > > enables a new way to use the drivers by embedding them directly in the > calling process. To use this the process must have a thread running the > libvirt event loop. This URI

Re: [libvirt] [PATCH 3/7] event: add API for requiring an event loop impl to be registered

2019-12-17 Thread Cole Robinson
On 12/2/19 10:03 AM, Daniel P. Berrangé wrote: > Signed-off-by: Daniel P. Berrangé > --- > po/POTFILES.in | 1 + > src/util/virevent.c | 25 + > src/util/virevent.h | 2 ++ > 3 files changed, 28 insertions(+) > > diff --git a/po/POTFILES.in b/po/POTFILES.in >

[libvirt] [PATCH 1/2] qemu_firmware: Pass virDomainDef into qemuFirmwareFillDomain()

2019-12-17 Thread Michal Privoznik
This function needs domain definition really, we don't need to pass the whole domain object. This saves couple of dereferences and characters esp. in more checks to come. Signed-off-by: Michal Privoznik --- src/qemu/qemu_firmware.c | 12 ++-- src/qemu/qemu_firmware.h | 2 +-

[libvirt] [PATCH 0/2] qemu_firmware: Try to autofill for old style UEFI specification

2019-12-17 Thread Michal Privoznik
See 2/2 for info. Michal Prívozník (2): qemu_firmware: Pass virDomainDef into qemuFirmwareFillDomain() qemu_firmware: Try to autofill for old style UEFI specification src/qemu/qemu_firmware.c | 90 +--- src/qemu/qemu_firmware.h | 2 +-

Re: [libvirt] [PATCH 3/7] event: add API for requiring an event loop impl to be registered

2019-12-17 Thread Cole Robinson
On 12/2/19 10:03 AM, Daniel P. Berrangé wrote: > Signed-off-by: Daniel P. Berrangé > --- > po/POTFILES.in | 1 + > src/util/virevent.c | 25 + > src/util/virevent.h | 2 ++ > 3 files changed, 28 insertions(+) > > diff --git a/po/POTFILES.in b/po/POTFILES.in >

[libvirt] [PATCH 2/2] qemu_firmware: Try to autofill for old style UEFI specification

2019-12-17 Thread Michal Privoznik
While we discourage people to use the old style of specifying UEFI for their domains (the old style is putting path to the FW image under /domain/os/loader/ whilst the new one is using /domain/os/@firmware), some applications might have not adopted yet. They still rely on libvirt autofilling NVRAM

Re: [libvirt] [PATCH 2/7] libvirt: pass a directory path into drivers for embedded usage

2019-12-17 Thread Cole Robinson
On 12/2/19 10:03 AM, Daniel P. Berrangé wrote: > The intent here is to allow the virt drivers to be run directly embedded > in an arbitrary process without interfering with libvirtd. To achieve > this they need to store all their configuration & state in a separate > directory tree from the main

Re: [libvirt] [PATCH 1/7] access: report an error if no access manager is present

2019-12-17 Thread Cole Robinson
On 12/2/19 10:03 AM, Daniel P. Berrangé wrote: > The code calling this method expects it to have reported an error on > failure. > > Signed-off-by: Daniel P. Berrangé > --- > src/access/viraccessmanager.c | 5 + > 1 file changed, 5 insertions(+) > > diff --git

Re: [libvirt] [PATCH v4 0/5] PCI hostdev partial assignment support

2019-12-17 Thread Daniel Henrique Barboza
On 12/17/19 1:43 PM, Daniel Henrique Barboza wrote: I don't actually recall saying that :-). I haven't looked in the list archives, but what I *can* imagine myself saying is that only devices mentioned in the XML should be manipulated in any way by libvirt. So, +1 for example, you

[libvirt] [PATCH] qemu: homogenize MAC address in live & config when hotplugging a netdev

2019-12-17 Thread Laine Stump
Prior to commit 55ce6564634 (first in libvirt 4.6.0), the XML sent to virDomainAttachDeviceFlags() was parsed only once, and the results of that parse were inserted into both the live object of the running domain and into the persistent config. Thus, if MAC address was omitted from in XML for a

Re: [libvirt] [PATCH v4 0/5] PCI hostdev partial assignment support

2019-12-17 Thread Alex Williamson
On Tue, 17 Dec 2019 13:43:14 -0300 Daniel Henrique Barboza wrote: > On 12/17/19 1:32 PM, Alex Williamson wrote: > > On Tue, 17 Dec 2019 11:25:38 -0500 > > Laine Stump wrote: > > > >> On 12/16/19 6:03 PM, Daniel Henrique Barboza wrote: > >>> About breaking existing configurations, there is

Re: [libvirt] [PATCH v4 0/5] PCI hostdev partial assignment support

2019-12-17 Thread Daniel Henrique Barboza
On 12/17/19 1:32 PM, Alex Williamson wrote: On Tue, 17 Dec 2019 11:25:38 -0500 Laine Stump wrote: On 12/16/19 6:03 PM, Daniel Henrique Barboza wrote: About breaking existing configurations, there is the possibility of not going forward with patch 03, which is enforcing this rule of

[libvirt] [PATCH v2 3/4] util: Rewrite virGetUserCacheDirectory() using g_get_user_cache_dir()

2019-12-17 Thread Fabiano Fidêncio
Signed-off-by: Fabiano Fidêncio --- src/util/virutil.c | 53 ++ 1 file changed, 6 insertions(+), 47 deletions(-) diff --git a/src/util/virutil.c b/src/util/virutil.c index 63680974b8..9485316e05 100644 --- a/src/util/virutil.c +++ b/src/util/virutil.c

[libvirt] [PATCH v2 1/4] util: Rewrite virGetUserDirectory() using g_get_home_dir()

2019-12-17 Thread Fabiano Fidêncio
Signed-off-by: Fabiano Fidêncio --- src/util/virutil.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/util/virutil.c b/src/util/virutil.c index ed1f696e37..8c255abd7f 100644 --- a/src/util/virutil.c +++ b/src/util/virutil.c @@ -582,7 +582,7 @@ virGetHostnameQuiet(void)

[libvirt] [PATCH v2 4/4] util: Rewrite virGetUserRuntimeDirectory() using g_get_user_runtime_dir()

2019-12-17 Thread Fabiano Fidêncio
Signed-off-by: Fabiano Fidêncio --- src/util/virutil.c | 35 ++- 1 file changed, 6 insertions(+), 29 deletions(-) diff --git a/src/util/virutil.c b/src/util/virutil.c index 9485316e05..10bf96f193 100644 --- a/src/util/virutil.c +++ b/src/util/virutil.c @@ -598,6

[libvirt] [PATCH v2 2/4] util: Rewrite virGetUserConfigDirectory() using g_get_user_config_dir()

2019-12-17 Thread Fabiano Fidêncio
Signed-off-by: Fabiano Fidêncio --- src/util/virutil.c | 35 ++- 1 file changed, 6 insertions(+), 29 deletions(-) diff --git a/src/util/virutil.c b/src/util/virutil.c index 8c255abd7f..63680974b8 100644 --- a/src/util/virutil.c +++ b/src/util/virutil.c @@ -586,6

[libvirt] [PATCH v2 0/4] Rewrite virGetUser*Directory() functions using g_get_*_dir()

2019-12-17 Thread Fabiano Fidêncio
By rewriting virGetUser*Directory() functions using g_get_*_dir() functions allows us to drop all the different implementations we keep, as GLib already takes care of those for us. Changes since v1: https://www.redhat.com/archives/libvir-list/2019-December/msg01055.html - Don't check for the

Re: [libvirt] [PATCH v4 0/5] PCI hostdev partial assignment support

2019-12-17 Thread Alex Williamson
On Tue, 17 Dec 2019 11:25:38 -0500 Laine Stump wrote: > On 12/16/19 6:03 PM, Daniel Henrique Barboza wrote: > > > > > > On 12/16/19 7:28 PM, Cole Robinson wrote: > >> On 12/16/19 8:36 AM, Daniel Henrique Barboza wrote: > >>> changes from version 3 [1]: > >>> - removed last 2 patches that

Re: [libvirt] [PATCH v4 0/5] PCI hostdev partial assignment support

2019-12-17 Thread Laine Stump
On 12/16/19 6:03 PM, Daniel Henrique Barboza wrote: On 12/16/19 7:28 PM, Cole Robinson wrote: On 12/16/19 8:36 AM, Daniel Henrique Barboza wrote: changes from version 3 [1]: - removed last 2 patches that made function 0 of PCI multifunction devices mandatory - new patch: news.xml update -

Re: [libvirt] [PATCH] ci: Fetch list of available container images dynamically

2019-12-17 Thread Cole Robinson
On 12/11/19 12:56 PM, Andrea Bolognani wrote: > Any static list of images is destined to become outdated eventually, > so let's start generating it dynamically instead. > > Unfortunately there doesn't seem to be a straightforward way to get > Podman/Docker to list all repositories under

Re: [libvirt] [PATCH 2/3] qemu: use g_autofree instead of VIR_FREE in qemuMonitorTextCreateSnapshot()

2019-12-17 Thread Cole Robinson
On 12/6/19 4:11 AM, Pavel Mores wrote: > While at bugfixing, convert the whole function to the new-style memory > allocation handling. > > Signed-off-by: Pavel Mores > --- > src/qemu/qemu_monitor_text.c | 18 ++ > 1 file changed, 6 insertions(+), 12 deletions(-) > Reviewed-by:

[libvirt] [PATCH 4/4] util: Rewrite virGetUserRuntimeDirectory() using g_get_user_runtime_dir()

2019-12-17 Thread Fabiano Fidêncio
Signed-off-by: Fabiano Fidêncio --- src/util/virutil.c | 40 +++- 1 file changed, 11 insertions(+), 29 deletions(-) diff --git a/src/util/virutil.c b/src/util/virutil.c index 993a959555..62cb3390f8 100644 --- a/src/util/virutil.c +++ b/src/util/virutil.c @@

[libvirt] [PATCH 0/4] Rewrite virGetUser*Directory() functions using g_get_*_dir()

2019-12-17 Thread Fabiano Fidêncio
By rewriting virGetUser*Directory() functions using g_get_*_dir() functions allows us to drop all the different implementations we keep, as GLib already takes care of those for us. Fabiano Fidêncio (4): util: Rewrite virGetUserDirectory() using g_get_home_dir() util: Rewrite

[libvirt] [PATCH 2/4] util: Rewrite virGetUserConfigDirectory() using g_get_user_config_dir()

2019-12-17 Thread Fabiano Fidêncio
Signed-off-by: Fabiano Fidêncio --- src/util/virutil.c | 40 +++- 1 file changed, 11 insertions(+), 29 deletions(-) diff --git a/src/util/virutil.c b/src/util/virutil.c index 70a05e3c9b..6fae3e8288 100644 --- a/src/util/virutil.c +++ b/src/util/virutil.c @@

[libvirt] [PATCH 3/4] util: Rewrite virGetUserCacheDirectory() using g_get_user_cache_dir()

2019-12-17 Thread Fabiano Fidêncio
Signed-off-by: Fabiano Fidêncio --- src/util/virutil.c | 58 +- 1 file changed, 11 insertions(+), 47 deletions(-) diff --git a/src/util/virutil.c b/src/util/virutil.c index 6fae3e8288..993a959555 100644 --- a/src/util/virutil.c +++

[libvirt] [PATCH 1/4] util: Rewrite virGetUserDirectory() using g_get_home_dir()

2019-12-17 Thread Fabiano Fidêncio
Signed-off-by: Fabiano Fidêncio --- src/util/virutil.c | 8 +++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/util/virutil.c b/src/util/virutil.c index ed1f696e37..70a05e3c9b 100644 --- a/src/util/virutil.c +++ b/src/util/virutil.c @@ -582,7 +582,13 @@

Re: [libvirt] [PATCH] tests: securityselinuxlabel: Add QEMU_CAPS_VNC to fake qemuCaps

2019-12-17 Thread Cole Robinson
On 12/17/19 4:04 AM, Peter Krempa wrote: > In commit 45270337f057f26ce484f6e forgot to make sure that tests pass. > Add the missing capability to fix the test. > Thanks for the fixing this. FWIW I tested every commit individually, multiple times over as I was poking at this series over a few

Re: [libvirt] [PATCH 0/9] Cleanup virConnectPtr usage

2019-12-17 Thread Cole Robinson
On 12/4/19 4:55 AM, Michal Privoznik wrote: > I've noticed this problem when reviewing a patch on the list [1]. > > Long story short, dom->conn is not guaranteed to have all driver > pointers set (consider split daemons). I haven't identified any > other violation than what I'm fixing here. But

Re: [libvirt] [PATCH] cpu_map/x86: Add support for BFLOAT16 data type

2019-12-17 Thread Ján Tomko
On Fri, Dec 13, 2019 at 05:27:13PM +0100, Jiri Denemark wrote: Introduced in QEMU by commit v4.1.0-266-g80db491da4. Please delete the trailing dot, to make selecting the commit ID easier. Signed-off-by: Jiri Denemark --- src/cpu_map/x86_features.xml | 4 1 file changed, 4 insertions(+)

Re: [libvirt] [PATCH] virsh migrate: Require --tls for --tls-destination

2019-12-17 Thread Peter Krempa
On Tue, Dec 17, 2019 at 15:02:24 +0100, Jiri Denemark wrote: > On Tue, Dec 17, 2019 at 14:46:24 +0100, Peter Krempa wrote: > > On Tue, Dec 17, 2019 at 14:34:12 +0100, Jiri Denemark wrote: > > > --tls-destination would be just ignored unless --tls is not specified, > > > which is correct, but let's

Re: [libvirt] [glib PATCH 0/2] po: change over to use Weblate instead of Zanata

2019-12-17 Thread Michal Prívozník
On 12/16/19 1:40 PM, Daniel P. Berrangé wrote: > Zanata is dead upstream, and Fedora is replacing it with Weblate > > https://fedoraproject.org/wiki/L10N_Move_to_Weblate > > Libvirt has outsourced its translations to the Fedora translation > team, so we must follow this move. > > Daniel P.

Re: [libvirt] [glib PATCH 2/2] po: change update rules to use weblate instead of zanata

2019-12-17 Thread Michal Prívozník
On 12/16/19 1:40 PM, Daniel P. Berrangé wrote: > The Zanata project is dead and so Fedora is transitioning over to using > Weblate for managing translations. With Weblate, languages are only > created on the server when the first translation is started, so we must > check to see if any new

Re: [libvirt] [PATCH] virsh migrate: Require --tls for --tls-destination

2019-12-17 Thread Jiri Denemark
On Tue, Dec 17, 2019 at 14:46:24 +0100, Peter Krempa wrote: > On Tue, Dec 17, 2019 at 14:34:12 +0100, Jiri Denemark wrote: > > --tls-destination would be just ignored unless --tls is not specified, > > which is correct, but let's provide a bit of a guidance is a user > > forgets to add --tls. > >

Re: [libvirt] [PATCH] virsh migrate: Require --tls for --tls-destination

2019-12-17 Thread Peter Krempa
On Tue, Dec 17, 2019 at 14:34:12 +0100, Jiri Denemark wrote: > --tls-destination would be just ignored unless --tls is not specified, > which is correct, but let's provide a bit of a guidance is a user > forgets to add --tls. > > https://bugzilla.redhat.com/show_bug.cgi?id=1784345 > >

[libvirt] [PATCH] virsh migrate: Require --tls for --tls-destination

2019-12-17 Thread Jiri Denemark
--tls-destination would be just ignored unless --tls is not specified, which is correct, but let's provide a bit of a guidance is a user forgets to add --tls. https://bugzilla.redhat.com/show_bug.cgi?id=1784345 Signed-off-by: Jiri Denemark --- tools/virsh-domain.c | 1 + 1 file changed, 1

[libvirt] [PATCH] remote_daemon: Log host boot time

2019-12-17 Thread Michal Privoznik
This is not strictly needed, but it makes sure we initialize the @bootTime global variable. Thing is, in order to validate XATTRs and prune those set in some previous runs of the host, a timestamp is recorded in XATTRs. The host boot time was unique enough so it was chosen as the timestamp value.

Re: [libvirt] [PATCH v3 00/30] Introduce NVMe support

2019-12-17 Thread Michal Prívozník
On 12/2/19 3:26 PM, Michal Privoznik wrote: > This is pushed now. Thanks Cole for review! Michal -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list

Re: [libvirt] [PATCH 2/2] build: relax the relaxed stack frame limit further

2019-12-17 Thread Daniel Henrique Barboza
On 12/14/19 6:49 PM, Ján Tomko wrote: Pick 256k as the limit. While -Wno-frame-larger-than would make more sense for usage in our test suite, the -Wno version seems to have no effect if -Wframe-larger-than was already specified. Use an (un)reasonably large value instead. Fixes the build

Re: [libvirt] [PATCH 1/2] build: warn on a large frame by default

2019-12-17 Thread Daniel Henrique Barboza
On 12/14/19 6:49 PM, Ján Tomko wrote: My commit e73889b6311f5b43d859caa4bae84bfdb299967a split the -Wframe-larger-than warning setting into two different variables - STRICT_FRAME_LIMIT_CFLAGS for the library code and RELAXED_FRAME_LIMIT_CFLAGS which was needed for tests. Use the strict limit

Re: [libvirt] [PATCH] virtio-blk: deprecate SCSI passthrough

2019-12-17 Thread Stefan Hajnoczi
On Fri, Dec 13, 2019 at 02:46:26PM +, Stefan Hajnoczi wrote: > The Linux virtio_blk.ko guest driver is removing legacy SCSI passthrough > support. Deprecate this feature in QEMU too. > > Signed-off-by: Stefan Hajnoczi > --- > qemu-deprecated.texi | 11 +++ > 1 file changed, 11

[libvirt] [PATCH] tests: securityselinuxlabel: Add QEMU_CAPS_VNC to fake qemuCaps

2019-12-17 Thread Peter Krempa
In commit 45270337f057f26ce484f6e forgot to make sure that tests pass. Add the missing capability to fix the test. Signed-off-by: Peter Krempa --- Pushed. tests/securityselinuxlabeltest.c | 1 + 1 file changed, 1 insertion(+) diff --git a/tests/securityselinuxlabeltest.c