Re: [libvirt] [PATCH 3/9] util: storage: Store backing chain index in virStorageSource

2017-10-12 Thread Peter Krempa
On Thu, Oct 12, 2017 at 14:57:36 -0500, Eric Blake wrote: > On 10/12/2017 02:07 PM, Peter Krempa wrote: > > The backing store indexes were not bound to the storage sources in any > > way. To allow us to bind a given alias to a given storage source we need > > to save the index in virStorageSource.

Re: [libvirt] [PATCH 9/9] Terminate backing chains explicitly

2017-10-12 Thread Peter Krempa
On Thu, Oct 12, 2017 at 15:34:28 -0500, Eric Blake wrote: > On 10/12/2017 02:07 PM, Peter Krempa wrote: > > Express a properly terminated backing chain by putting a > > virStorageSource of type VIR_STORAGE_TYPE_NONE in the chain. The newly > > used helpers simplify this greatly. > > > > The change

[libvirt] [PATCH] qemu: change monitor.sock from /var/lib/libvirt/qemu/domain-*** to /var/run/libvirt/qemu/domain-***

2017-10-12 Thread xinhua.Cao
directory /var/lib alway is Persistence directory, but in redhat system, /var/run is memory directory. our running domain xml is saved at /var/run/libvirt/qemu. so if we cold reset system, the /var/run/libvirt/qemu directory is clear, but /var/lib/libvirt/qemu/domain-*** is saved. so there have

Re: [libvirt] [PATCH 2/2] network: Introduce virNetworkObjListForEachCb

2017-10-12 Thread John Ferlan
On 10/12/2017 08:48 AM, Erik Skultety wrote: > On Tue, Oct 10, 2017 at 04:20:06PM -0400, John Ferlan wrote: >> Rather than separate callbacks for the NumOfNetworks, GetNames, and >> Export functions, let's combine them all into one multi-purpose callback. >> >> Signed-off-by: John Ferlan >> ---

Re: [libvirt] [PATCH v3] qemu: add the print of page size in cmd domjobinfo

2017-10-12 Thread Chao Fan
On Thu, Oct 12, 2017 at 05:10:43PM +0200, Jiri Denemark wrote: >On Mon, Oct 09, 2017 at 10:00:03 +0800, Chao Fan wrote: >> The command "info migrate" of qemu outputs the dirty-pages-rate during >> migration, but page size is different in different architectures. So >> page size should be output to

Re: [libvirt] [PATCH v3] qemu: add the print of page size in cmd domjobinfo

2017-10-12 Thread Chao Fan
On Fri, Oct 13, 2017 at 09:13:07AM +0800, Chao Fan wrote: >On Thu, Oct 12, 2017 at 05:10:43PM +0200, Jiri Denemark wrote: >>On Mon, Oct 09, 2017 at 10:00:03 +0800, Chao Fan wrote: >>> The command "info migrate" of qemu outputs the dirty-pages-rate during >>> migration, but page size is different in

Re: [libvirt] [PATCH 23/23] cputest: Make a crippled version of Core-i7-2600

2017-10-12 Thread John Ferlan
On 10/04/2017 10:58 AM, Jiri Denemark wrote: > xsaveopt is artificially removed from the host to test disabled feature > which is only included in QEMU's version of the CPU model. > > Signed-off-by: Jiri Denemark > --- > tests/cputest.c| 1 + > ...x86_64-c

Re: [libvirt] [PATCH 21/23] cputest: Add query-cpu-definitions reply for Xeon-E3-1245

2017-10-12 Thread John Ferlan
On 10/04/2017 10:58 AM, Jiri Denemark wrote: > Signed-off-by: Jiri Denemark > --- > tests/cputest.c | 2 +- > tests/cputestdata/x86_64-cpuid-Xeon-E3-1245.json | 299 > +++ > 2 files changed, 300 insertions(+), 1 deletion(-) > There's ano

Re: [libvirt] [PATCH 22/23] cputest: Update Core-i7-2600 data

2017-10-12 Thread John Ferlan
On 10/04/2017 10:58 AM, Jiri Denemark wrote: > arat is now enabled even if the hardware does not support it. > > Signed-off-by: Jiri Denemark > --- > .../x86_64-cpuid-Core-i7-2600-disabled.xml | 1 - > .../x86_64-cpuid-Core-i7-2600-enabled.xml | 1 + > .../cputestdata/x86_

Re: [libvirt] [PATCH 20/23] cputest: Update Xeon-E3-1245 data

2017-10-12 Thread John Ferlan
On 10/04/2017 10:58 AM, Jiri Denemark wrote: > xsaves is supported by current QEMU/KVM on this CPU. Current as of when? Does this cause migration issues to have one version support and another not? What about save/restore type operations? I'm not against this, just curious. Not sure I ever w

Re: [libvirt] [PATCH 19/23] cputest: Add query-cpu-definitions reply for Xeon-E7-4830

2017-10-12 Thread John Ferlan
On 10/04/2017 10:58 AM, Jiri Denemark wrote: > This CPU was incorrectly detected as SandyBridge before because the > number of additional elements was the same for both > SandyBridge and Westmere CPU models, but SandyBridge is newer (the CPU > signature does not help here because it doesn't matc

Re: [libvirt] [PATCH 18/23] cputest: Add CPUID data for Intel(R) Xeon(R) CPU E7-4830

2017-10-12 Thread John Ferlan
On 10/04/2017 10:58 AM, Jiri Denemark wrote: > Signed-off-by: Jiri Denemark > --- > tests/cputest.c| 1 + > .../x86_64-cpuid-Xeon-E7-4830-disabled.xml | 5 + > .../x86_64-cpuid-Xeon-E7-4830-enabled.xml | 8 + > .../x86_64-cpuid-Xeon-E7-

Re: [libvirt] [PATCH 17/23] cputest: Add query-cpu-definitions reply for Core-i5-2540M

2017-10-12 Thread John Ferlan
On 10/04/2017 10:58 AM, Jiri Denemark wrote: > The unavailable features do not make any difference in this case, > because this is a SandyBridge CPU which has an empty list of unavailable > features. > > Signed-off-by: Jiri Denemark > --- > tests/cputest.c |

Re: [libvirt] [PATCH 13/23] cputest: Test CPU usability blockers

2017-10-12 Thread John Ferlan
On 10/04/2017 10:58 AM, Jiri Denemark wrote: > Gather query-cpu-definitions results and use them for testing CPU model > usability blockers in CPUID to virCPUDef translation. > > Signed-off-by: Jiri Denemark > --- > src/qemu/qemu_capabilities.c| 2 +- > src/qemu/qemu_capspriv.h|

Re: [libvirt] [PATCH 14/23] cputest: Separate QEMUCaps creation from cpuTestCPUIDJson

2017-10-12 Thread John Ferlan
On 10/04/2017 10:58 AM, Jiri Denemark wrote: > To make the code reusable by other tests. > > Signed-off-by: Jiri Denemark > --- > tests/cputest.c | 97 > +++-- > 1 file changed, 60 insertions(+), 37 deletions(-) > > diff --git a/tests/cpute

Re: [libvirt] [PATCH 16/23] cputest: Use CPU models from QEMU when available

2017-10-12 Thread John Ferlan
On 10/04/2017 10:58 AM, Jiri Denemark wrote: > When testing cpuDecode for computing guest CPU definition from CPUID > data (the CPU definition reported by domain capabilities), we need to > use CPU models (and their usability blockers) from QEMU if they are > available to cpuDecode in the same wa

Re: [libvirt] [PATCH 15/23] build: Export virCPUModelIsAllowed private API

2017-10-12 Thread John Ferlan
On 10/04/2017 10:58 AM, Jiri Denemark wrote: > Signed-off-by: Jiri Denemark > --- > src/libvirt_private.syms | 1 + > 1 file changed, 1 insertion(+) > This should either be merged earlier when changing the function arguments or in reality in the "next" patch which actually uses it. Reviewed-

Re: [libvirt] [PATCH 8/9] util: storagefile: Add helpers to check presence of backing store

2017-10-12 Thread Eric Blake
On 10/12/2017 02:07 PM, Peter Krempa wrote: > Add a helper that will retrun true if a virStorageSource has backing s/retrun/return/ > store. This will also aid in refactoring of the code further down. > --- The commit message mentions adding only one helper, but doesn't name it. I like to menti

Re: [libvirt] [PATCH 9/9] Terminate backing chains explicitly

2017-10-12 Thread Eric Blake
On 10/12/2017 02:07 PM, Peter Krempa wrote: > Express a properly terminated backing chain by putting a > virStorageSource of type VIR_STORAGE_TYPE_NONE in the chain. The newly > used helpers simplify this greatly. > > The change fixes a bug as formatting an incomplete backing chain and > parsing i

Re: [libvirt] [PATCH 12/23] cputest: Print correct feature in virCPUUpdateLive test

2017-10-12 Thread John Ferlan
On 10/04/2017 10:58 AM, Jiri Denemark wrote: > If the actual result does not match our expectation, the tests would > not correctly show the difference if a CPU feature is disabled in the > expected result and the actual result does not mention it at all. The > test could complain about an unrela

Re: [libvirt] [PATCH 11/23] cputest: Avoid calling json_reformat in cpu-parse.sh

2017-10-12 Thread John Ferlan
On 10/04/2017 10:58 AM, Jiri Denemark wrote: > Various version of json_reformat use different number of spaces for > indenting. Let's use a simple python reformatter to gain full control > over the formatting for consistent results. > > Signed-off-by: Jiri Denemark > --- > tests/cputestdata/cp

Re: [libvirt] [PATCH 6/9] storage: Fill in 'type' field for virStorageSource in storage driver

2017-10-12 Thread Eric Blake
On 10/12/2017 02:07 PM, Peter Krempa wrote: > Storage driver uses virStorageSource only partially to store it's > configuration but fully when parsing backing files of storage volumes. > This patch sets the 'type' field to a value other than > VIR_STORAGE_TYPE_NONE so that further patches can add a

Re: [libvirt] [PATCH 10/23] cputest: Replace json bool with enum

2017-10-12 Thread John Ferlan
@title, consider: Replace bool with cpuTestCPUIDJson enum It's just the "json bool" that looks strange. On 10/04/2017 10:58 AM, Jiri Denemark wrote: > We will soon need to handle more than two values. > > Signed-off-by: Jiri Denemark > --- > tests/cputest.c | 79 > ++

Re: [libvirt] [PATCH 5/9] util: storagefile: Tolerate NULL path when looking up volume in chain

2017-10-12 Thread Eric Blake
On 10/12/2017 02:07 PM, Peter Krempa wrote: > chain->path may be NULL e.g. for NDB drives, so the check needs to avoid s/NDB/NBD/ ? > dereferencing the path in such case > --- > src/util/virstoragefile.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) Reviewed-by: Eric Blake > > diff

Re: [libvirt] [PATCH 7/9] test: set 'type' field of virStorageSource

2017-10-12 Thread Eric Blake
On 10/12/2017 02:07 PM, Peter Krempa wrote: > Set the type so that the iterators will work after upcoming > modification. > --- > tests/virstoragetest.c | 1 + > 1 file changed, 1 insertion(+) Could almost be squashed to the previous patch; but I'm also fine with it separate. Reviewed-by: Eric B

Re: [libvirt] [PATCH 3/9] util: storage: Store backing chain index in virStorageSource

2017-10-12 Thread Eric Blake
On 10/12/2017 02:07 PM, Peter Krempa wrote: > The backing store indexes were not bound to the storage sources in any > way. To allow us to bind a given alias to a given storage source we need > to save the index in virStorageSource. The backing store ids are now > generated when detecting the backi

Re: [libvirt] [PATCH 4/9] util: storage: use stored index to lookup disks

2017-10-12 Thread Eric Blake
On 10/12/2017 02:07 PM, Peter Krempa wrote: > We can now use the backing store ID directly rather than counting the > number of images seen while looking up images. > --- > src/util/virstoragefile.c | 18 +++--- > 1 file changed, 3 insertions(+), 15 deletions(-) > I guess if we've al

Re: [libvirt] [PATCH] virt-host-validate: require fuse for LXC if compiled in

2017-10-12 Thread Guido Günther
Hi, On Thu, Oct 12, 2017 at 05:25:34PM +0100, Daniel P. Berrange wrote: > On Thu, Oct 12, 2017 at 05:53:21PM +0200, Guido Günther wrote: > > Domains fail to start without fuse like > > > > error: internal error: guest failed to start: fuse: device not found, try > > 'modprobe fuse' first > >

Re: [libvirt] [PATCH 09/23] cpu_x86: Disable blockers from unusable CPU models

2017-10-12 Thread John Ferlan
On 10/04/2017 10:58 AM, Jiri Denemark wrote: > When decoding CPUID data to virCPUDef we need to be careful about using > a CPU model which cannot be directly used on the current host. Normally, > libvirt would notice the features which prevent the model from being > usable and it would disable th

Re: [libvirt] [PATCH 08/23] cpu_x86: Move x86FeatureFind* to avoid forward prototypes

2017-10-12 Thread John Ferlan
On 10/04/2017 10:58 AM, Jiri Denemark wrote: > Signed-off-by: Jiri Denemark > --- > src/cpu/cpu_x86.c | 61 > --- > 1 file changed, 31 insertions(+), 30 deletions(-) > Reviewed-by: John Ferlan John -- libvir-list mailing list libvir-lis

Re: [libvirt] [PATCH 07/23] cpu: Return model from virCPUModelIsAllowed

2017-10-12 Thread John Ferlan
On 10/04/2017 10:58 AM, Jiri Denemark wrote: > If a given CPU model is supported by the hypervisor, we want to know > more about it, e.g., what features may block its usage on the current > host and such details are stored in the virDomainCapsCPUModelsPtr list > which virCPUModelIsAllowed uses to

Re: [libvirt] [PATCH 1/9] conf: domain: Simplify return from backing store parser

2017-10-12 Thread Eric Blake
On 10/12/2017 02:07 PM, Peter Krempa wrote: > Use VIR_STEAL_PTR to remove conditional cleanup. > --- > src/conf/domain_conf.c | 5 ++--- > 1 file changed, 2 insertions(+), 3 deletions(-) Reviewed-by: Eric Blake > > diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c > index 54be9028d.

[libvirt] [PATCH v5 1/4] numa: describe siblings distances within cells

2017-10-12 Thread Wim Ten Have
From: Wim ten Have Add support for describing NUMA distances in a domain's XML description. Below is an example of a 4 node setup:

[libvirt] [PATCH v5 4/4] xlconfigtest: add tests for numa cell sibling distances

2017-10-12 Thread Wim Ten Have
From: Wim ten Have Test a bidirectional xen-xl domxml to and from native for numa support administration as brought under this patch series. Signed-off-by: Wim ten Have --- .../test-fullvirt-vnuma-autocomplete.cfg | 26 +++ .../test-fullvirt-vnuma-autocomplete.xml | 85

[libvirt] [PATCH v5 3/4] libxl: vnuma support

2017-10-12 Thread Wim Ten Have
From: Wim ten Have This patch generates a NUMA distance-aware libxl description from the information extracted from a NUMA distance-aware libvirt XML file. By default, if no NUMA node distance information is supplied in the libvirt XML file, this patch uses the distances 10 for local and 20 for

[libvirt] [PATCH v5 2/4] xenconfig: add domxml conversions for xen-xl

2017-10-12 Thread Wim Ten Have
From: Wim ten Have This patch converts NUMA configurations between the Xen libxl configuration file format and libvirt's XML format. XML HVM domain on a 4 node (2 cores/socket) configuration:

[libvirt] [PATCH v5 0/4] numa: describe sibling nodes distances

2017-10-12 Thread Wim Ten Have
From: Wim ten Have This patch extends guest domain administration adding support to advertise node sibling distances when configuring NUMA guests also referred to as vNUMA (Virtual NUMA). NUMA (Non-Uniform Memory Access), a method of configuring a cluster of nodes within a single multiprocessing

[libvirt] [PATCH 8/9] util: storagefile: Add helpers to check presence of backing store

2017-10-12 Thread Peter Krempa
Add a helper that will retrun true if a virStorageSource has backing store. This will also aid in refactoring of the code further down. --- src/conf/domain_conf.c| 2 +- src/conf/storage_conf.c | 5 +++-- src/libvirt_private.syms | 2 ++ src/qemu/qemu_

[libvirt] [PATCH 3/9] util: storage: Store backing chain index in virStorageSource

2017-10-12 Thread Peter Krempa
The backing store indexes were not bound to the storage sources in any way. To allow us to bind a given alias to a given storage source we need to save the index in virStorageSource. The backing store ids are now generated when detecting the backing chain. Since we don't re-detect the backing chai

[libvirt] [PATCH 9/9] Terminate backing chains explicitly

2017-10-12 Thread Peter Krempa
Express a properly terminated backing chain by putting a virStorageSource of type VIR_STORAGE_TYPE_NONE in the chain. The newly used helpers simplify this greatly. The change fixes a bug as formatting an incomplete backing chain and parsing it back would end up in expressing a terminated chain sin

[libvirt] [PATCH 1/3] qemu: command: Separate wrapping of disk backend props to 'file' object

2017-10-12 Thread Peter Krempa
The file object is needed when formatting the command line, but it makes nesting of the objects less easy for use with blockdev. Separate the wrapping into the 'file' object into a helper used specifically for disk sources in the old code path. --- src/qemu/qemu_block.c | 14 +++--- src/

[libvirt] [PATCH 7/9] test: set 'type' field of virStorageSource

2017-10-12 Thread Peter Krempa
Set the type so that the iterators will work after upcoming modification. --- tests/virstoragetest.c | 1 + 1 file changed, 1 insertion(+) diff --git a/tests/virstoragetest.c b/tests/virstoragetest.c index ffebd4dc1..ad4514871 100644 --- a/tests/virstoragetest.c +++ b/tests/virstoragetest.c @@ -5

Re: [libvirt] [PATCH 2/9] conf: Make backing store index optional

2017-10-12 Thread Eric Blake
On 10/12/2017 02:07 PM, Peter Krempa wrote: > Index will remain an internal property even if we allow backing store > parsing from the XML, so we need to allow backing store without it in > the schema. > --- > docs/schemas/domaincommon.rng | 2 ++ > 1 file changed, 2 insertions(+) > > diff --git

[libvirt] [PATCH 0/3] misc fixes and improvements for backing chain and block devices (blockdev-add saga)

2017-10-12 Thread Peter Krempa
See individual patches please. Peter Krempa (3): qemu: command: Separate wrapping of disk backend props to 'file' object qemu: block: Add support for file/block/dir storage to JSON disk src generator util: storagefile: Track whether a virStorageSource was auto-detected src/qemu/qem

[libvirt] [PATCH 3/3] util: storagefile: Track whether a virStorageSource was auto-detected

2017-10-12 Thread Peter Krempa
When formatting an inactive or migratable XML we will need to suppress backing chain members which were detected from the disk to keep semantics straight. This means we need to record, whether a virStorageSource originates from autodetection. --- src/util/virstoragefile.c | 3 +++ src/util/virstor

[libvirt] [PATCH 2/3] qemu: block: Add support for file/block/dir storage to JSON disk src generator

2017-10-12 Thread Peter Krempa
qemuBlockStorageSourceGetBackendProps now is able to format the JSON definition for regular storage too. --- src/qemu/qemu_block.c | 6 ++ 1 file changed, 6 insertions(+) diff --git a/src/qemu/qemu_block.c b/src/qemu/qemu_block.c index 4c0f675ca..75a8d6200 100644 --- a/src/qemu/qemu_block.c +

[libvirt] [PATCH 6/9] storage: Fill in 'type' field for virStorageSource in storage driver

2017-10-12 Thread Peter Krempa
Storage driver uses virStorageSource only partially to store it's configuration but fully when parsing backing files of storage volumes. This patch sets the 'type' field to a value other than VIR_STORAGE_TYPE_NONE so that further patches can add a terminator element to backing chains without breaki

[libvirt] [PATCH 5/9] util: storagefile: Tolerate NULL path when looking up volume in chain

2017-10-12 Thread Peter Krempa
chain->path may be NULL e.g. for NDB drives, so the check needs to avoid dereferencing the path in such case --- src/util/virstoragefile.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/util/virstoragefile.c b/src/util/virstoragefile.c index 9568a5068..818a679de 100644 ---

[libvirt] [PATCH 4/9] util: storage: use stored index to lookup disks

2017-10-12 Thread Peter Krempa
We can now use the backing store ID directly rather than counting the number of images seen while looking up images. --- src/util/virstoragefile.c | 18 +++--- 1 file changed, 3 insertions(+), 15 deletions(-) diff --git a/src/util/virstoragefile.c b/src/util/virstoragefile.c index 2b9

[libvirt] [PATCH 1/9] conf: domain: Simplify return from backing store parser

2017-10-12 Thread Peter Krempa
Use VIR_STEAL_PTR to remove conditional cleanup. --- src/conf/domain_conf.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c index 54be9028d..f7c9160b4 100644 --- a/src/conf/domain_conf.c +++ b/src/conf/domain_conf.c @@ -8315,

[libvirt] [PATCH 2/9] conf: Make backing store index optional

2017-10-12 Thread Peter Krempa
Index will remain an internal property even if we allow backing store parsing from the XML, so we need to allow backing store without it in the schema. --- docs/schemas/domaincommon.rng | 2 ++ 1 file changed, 2 insertions(+) diff --git a/docs/schemas/domaincommon.rng b/docs/schemas/domaincommon.

[libvirt] [PATCH 0/9] virStorageSource and backing chain refactors and fixes (blockdev-add saga)

2017-10-12 Thread Peter Krempa
This series fixes and improves storage of backing store indexes and of the completness of the backing chain in the XML. Peter Krempa (9): conf: domain: Simplify return from backing store parser conf: Make backing store index optional util: storage: Store backing chain index in virStorageSour

Re: [libvirt] [PATCH v4 2/5] numa: describe siblings distances within cells

2017-10-12 Thread Jim Fehlig
On 10/12/2017 04:37 AM, Wim ten Have wrote: On Fri, 6 Oct 2017 08:49:46 -0600 Jim Fehlig wrote: On 09/08/2017 08:47 AM, Wim Ten Have wrote: From: Wim ten Have Add libvirtd NUMA cell domain administration functionality to describe underlying cell id sibling distances in full fashion when con

Re: [libvirt] [PATCH] virt-host-validate: require fuse for LXC if compiled in

2017-10-12 Thread Daniel P. Berrange
On Thu, Oct 12, 2017 at 05:53:21PM +0200, Guido Günther wrote: > Domains fail to start without fuse like > > error: internal error: guest failed to start: fuse: device not found, try > 'modprobe fuse' first > Failure in libvirt_lxc startup: no error > > so check for it too. > > References:

[libvirt] [PATCH] virt-host-validate: require fuse for LXC if compiled in

2017-10-12 Thread Guido Günther
Domains fail to start without fuse like error: internal error: guest failed to start: fuse: device not found, try 'modprobe fuse' first Failure in libvirt_lxc startup: no error so check for it too. References: https://ci.debian.net/data/autopkgtest/unstable/amd64/libv/libvirt/20171012_1059

Re: [libvirt] [PATCH v3] qemu: add the print of page size in cmd domjobinfo

2017-10-12 Thread Jiri Denemark
On Mon, Oct 09, 2017 at 10:00:03 +0800, Chao Fan wrote: > The command "info migrate" of qemu outputs the dirty-pages-rate during > migration, but page size is different in different architectures. So > page size should be output to calculate dirty pages in bytes. > > Page size is already implement

Re: [libvirt] [PATCH] cpu_ppc64: Error out when model tag missing in virsh cpu-compare xml

2017-10-12 Thread Jiri Denemark
On Mon, Sep 18, 2017 at 22:27:52 +0530, Nitesh Konkar wrote: > libvirtd throws unhandled signal 11 on ppc while running > virsh cpu-compare with missing model tag in the xml. This > patch errors out in such situation. > > Signed-off-by: Nitesh Konkar > --- > src/cpu/cpu_ppc64.c | 6 ++ > 1 f

Re: [libvirt] [PATCH 1/2] secrets: Convert to use ObjectRWLockable

2017-10-12 Thread Erik Skultety
On Mon, Oct 09, 2017 at 02:57:38PM -0400, John Ferlan wrote: > Let's use the ObjectRWLockable for the various list lock mgmt. > Only time need Write lock will be for Add/Remove logic. > > Signed-off-by: John Ferlan > --- Reviewed-by: Erik Skultety -- libvir-list mailing list libvir-list@redhat.

Re: [libvirt] [PATCH 3/3] nodedev: Introduce virNodeDeviceObjListForEachCb

2017-10-12 Thread Erik Skultety
On Thu, Oct 12, 2017 at 03:46:25PM +0200, Erik Skultety wrote: > On Tue, Oct 10, 2017 at 09:54:28AM -0400, John Ferlan wrote: > > Rather than separate functions for NumOfDevices, GetNames, and > > ListExport - let's converge the code into one handler. > > > > Signed-off-by: John Ferlan > > --- > >

Re: [libvirt] [PATCH 2/2] secrets: Introduce virSecretObjListForEachCb

2017-10-12 Thread Erik Skultety
On Mon, Oct 09, 2017 at 02:57:39PM -0400, John Ferlan wrote: > Rather than separate functions for NumOfSecrets, GetUUIDs, and > ListExport - let's converge the code into one handler. > > Signed-off-by: John Ferlan > --- NACK to the idea, linking [1] to avoid repeating the comments. [1] https://w

[libvirt] [PATCH] qemu: Check QEMU error on failed migration

2017-10-12 Thread Jiri Denemark
When migration fails, QEMU may provide a description of the error in the reply to query-migrate QMP command. We can fetch this error and use it instead of the generic "unexpectedly failed" message. Signed-off-by: Jiri Denemark --- src/qemu/qemu_driver.c | 3 ++- src/qemu/qemu_migration.c

Re: [libvirt] [PATCH 3/3] nodedev: Introduce virNodeDeviceObjListForEachCb

2017-10-12 Thread Erik Skultety
On Tue, Oct 10, 2017 at 09:54:28AM -0400, John Ferlan wrote: > Rather than separate functions for NumOfDevices, GetNames, and > ListExport - let's converge the code into one handler. > > Signed-off-by: John Ferlan > --- NACK, for the very same reasons stated in [1], IOW we really should not make

Re: [libvirt] [PATCH 2/3] nodedev: Convert virNodeDeviceObjHasCap to bool

2017-10-12 Thread Erik Skultety
On Tue, Oct 10, 2017 at 09:54:27AM -0400, John Ferlan wrote: > It only returns 0 or 1 anyway, let's be realistic > > Signed-off-by: John Ferlan For patches 1-2: Reviewed-by: Erik Skultety -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list

Re: [libvirt] [PATCH 2/2] network: Introduce virNetworkObjListForEachCb

2017-10-12 Thread Erik Skultety
On Tue, Oct 10, 2017 at 04:20:06PM -0400, John Ferlan wrote: > Rather than separate callbacks for the NumOfNetworks, GetNames, and > Export functions, let's combine them all into one multi-purpose callback. > > Signed-off-by: John Ferlan > --- NACK to the idea of consolidating all of them into a

Re: [libvirt] Question about the host-model CPU mode

2017-10-12 Thread Jiri Denemark
On Mon, Oct 09, 2017 at 10:16:48 +0200, Marc Hartmayer wrote: > On Thu, Oct 05, 2017 at 02:11 PM +0200, Jiri Denemark > wrote: > > But it's going to be a bit complicated because we ask QEMU what the > > host CPU is and the interface we used would need to be enhanced to > > give us different resul

Re: [libvirt] [PATCH 03/23] qemu: Store CPU usability blockers in caps cache

2017-10-12 Thread John Ferlan
On 10/04/2017 10:58 AM, Jiri Denemark wrote: > Signed-off-by: Jiri Denemark > --- > src/qemu/qemu_capabilities.c | 51 > ++-- > 1 file changed, 49 insertions(+), 2 deletions(-) > > diff --git a/src/qemu/qemu_capabilities.c b/src/qemu/qemu_capabilities.c

Re: [libvirt] [PATCH 04/23] qemu: Parse unavailable features for CPU models

2017-10-12 Thread John Ferlan
On 10/04/2017 10:58 AM, Jiri Denemark wrote: > query-cpu-definitions QMP command returns a list of unavailable features > which prevent CPU models from being usable on the current host. So far > we only checked whether the list was empty to mark CPU models as > (un)usable. This patch parses all u

Re: [libvirt] [PATCH 06/23] cpu: Drop unused parameter from cpuDecode

2017-10-12 Thread John Ferlan
On 10/04/2017 10:58 AM, Jiri Denemark wrote: > The "preferred" parameter is not used by any caller of cpuDecode > anymore. It's only used internally in cpu_x86 to implement cpuBaseline. > > Signed-off-by: Jiri Denemark > --- > src/cpu/cpu.c | 15 --- > src/cpu/cpu.

Re: [libvirt] [PATCH 05/23] cpu: Use virDomainCapsCPUModelsPtr in cpu driver APIs

2017-10-12 Thread John Ferlan
On 10/04/2017 10:58 AM, Jiri Denemark wrote: > All APIs which expect a list of CPU models supported by hypervisors were > switched from char **models and int models to just accept a pointer to > virDomainCapsCPUModels object stored in domain capabilities. This avoids > the need to transform virDo

Re: [libvirt] [PATCH 02/23] conf: Add usability blockers to virDomainCapsCPUModel

2017-10-12 Thread John Ferlan
On 10/04/2017 10:58 AM, Jiri Denemark wrote: > When a hypervisor marks a CPU model as unusable on the current host, it > may also give us a list of features which prevent the model from being > usable. Storing this list in virDomainCapsCPUModel will help the CPU > driver with creating a host-mode

Re: [libvirt] [PATCH 01/23] util: Introduce virStringListCopy

2017-10-12 Thread John Ferlan
On 10/04/2017 10:58 AM, Jiri Denemark wrote: > The API makes a deep copy of a NULL-terminated string list. > > Signed-off-by: Jiri Denemark > --- > src/util/virstring.c | 37 + > src/util/virstring.h | 3 +++ > 2 files changed, 40 insertions(+) > > diff --

Re: [libvirt] [PATCH 2/4] conf: Introduce virCPUDefFindFeature

2017-10-12 Thread Marc Hartmayer
On Wed, Oct 11, 2017 at 12:11 PM +0200, Jiri Denemark wrote: > Signed-off-by: Jiri Denemark > --- > src/conf/cpu_conf.c | 40 +++- > src/conf/cpu_conf.h | 4 > src/libvirt_private.syms | 1 + > 3 files changed, 32 insertions(+), 13 deletions(

Re: [libvirt] [PATCH 1/2] network: Convert virNetworkObjList to use RWObjectLockable

2017-10-12 Thread Erik Skultety
On Tue, Oct 10, 2017 at 04:20:05PM -0400, John Ferlan wrote: > Let's use the RWObjectLockable for the various list lock mgmt. > Only time need Write lock will be for Add, Remove, and Prune logic. > > Signed-off-by: John Ferlan Reviewed-by: Erik Skultety -- libvir-list mailing list libvir-list@r

Re: [libvirt] [PATCH v4 2/5] numa: describe siblings distances within cells

2017-10-12 Thread Wim ten Have
On Fri, 6 Oct 2017 08:49:46 -0600 Jim Fehlig wrote: > On 09/08/2017 08:47 AM, Wim Ten Have wrote: > > From: Wim ten Have > > > > Add libvirtd NUMA cell domain administration functionality to > > describe underlying cell id sibling distances in full fashion > > when configuring HVM guests. >

Re: [libvirt] [PATCH 3/4] qemu: Filter CPU features when using host CPU

2017-10-12 Thread Marc Hartmayer
On Wed, Oct 11, 2017 at 12:11 PM +0200, Jiri Denemark wrote: > The host CPU definition from host capabilities may contain features > unknown to QEMU. Thus whenever we want to use this CPU definition, we > have to filter the unknown features. > > https://bugzilla.redhat.com/show_bug.cgi?id=1495171

Re: [libvirt] [PATCH 1/4] qemu: Separate CPU updating code from qemuProcessReconnect

2017-10-12 Thread Jiri Denemark
On Wed, Oct 11, 2017 at 19:42:36 +0200, Marc Hartmayer wrote: > On Wed, Oct 11, 2017 at 12:11 PM +0200, Jiri Denemark > wrote: > > The new function is called qemuProcessRefreshCPU. > > > > Signed-off-by: Jiri Denemark > > --- > > src/qemu/qemu_process.c | 66 > > +++

Re: [libvirt] [PATCH] util: Resolve resource leak

2017-10-12 Thread Erik Skultety
On Wed, Oct 11, 2017 at 05:03:05PM -0400, John Ferlan wrote: > Need to free @groups in the parent on success similar to other > APIs (virFile*) which use virGetGroupList and virFork. > > Reported by Coverity. > > Signed-off-by: John Ferlan > --- > src/util/vircommand.c | 1 + > 1 file changed, 1