[libvirt] [PATCH] cpu: Add new EPYC CPU model

2017-08-23 Thread Brijesh Singh
Add a new CPU model called 'EPYC' to model processors from AMD EPYC family (which includes EPYC 76xx,75xx,74xx, 73xx and 72xx). The following features bits have been added/removed compare to Opteron_G5 Added: monitor, movbe, rdrand, mmxext, ffxsr, rdtscp, cr8legacy, osvw, fsgsbase, bmi1,

[libvirt] Why not support additional machine args in XML such as max-ram-below-4g?

2017-08-23 Thread Wuzongyong (Euler Dept)
Since qemu support the arg -machine like that: -machine [type=]name[,prop[=value][,...]] So I'm inquisitive about why libvirt doesn't support specify the prop in xml ? So I can specify the qemu machine args like -max-raw-below-4g in xml, well, I mean not by specifying the -qemu-command-line in

[libvirt] [PATCH v5 12/15] test: Clean up test driver Interface interactions

2017-08-23 Thread John Ferlan
Now that we have self locking hash table for Interface object lookups, there's no need to take the test driver lock in order to "lock" between the various API's, so remove the Lock/Unlock logic accordingly. Add a virInterfaceObjListFree during testDriverFree for the backupIfaces "just in case".

[libvirt] [PATCH v5 14/15] network: Fix virNetworkObjBridgeInUse return type

2017-08-23 Thread John Ferlan
Rather than an int, it returns a bool - so let's define it that way Signed-off-by: John Ferlan --- src/conf/virnetworkobj.c | 2 +- src/conf/virnetworkobj.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/conf/virnetworkobj.c

[libvirt] [PATCH v5 11/15] interface: Use virObjectLookupHash

2017-08-23 Thread John Ferlan
Use the virObjectLookupHash in _virInterfaceObjList. Convert the code to use the LookupHash object and APIs rather than the local forward linked list processing. Usage of HashLookup{Find|Search} API's is via a callback mechanism and returns a locked/reffed object. The Clone API will make use of

[libvirt] [PATCH v5 15/15] network: Use virObjectLookupHash

2017-08-23 Thread John Ferlan
Use the virObjectLookupHash in _virNetworkObjList. Convert the code to use the LookupHash object and APIs rather than the local code and usage of virHash* calls. Since the _virNetworkObjList only contains the @parent object the virClassNew must be removed from OnceInit because instantiation would

[libvirt] [PATCH v5 13/15] util: Introduce virObjectLookupHashPrune

2017-08-23 Thread John Ferlan
A convenience API that will utilize the virHashForEach API for the LookupHash in order to remove elements from the hash table(s) that match some requirement from the callback. NB: Once elements are removed from objsUUID - if something goes wrong in objsName, the best that can be done is to issue

[libvirt] [PATCH v5 07/15] nodedev: Use virObjectLookupHash

2017-08-23 Thread John Ferlan
Use the virObjectLookupHash in _virNodeDeviceObjList. Convert the code to use the LookupHash object and APIs rather than code within this module that uses virHash* calls. Since the _virNodeDeviceObjList only now contains the @parent object, the virClassNew must be removed from OnceInit because

[libvirt] [PATCH v5 06/15] util: Introduce virObjectLookupHashSearch{UUID|Name}[Locked]

2017-08-23 Thread John Ferlan
Add common object API wrappers to use the virHashSearch API to search the LookupHash for specific data defined in the @opaque parameter. Once data is found, the search would end and the object that is represented is returned locked with it's reference 's reference count incremented. The

[libvirt] [PATCH v5 09/15] util: Introduce virObjectLookupHashClone

2017-08-23 Thread John Ferlan
A convenience API that will utilize the virHashForEach API for the LookupHash in order to create a clone/copy. Primary consumer is the interface driver which has a desire to save off a copy of its only hash table in order to possible restore it if something goes wrong during processing.

[libvirt] [PATCH v5 08/15] secret: Use virObjectLookupHash

2017-08-23 Thread John Ferlan
Use the virObjectLookupHash in _virSecretObjList. Convert the code to use the LookupHash object and APIs rather than local code and usage of the virHash* calls. Since the _virSecretObjList only now contains the @parent object, the virClassNew must be removed from OnceInit because instantiation

[libvirt] [PATCH v5 10/15] Revert "interface: Consume @def in virInterfaceObjNew"

2017-08-23 Thread John Ferlan
This reverts commit 92840eb3a7e47cdf761e52afccc41d2a35327fbd. More recent reviews/changes don't have the vir*ObjNew APIs consuming the @def, so remove from Interface as well. Changes needed to also deal with conflicts from commit id '46f5eca4'. Signed-off-by: John Ferlan ---

[libvirt] [PATCH v5 03/15] util: Introduce virObjectLookupHash{Add|Remove}

2017-08-23 Thread John Ferlan
Add a pair of API's to add/remove an object (virObjectLockable) to/from the LookupHash object. The caller must check return status and handle failure properly for the Add. The Remove API callers are all void functions, so only report the problem and ignore the attempt to remove if for some reason

[libvirt] [PATCH v5 01/15] util: Use VIR_ERROR instead of VIR_WARN

2017-08-23 Thread John Ferlan
Rather than use VIR_WARN, let's be a bit more forceful and direct using VIR_ERROR so that the "average consumer" may actually be more concerned that something is wrong even though we still continue to operate. Signed-off-by: John Ferlan --- src/util/virobject.c | 12

[libvirt] [PATCH v5 00/15] virObject adjustments for common object

2017-08-23 Thread John Ferlan
v4: https://www.redhat.com/archives/libvir-list/2017-August/msg00537.html Changes since v4... I've removed the virObjectLookupKeys completely relying on LookupHash completely. The adjusted LookupHash object uses named "objsUUID" and "objsName" as well as API's to specifically Search or ForEach

[libvirt] [PATCH v5 04/15] util: Introduce virObjectLookupHashFind[Locked]

2017-08-23 Thread John Ferlan
These API's will use the virHashLookup in order to find the object in the lookup hash object by the specified @key. If two hash tables exist in the hash table object, then both will be searched for the key. Both API's will call an virObjectLookupHashFindInternal in order in handle the fetch. The

[libvirt] [PATCH v5 05/15] util: Introduce virObjectLookupHashForEach{UUID|Name}

2017-08-23 Thread John Ferlan
Introduce an API to use the virHashForEach API to go through each element of the LookupHash calling a callback for each object entry from the LookupHash in order for it to be processed. Create a common structure _virObjectLookupHashForEachData to define the various pieces of data needed by the

[libvirt] [PATCH v5 02/15] util: Introduce virObjectLookupHash

2017-08-23 Thread John Ferlan
Define an object meant to combine/manage the aspects of the various _vir*ObjList structs into one common purpose list management system that will store and manage _vir*Obj virObjectLockable objects rather than having multiple structs and API's to do that. The object will use the

Re: [libvirt] [PATCH 0/2] conf: check address type for USB hostdevs

2017-08-23 Thread John Ferlan
On 08/23/2017 10:39 AM, Ján Tomko wrote: > *** BRB HERE *** > > Ján Tomko (2): > conf: move hostdev address validation to virDomainHostdevDefValidate > conf: check address type for USB hostdevs > > src/conf/domain_conf.c | 83 > ++ > 1 file

Re: [libvirt] [PATCH 1/3] conf: Properly truncate wide character names in virDomainObjGetShortName

2017-08-23 Thread John Ferlan
On 08/23/2017 07:47 AM, Martin Kletzander wrote: > We always truncated the name at 20 bytes instead of characters. In > case 20 bytes were in the middle of a multi-byte character, then the > string became invalid and various parts of the code would error > out (e.g. XML parsing of that string).

Re: [libvirt] [PATCH] vmx: do not treat controllers as implicit devices

2017-08-23 Thread John Ferlan
On 08/21/2017 11:41 AM, Ján Tomko wrote: > When parsing the config, we look for the SCSI controllers one by one, > remembering their models, then let virDomainDefAddImplicitDevices > add them if any SCSI disk is using them. > > Since these controllers are not really implicit (they are present >

Re: [libvirt] [PATCHv2] nodedev: add switchdev to NIC capabilities

2017-08-23 Thread John Ferlan
On 08/21/2017 05:19 AM, Edan David wrote: > Adding functionality to libvirt that will allow querying the interface > for the availability of switchdev Offloading NIC capabilities. > The switchdev mode was introduced in kernel 4.8, the iproute2-devlink > command to retrieve the swtichdev NIC

Re: [libvirt] [PATCH] tests: Fix leak in securityselinuxtest

2017-08-23 Thread Ján Tomko
On Wed, Aug 23, 2017 at 12:35:54PM -0400, John Ferlan wrote: If we jump to the error: label and @secbuf is allocated, then it's not free'd at all. Found by Coverity Signed-off-by: John Ferlan --- tests/securityselinuxtest.c | 3 ++- 1 file changed, 2 insertions(+), 1

Re: [libvirt] [PATCH 0/4] Make it easier to clean up after using virBuffer

2017-08-23 Thread John Ferlan
On 08/21/2017 03:47 AM, Martin Kletzander wrote: > There are many places in the code where virBufferCheckError() is used > and then, right after that, virBufferContentAndReset() is called. The > former has ATTRIBUTE_RETURN_CHECK, so every occurrence just checks > that. However, if the return

[libvirt] [PATCH] tests: Fix leak in securityselinuxtest

2017-08-23 Thread John Ferlan
If we jump to the error: label and @secbuf is allocated, then it's not free'd at all. Found by Coverity Signed-off-by: John Ferlan --- tests/securityselinuxtest.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tests/securityselinuxtest.c

[libvirt] [PATCH 2/2] conf: check address type for USB hostdevs

2017-08-23 Thread Ján Tomko
https://bugzilla.redhat.com/show_bug.cgi?id=1225339 --- src/conf/domain_conf.c | 7 +++ 1 file changed, 7 insertions(+) diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c index 33470ffcb..478feb92d 100644 --- a/src/conf/domain_conf.c +++ b/src/conf/domain_conf.c @@ -5287,6 +5287,13

[libvirt] [PATCH 0/2] conf: check address type for USB hostdevs

2017-08-23 Thread Ján Tomko
*** BRB HERE *** Ján Tomko (2): conf: move hostdev address validation to virDomainHostdevDefValidate conf: check address type for USB hostdevs src/conf/domain_conf.c | 83 ++ 1 file changed, 56 insertions(+), 27 deletions(-) -- 2.13.0 --

[libvirt] [PATCH 1/2] conf: move hostdev address validation to virDomainHostdevDefValidate

2017-08-23 Thread Ján Tomko
For selected hostdev types, we validate that the address type matches the subsystem type when parsing the XML. Move it to the validation phase, to allow extending the checks to other subsystem types without making existing domains disappear. --- src/conf/domain_conf.c | 76

Re: [libvirt] [PATCH 1/2] qemu: Don't mangle the storage format for type='dir'

2017-08-23 Thread John Ferlan
On 08/18/2017 11:36 AM, Martin Kletzander wrote: > Partially-resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1443434 > How so? Seeing as backing chains weren't mentioned in the bz. If I remove the changes from this patch, the new XML tests still pass (at least for me), so I'm curious at

Re: [libvirt] [PATCH 2/2] qemu: Also treat directories properly when using namespaces

2017-08-23 Thread John Ferlan
On 08/18/2017 11:36 AM, Martin Kletzander wrote: > Partially-resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1443434 > Similar to 1/2 - it's really not clear what this patch has to do with the referenced bz... Perhaps a few words on the relationship would make things clearer. >

Re: [libvirt] [PATCH v2] virt-host-validate: Fix warning for IOMMU detection on PPC

2017-08-23 Thread John Ferlan
On 08/17/2017 09:48 AM, Nitesh Konkar wrote: > Fix the warning generated on PPC by virt-host-validate > for IOMMU > > Signed-off-by: Nitesh Konkar > --- > tools/virt-host-validate-common.c | 10 +++--- > 1 file changed, 7 insertions(+), 3 deletions(-) > >

Re: [libvirt] [PATCH v2] vz: support disabled items in vz boot order

2017-08-23 Thread John Ferlan
On 08/23/2017 03:52 AM, Nikolay Shirokovskiy wrote: > > > On 03.08.2017 15:18, John Ferlan wrote: >> >> >> On 06/30/2017 02:34 AM, Nikolay Shirokovskiy wrote: >>> At the time the check was written virtuozzo did not use disabled items in >>> boot >>> order configuration. Boot items were always

Re: [libvirt] [PATCH 0/3] Add support for virtio-vga/gpu's max_outputs= parameter

2017-08-23 Thread Pavel Hrdina
On Wed, Aug 23, 2017 at 02:14:08PM +0200, Martin Kletzander wrote: > The subject of this cover letter goes very nicely together with the > subjects of the subsequent messages. I hope my literature teachers > are proud of me. > > > Martin Kletzander (3): > qemu: Add capabilities for

[libvirt] [PATCH 3/3] docs: Update news with virtio-vga/gpu's max_outputs= parameter

2017-08-23 Thread Martin Kletzander
Signed-off-by: Martin Kletzander --- docs/news.xml | 5 + 1 file changed, 5 insertions(+) diff --git a/docs/news.xml b/docs/news.xml index 26bd9bd6f651..c465fb57bb4d 100644 --- a/docs/news.xml +++ b/docs/news.xml @@ -45,6 +45,11 @@ Please refer to the bhyve

[libvirt] [PATCH 2/3] qemu: Add support for virtio-vga/gpu's max_outputs= parameter

2017-08-23 Thread Martin Kletzander
Signed-off-by: Martin Kletzander --- src/qemu/qemu_command.c | 5 + tests/qemuxml2argvdata/qemuxml2argv-video-virtio-vga.args | 2 +- tests/qemuxml2argvtest.c | 3 ++- 3 files changed, 8 insertions(+), 2

[libvirt] [PATCH 0/3] Add support for virtio-vga/gpu's max_outputs= parameter

2017-08-23 Thread Martin Kletzander
The subject of this cover letter goes very nicely together with the subjects of the subsequent messages. I hope my literature teachers are proud of me. Martin Kletzander (3): qemu: Add capabilities for virtio-vga/gpu's max_outputs= parameter qemu: Add support for virtio-vga/gpu's

[libvirt] [PATCH 1/3] qemu: Add capabilities for virtio-vga/gpu's max_outputs= parameter

2017-08-23 Thread Martin Kletzander
Signed-off-by: Martin Kletzander --- src/qemu/qemu_capabilities.c| 2 ++ src/qemu/qemu_capabilities.h| 1 + tests/qemucapabilitiesdata/caps_2.4.0.x86_64.xml| 1 + tests/qemucapabilitiesdata/caps_2.5.0.x86_64.xml

[libvirt] [PATCH] docs: Define anchors correctly in pci-hotplug

2017-08-23 Thread Andrea Bolognani
HTML5 obsoletes the 'name' attribute in favor of 'id', and our TOC generator apparently follows the recommendation to the letter, resulting in a broken TOC if you use the old-school attribute. Signed-off-by: Andrea Bolognani --- Pushed as trivial. docs/pci-hotplug.html.in

[libvirt] [PATCH 3/3] docs: Update news with domain name bug fixes

2017-08-23 Thread Martin Kletzander
Signed-off-by: Martin Kletzander --- docs/news.xml | 20 1 file changed, 20 insertions(+) diff --git a/docs/news.xml b/docs/news.xml index 26bd9bd6f651..2bcd27548bf3 100644 --- a/docs/news.xml +++ b/docs/news.xml @@ -49,6 +49,26 @@ +

[libvirt] [PATCH 0/2] Some domain name handing improvements

2017-08-23 Thread Martin Kletzander
It's not like anyone would hit any of those limitations, almost... Martin Kletzander (3): conf: Properly truncate wide character names in virDomainObjGetShortName qemu: Use short domain name in qemuDomainGetPreservedMountPath docs: Update news with domain name bug fixes docs/news.xml

[libvirt] [PATCH 2/3] qemu: Use short domain name in qemuDomainGetPreservedMountPath

2017-08-23 Thread Martin Kletzander
Otherwise longer domain names might generate paths that are too long to be created. This follows what other parts of the code do as well. Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1453194 Signed-off-by: Martin Kletzander --- src/qemu/qemu_domain.c | 10

[libvirt] [PATCH 1/3] conf: Properly truncate wide character names in virDomainObjGetShortName

2017-08-23 Thread Martin Kletzander
We always truncated the name at 20 bytes instead of characters. In case 20 bytes were in the middle of a multi-byte character, then the string became invalid and various parts of the code would error out (e.g. XML parsing of that string). Let's instead properly truncate it after 20 characters

Re: [libvirt] [PATCH v2] vz: support disabled items in vz boot order

2017-08-23 Thread Nikolay Shirokovskiy
On 03.08.2017 15:18, John Ferlan wrote: > > > On 06/30/2017 02:34 AM, Nikolay Shirokovskiy wrote: >> At the time the check was written virtuozzo did not use disabled items in >> boot >> order configuration. Boot items were always enabled. Now they can be disabled >> as well. Supporting such

Re: [libvirt] [PATCH v2] qemu: command: align disk serial check to schema

2017-08-23 Thread Nikolay Shirokovskiy
On 03.08.2017 02:24, John Ferlan wrote: > > > On 03/28/2017 04:10 AM, Nikolay Shirokovskiy wrote: >> Disk serial schema has extra '.+' allowed characters in comparison >> with check in code. Looks like there is no reason for that as qemu >> allows any character AFAIK for serial. This