Re: [libvirt] [PATCH v2 RESEND 08/12] conf: Allocate/release 'uid' and 'fid' in PCI address

2018-07-26 Thread Yi Min Zhao
在 2018/7/24 下午10:58, Andrea Bolognani 写道: @@ -1385,7 +1403,12 @@ qemuDomainCollectPCIAddress(virDomainDefPtr def ATTRIBUTE_UNUSED, * parent, and will have its address collected during the scan * of the parent's device type. */ -return 0; +if

Re: [libvirt] [PATCH 9/9] conf: Add memory bandwidth allocation capability of host

2018-07-26 Thread bing.niu
On 2018年07月27日 05:04, John Ferlan wrote: On 07/18/2018 03:57 AM, bing@intel.com wrote: From: Bing Niu Add new XML section to report host's memory bandwidth allocation capability. The format as below example: . granularity granularity

Re: [libvirt] [PATCH 8/9] conf: Introduce cputune/memorytune to support memory bandwidth allocation

2018-07-26 Thread bing.niu
On 2018年07月27日 04:36, John Ferlan wrote: subj: Add support for memorytune XML processing for resctrl MBA OK! On 07/18/2018 03:57 AM, bing@intel.com wrote: From: Bing Niu Introduce a new section memorytune to support memory bandwidth allocation. This is consistent with existing

Re: [libvirt] [PATCH 7/9] conf: Refactor virDomainCachetuneDefParse

2018-07-26 Thread bing.niu
On 2018年07月27日 01:48, John Ferlan wrote: On 07/18/2018 03:57 AM, bing@intel.com wrote: From: Bing Niu Refactoring virDomainCachetuneDefParse, extracting vcpus extracting, overlapping detecting and new resctrl allocation creating logic. Those two logic is common among different

Re: [libvirt] [PATCH v2 4/4] Documentation/vfio-mediated-device.txt: update for aggregation attribute

2018-07-26 Thread Alex Williamson
On Fri, 27 Jul 2018 10:16:58 +0800 Zhenyu Wang wrote: > On 2018.07.26 17:46:40 +0200, Cornelia Huck wrote: > > On Fri, 20 Jul 2018 10:19:28 +0800 > > Zhenyu Wang wrote: > > > > > Update mdev doc on new aggregration attribute and instances attribute > > > for mdev. > > > > > > Cc: Kirti

Re: [libvirt] [PATCH v2 4/4] Documentation/vfio-mediated-device.txt: update for aggregation attribute

2018-07-26 Thread Zhenyu Wang
On 2018.07.26 17:46:40 +0200, Cornelia Huck wrote: > On Fri, 20 Jul 2018 10:19:28 +0800 > Zhenyu Wang wrote: > > > Update mdev doc on new aggregration attribute and instances attribute > > for mdev. > > > > Cc: Kirti Wankhede > > Cc: Alex Williamson > > Cc: Kevin Tian > > Signed-off-by:

Re: [libvirt] [PATCH 6/9] conf: Rename cachetune to restune

2018-07-26 Thread bing.niu
On 2018年07月27日 00:32, John Ferlan wrote: On 07/18/2018 03:57 AM, bing@intel.com wrote: From: Bing Niu Resctrl not only supports cache tuning, but also memory bandwidth tuning. Renaming cachetune to restune(resource tuning) to reflect that. With restune, all allocation for different

Re: [libvirt] [PATCH v2 0/4] New mdev type handling for aggregated resources

2018-07-26 Thread Zhenyu Wang
On 2018.07.24 11:44:40 -0600, Alex Williamson wrote: > On Fri, 20 Jul 2018 10:19:24 +0800 > Zhenyu Wang wrote: > > > Current mdev device create interface depends on fixed mdev type, which get > > uuid > > from user to create instance of mdev device. If user wants to use customized > > number of

Re: [libvirt] [PATCH 1/8] snapshots: Avoid term 'checkpoint' for full system snapshot

2018-07-26 Thread Eric Blake
On 06/26/2018 08:27 PM, Eric Blake wrote: Lets try to see an example: T1 - user create new vm marked for incremental backup - system create base volume (S1) - system create new dirty bitmap (B1) Why do you need a dirty bitmap on a brand new system?  By definition, if the VM is brand new,

Re: [libvirt] [PATCH v2 1/1] conf: Add validation of input devices

2018-07-26 Thread John Ferlan
On 07/26/2018 03:27 AM, Han Han wrote: > https://bugzilla.redhat.com/show_bug.cgi?id=1591151 > > Add function virDomainInputDefValidate to validate input devices. > Make sure evdev attribute of source element is not used by mouse, > keyboard, and tablet input device. > > Signed-off-by: Han

[libvirt] [PATCH v2 40/41] util: lease: use VIR_AUTOFREE instead of VIR_FREE for scalar types

2018-07-26 Thread Sukrit Bhatnagar
By making use of GNU C's cleanup attribute handled by the VIR_AUTOFREE macro for declaring scalar variables, majority of the VIR_FREE calls can be dropped, which in turn leads to getting rid of most of our cleanup sections. Signed-off-by: Sukrit Bhatnagar Reviewed-by: Erik Skultety ---

[libvirt] [PATCH v2 32/41] util: hostdev: use VIR_AUTOFREE instead of VIR_FREE for scalar types

2018-07-26 Thread Sukrit Bhatnagar
By making use of GNU C's cleanup attribute handled by the VIR_AUTOFREE macro for declaring scalar variables, majority of the VIR_FREE calls can be dropped, which in turn leads to getting rid of most of our cleanup sections. Signed-off-by: Sukrit Bhatnagar Reviewed-by: Erik Skultety ---

[libvirt] [PATCH v2 41/41] util: lease: use VIR_AUTOPTR for aggregate types

2018-07-26 Thread Sukrit Bhatnagar
By making use of GNU C's cleanup attribute handled by the VIR_AUTOPTR macro for declaring aggregate pointer variables, majority of the calls to *Free functions can be dropped, which in turn leads to getting rid of most of our cleanup sections. Signed-off-by: Sukrit Bhatnagar Reviewed-by: Erik

[libvirt] [PATCH v2 22/41] util: usb: modify virUSBDeviceListAdd to take double pointer

2018-07-26 Thread Sukrit Bhatnagar
Modify virUSBDeviceListAdd to take a double pointer to virUSBDevicePtr as the second argument. This will enable usage of cleanup macros upon the virUSBDevicePtr item which is to be added to the list as it will be cleared by virInsertElementsN upon success. Signed-off-by: Sukrit Bhatnagar ---

[libvirt] [PATCH v2 36/41] util: iscsi: use VIR_AUTOFREE instead of VIR_FREE for scalar types

2018-07-26 Thread Sukrit Bhatnagar
By making use of GNU C's cleanup attribute handled by the VIR_AUTOFREE macro for declaring scalar variables, majority of the VIR_FREE calls can be dropped, which in turn leads to getting rid of most of our cleanup sections. Signed-off-by: Sukrit Bhatnagar Reviewed-by: Erik Skultety ---

[libvirt] [PATCH v2 39/41] util: kmod: use VIR_AUTOPTR for aggregate types

2018-07-26 Thread Sukrit Bhatnagar
By making use of GNU C's cleanup attribute handled by the VIR_AUTOPTR macro for declaring aggregate pointer variables, majority of the calls to *Free functions can be dropped, which in turn leads to getting rid of most of our cleanup sections. Signed-off-by: Sukrit Bhatnagar Reviewed-by: Erik

[libvirt] [PATCH v2 38/41] util: kmod: use VIR_AUTOFREE instead of VIR_FREE for scalar types

2018-07-26 Thread Sukrit Bhatnagar
By making use of GNU C's cleanup attribute handled by the VIR_AUTOFREE macro for declaring scalar variables, majority of the VIR_FREE calls can be dropped, which in turn leads to getting rid of most of our cleanup sections. Signed-off-by: Sukrit Bhatnagar Reviewed-by: Erik Skultety ---

[libvirt] [PATCH v2 16/41] util: firewall: use VIR_AUTOPTR for aggregate types

2018-07-26 Thread Sukrit Bhatnagar
By making use of GNU C's cleanup attribute handled by the VIR_AUTOPTR macro for declaring aggregate pointer variables, majority of the calls to *Free functions can be dropped, which in turn leads to getting rid of most of our cleanup sections. Signed-off-by: Sukrit Bhatnagar Reviewed-by: Erik

[libvirt] [PATCH v2 09/41] util: cgroup: use VIR_AUTOFREE instead of VIR_FREE for scalar types

2018-07-26 Thread Sukrit Bhatnagar
By making use of GNU C's cleanup attribute handled by the VIR_AUTOFREE macro for declaring scalar variables, majority of the VIR_FREE calls can be dropped, which in turn leads to getting rid of most of our cleanup sections. Signed-off-by: Sukrit Bhatnagar Reviewed-by: Erik Skultety ---

[libvirt] [PATCH v2 19/41] util: pci: define cleanup function using VIR_DEFINE_AUTOPTR_FUNC

2018-07-26 Thread Sukrit Bhatnagar
Using the new VIR_DEFINE_AUTOPTR_FUNC macro defined in src/util/viralloc.h, define a new wrapper around an existing cleanup function which will be called when a variable declared with VIR_AUTOPTR macro goes out of scope. Also, drop the redundant viralloc.h include, since that has moved from the

[libvirt] [PATCH v2 17/41] util: hook: use VIR_AUTOFREE instead of VIR_FREE for scalar types

2018-07-26 Thread Sukrit Bhatnagar
By making use of GNU C's cleanup attribute handled by the VIR_AUTOFREE macro for declaring scalar variables, majority of the VIR_FREE calls can be dropped, which in turn leads to getting rid of most of our cleanup sections. Signed-off-by: Sukrit Bhatnagar Reviewed-by: Erik Skultety ---

[libvirt] [PATCH v2 23/41] util: usb: define cleanup function using VIR_DEFINE_AUTOPTR_FUNC

2018-07-26 Thread Sukrit Bhatnagar
Using the new VIR_DEFINE_AUTOPTR_FUNC macro defined in src/util/viralloc.h, define a new wrapper around an existing cleanup function which will be called when a variable declared with VIR_AUTOPTR macro goes out of scope. Also, drop the redundant viralloc.h include, since that has moved from the

[libvirt] [PATCH v2 37/41] util: iscsi: use VIR_AUTOPTR for aggregate types

2018-07-26 Thread Sukrit Bhatnagar
By making use of GNU C's cleanup attribute handled by the VIR_AUTOPTR macro for declaring aggregate pointer variables, majority of the calls to *Free functions can be dropped, which in turn leads to getting rid of most of our cleanup sections. Signed-off-by: Sukrit Bhatnagar Reviewed-by: Erik

[libvirt] [PATCH v2 27/41] util: scsi: use VIR_AUTOFREE instead of VIR_FREE for scalar types

2018-07-26 Thread Sukrit Bhatnagar
By making use of GNU C's cleanup attribute handled by the VIR_AUTOFREE macro for declaring scalar variables, majority of the VIR_FREE calls can be dropped, which in turn leads to getting rid of most of our cleanup sections. Signed-off-by: Sukrit Bhatnagar Reviewed-by: Erik Skultety ---

[libvirt] [PATCH v2 34/41] util: hostmem: use VIR_AUTOFREE instead of VIR_FREE for scalar types

2018-07-26 Thread Sukrit Bhatnagar
By making use of GNU C's cleanup attribute handled by the VIR_AUTOFREE macro for declaring scalar variables, majority of the VIR_FREE calls can be dropped, which in turn leads to getting rid of most of our cleanup sections. Signed-off-by: Sukrit Bhatnagar Reviewed-by: Erik Skultety ---

[libvirt] [PATCH v2 35/41] util: iptables: use VIR_AUTOFREE instead of VIR_FREE for scalar types

2018-07-26 Thread Sukrit Bhatnagar
By making use of GNU C's cleanup attribute handled by the VIR_AUTOFREE macro for declaring scalar variables, majority of the VIR_FREE calls can be dropped, which in turn leads to getting rid of most of our cleanup sections. Signed-off-by: Sukrit Bhatnagar Reviewed-by: Erik Skultety ---

[libvirt] [PATCH v2 31/41] util: netdevvlan: define cleanup function using VIR_DEFINE_AUTOPTR_FUNC

2018-07-26 Thread Sukrit Bhatnagar
Using the new VIR_DEFINE_AUTOPTR_FUNC macro defined in src/util/viralloc.h, define a new wrapper around an existing cleanup function which will be called when a variable declared with VIR_AUTOPTR macro goes out of scope. Also, drop the redundant viralloc.h include, since that has moved from the

[libvirt] [PATCH v2 10/41] util: cgroup: use VIR_AUTOPTR for aggregate types

2018-07-26 Thread Sukrit Bhatnagar
By making use of GNU C's cleanup attribute handled by the VIR_AUTOPTR macro for declaring aggregate pointer variables, majority of the calls to *Free functions can be dropped, which in turn leads to getting rid of most of our cleanup sections. Signed-off-by: Sukrit Bhatnagar Reviewed-by: Erik

[libvirt] [PATCH v2 08/41] util: cgroup: define cleanup function using VIR_DEFINE_AUTOPTR_FUNC

2018-07-26 Thread Sukrit Bhatnagar
Using the new VIR_DEFINE_AUTOPTR_FUNC macro defined in src/util/viralloc.h, define a new wrapper around an existing cleanup function which will be called when a variable declared with VIR_AUTOPTR macro goes out of scope. Also, drop the redundant viralloc.h include, since that has moved from the

[libvirt] [PATCH v2 30/41] util: scsivhost: use VIR_AUTOPTR for aggregate types

2018-07-26 Thread Sukrit Bhatnagar
By making use of GNU C's cleanup attribute handled by the VIR_AUTOPTR macro for declaring aggregate pointer variables, majority of the calls to *Free functions can be dropped, which in turn leads to getting rid of most of our cleanup sections. Signed-off-by: Sukrit Bhatnagar Reviewed-by: Erik

[libvirt] [PATCH v2 26/41] util: scsi: define cleanup function using VIR_DEFINE_AUTOPTR_FUNC

2018-07-26 Thread Sukrit Bhatnagar
Using the new VIR_DEFINE_AUTOPTR_FUNC macro defined in src/util/viralloc.h, define a new wrapper around an existing cleanup function which will be called when a variable declared with VIR_AUTOPTR macro goes out of scope. Also, drop the redundant viralloc.h include, since that has moved from the

[libvirt] [PATCH v2 02/41] util: buffer: typedef for struct _virBufferEscapePair

2018-07-26 Thread Sukrit Bhatnagar
Create and use typedefs virBufferEscapePair and virBufferEscapePairPtr for struct _virBufferEscapePair for cleaner code and for use with cleanup macros. Signed-off-by: Sukrit Bhatnagar --- src/util/virbuffer.c | 8 +--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git

[libvirt] [PATCH v2 33/41] util: hostdev: use VIR_AUTOPTR for aggregate types

2018-07-26 Thread Sukrit Bhatnagar
By making use of GNU C's cleanup attribute handled by the VIR_AUTOPTR macro for declaring aggregate pointer variables, majority of the calls to *Free functions can be dropped, which in turn leads to getting rid of most of our cleanup sections. Signed-off-by: Sukrit Bhatnagar Reviewed-by: Erik

[libvirt] [PATCH v2 29/41] util: scsivhost: define cleanup function using VIR_DEFINE_AUTOPTR_FUNC

2018-07-26 Thread Sukrit Bhatnagar
Using the new VIR_DEFINE_AUTOPTR_FUNC macro defined in src/util/viralloc.h, define a new wrapper around an existing cleanup function which will be called when a variable declared with VIR_AUTOPTR macro goes out of scope. Also, drop the redundant viralloc.h include, since that has moved from the

[libvirt] [PATCH v2 18/41] util: hook: use VIR_AUTOPTR for aggregate types

2018-07-26 Thread Sukrit Bhatnagar
By making use of GNU C's cleanup attribute handled by the VIR_AUTOPTR macro for declaring aggregate pointer variables, majority of the calls to *Free functions can be dropped, which in turn leads to getting rid of most of our cleanup sections. Signed-off-by: Sukrit Bhatnagar Reviewed-by: Erik

[libvirt] [PATCH v2 24/41] util: usb: use VIR_AUTOFREE instead of VIR_FREE for scalar types

2018-07-26 Thread Sukrit Bhatnagar
By making use of GNU C's cleanup attribute handled by the VIR_AUTOFREE macro for declaring scalar variables, majority of the VIR_FREE calls can be dropped, which in turn leads to getting rid of most of our cleanup sections. Signed-off-by: Sukrit Bhatnagar Reviewed-by: Erik Skultety ---

[libvirt] [PATCH v2 11/41] util: mdev: define cleanup function using VIR_DEFINE_AUTOPTR_FUNC

2018-07-26 Thread Sukrit Bhatnagar
Using the new VIR_DEFINE_AUTOPTR_FUNC macro defined in src/util/viralloc.h, define a new wrapper around an existing cleanup function which will be called when a variable declared with VIR_AUTOPTR macro goes out of scope. Also, drop the redundant viralloc.h include, since that has moved from the

[libvirt] [PATCH v2 28/41] util: scsi: use VIR_AUTOPTR for aggregate types

2018-07-26 Thread Sukrit Bhatnagar
By making use of GNU C's cleanup attribute handled by the VIR_AUTOPTR macro for declaring aggregate pointer variables, majority of the calls to *Free functions can be dropped, which in turn leads to getting rid of most of our cleanup sections. Signed-off-by: Sukrit Bhatnagar Reviewed-by: Erik

[libvirt] [PATCH v2 21/41] util: pci: use VIR_AUTOPTR for aggregate types

2018-07-26 Thread Sukrit Bhatnagar
By making use of GNU C's cleanup attribute handled by the VIR_AUTOPTR macro for declaring aggregate pointer variables, majority of the calls to *Free functions can be dropped, which in turn leads to getting rid of most of our cleanup sections. Signed-off-by: Sukrit Bhatnagar ---

[libvirt] [PATCH v2 07/41] util: cgroup: modify virCgroupFree to take virCgroupPtr

2018-07-26 Thread Sukrit Bhatnagar
Modify virCgroupFree function signature to take a value of type virCgroupPtr instead of virCgroupPtr * as the parameter. Change the argument type in all calls to virCgroupFree function from virCgroupPtr * to virCgroupPtr. This is a step towards having consistent function signatures for Free

[libvirt] [PATCH v2 20/41] util: pci: use VIR_AUTOFREE instead of VIR_FREE for scalar types

2018-07-26 Thread Sukrit Bhatnagar
By making use of GNU C's cleanup attribute handled by the VIR_AUTOFREE macro for declaring scalar variables, majority of the VIR_FREE calls can be dropped, which in turn leads to getting rid of most of our cleanup sections. Signed-off-by: Sukrit Bhatnagar --- src/util/virpci.c | 269

[libvirt] [PATCH v2 25/41] util: usb: use VIR_AUTOPTR for aggregate types

2018-07-26 Thread Sukrit Bhatnagar
By making use of GNU C's cleanup attribute handled by the VIR_AUTOPTR macro for declaring aggregate pointer variables, majority of the calls to *Free functions can be dropped, which in turn leads to getting rid of most of our cleanup sections. Signed-off-by: Sukrit Bhatnagar ---

[libvirt] [PATCH v2 15/41] util: firewall: use VIR_AUTOFREE instead of VIR_FREE for scalar types

2018-07-26 Thread Sukrit Bhatnagar
By making use of GNU C's cleanup attribute handled by the VIR_AUTOFREE macro for declaring scalar variables, majority of the VIR_FREE calls can be dropped, which in turn leads to getting rid of most of our cleanup sections. Signed-off-by: Sukrit Bhatnagar --- src/util/virfirewall.c | 16

[libvirt] [PATCH v2 03/41] util: buffer: define cleanup function using VIR_DEFINE_AUTOPTR_FUNC

2018-07-26 Thread Sukrit Bhatnagar
Using the new VIR_DEFINE_AUTOPTR_FUNC macro defined in src/util/viralloc.h, define a new wrapper around an existing cleanup function which will be called when a variable declared with VIR_AUTOPTR macro goes out of scope. Also, drop the redundant viralloc.h include, since that has moved from the

[libvirt] [PATCH v2 01/41] util: error: define cleanup function using VIR_DEFINE_AUTOPTR_FUNC

2018-07-26 Thread Sukrit Bhatnagar
Using the new VIR_DEFINE_AUTOPTR_FUNC macro defined in src/util/viralloc.h, define a new wrapper around an existing cleanup function which will be called when a variable declared with VIR_AUTOPTR macro goes out of scope. Also, drop the redundant viralloc.h include, since that has moved from the

[libvirt] [PATCH v2 13/41] util: mdev: use VIR_AUTOPTR for aggregate types

2018-07-26 Thread Sukrit Bhatnagar
By making use of GNU C's cleanup attribute handled by the VIR_AUTOPTR macro for declaring aggregate pointer variables, majority of the calls to *Free functions can be dropped, which in turn leads to getting rid of most of our cleanup sections. Signed-off-by: Sukrit Bhatnagar Reviewed-by: Erik

[libvirt] [PATCH v2 14/41] util: firewall: define cleanup function using VIR_DEFINE_AUTOPTR_FUNC

2018-07-26 Thread Sukrit Bhatnagar
Using the new VIR_DEFINE_AUTOPTR_FUNC macro defined in src/util/viralloc.h, define a new wrapper around an existing cleanup function which will be called when a variable declared with VIR_AUTOPTR macro goes out of scope. Also, drop the redundant viralloc.h include, since that has moved from the

[libvirt] [PATCH v2 06/41] util: hash: define cleanup function using VIR_DEFINE_AUTOPTR_FUNC

2018-07-26 Thread Sukrit Bhatnagar
Using the new VIR_DEFINE_AUTOPTR_FUNC macro defined in src/util/viralloc.h, define a new wrapper around an existing cleanup function which will be called when a variable declared with VIR_AUTOPTR macro goes out of scope. Also, drop the redundant viralloc.h include, since that has moved from the

[libvirt] [PATCH v2 05/41] util: buffer: use VIR_AUTOPTR for aggregate types

2018-07-26 Thread Sukrit Bhatnagar
By making use of GNU C's cleanup attribute handled by the VIR_AUTOPTR macro for declaring aggregate pointer variables, majority of the calls to *Free functions can be dropped, which in turn leads to getting rid of most of our cleanup sections. Signed-off-by: Sukrit Bhatnagar ---

Re: [libvirt] [PATCH 9/9] conf: Add memory bandwidth allocation capability of host

2018-07-26 Thread John Ferlan
On 07/18/2018 03:57 AM, bing@intel.com wrote: > From: Bing Niu > > Add new XML section to report host's memory bandwidth allocation > capability. The format as below example: > > > . > > > > > > > > granularity granularity of memory bandwidth,

[libvirt] [PATCH v2 04/41] util: buffer: use VIR_AUTOFREE instead of VIR_FREE for scalar types

2018-07-26 Thread Sukrit Bhatnagar
By making use of GNU C's cleanup attribute handled by the VIR_AUTOFREE macro for declaring scalar variables, majority of the VIR_FREE calls can be dropped, which in turn leads to getting rid of most of our cleanup sections. Signed-off-by: Sukrit Bhatnagar Reviewed-by: Erik Skultety ---

[libvirt] [PATCH v2 12/41] util: mdev: use VIR_AUTOFREE instead of VIR_FREE for scalar types

2018-07-26 Thread Sukrit Bhatnagar
By making use of GNU C's cleanup attribute handled by the VIR_AUTOFREE macro for declaring scalar variables, majority of the VIR_FREE calls can be dropped, which in turn leads to getting rid of most of our cleanup sections. Signed-off-by: Sukrit Bhatnagar Reviewed-by: Erik Skultety ---

[libvirt] [PATCH v2 00/41] use GNU C's cleanup attribute in src/util (batch II)

2018-07-26 Thread Sukrit Bhatnagar
This second series of patches also modifies a few files in src/util to use VIR_AUTOFREE and VIR_AUTOPTR for automatic freeing of memory and get rid of some VIR_FREE macro invocations and *Free function calls. The argument type of virCgroupFree is changed from virCgroupPtr * to virCgroupPtr and

Re: [libvirt] [PATCH 8/9] conf: Introduce cputune/memorytune to support memory bandwidth allocation

2018-07-26 Thread John Ferlan
subj: Add support for memorytune XML processing for resctrl MBA On 07/18/2018 03:57 AM, bing@intel.com wrote: > From: Bing Niu > > Introduce a new section memorytune to support memory bandwidth allocation. > This is consistent with existing cachetune. As the example: > below: > >

[libvirt] [PATCH] audit: Share virtType fallback logic

2018-07-26 Thread Cole Robinson
Signed-off-by: Cole Robinson --- src/conf/domain_audit.c | 91 + 1 file changed, 28 insertions(+), 63 deletions(-) diff --git a/src/conf/domain_audit.c b/src/conf/domain_audit.c index d9be638f05..fc13338d64 100644 --- a/src/conf/domain_audit.c +++

[libvirt] [PATCH RFC 2/2] conf: Convert virDomainVirtType to VIR_ENUM_IMPL_LABEL

2018-07-26 Thread Cole Robinson
Signed-off-by: Cole Robinson --- src/conf/domain_conf.c | 10 ++ 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c index f94a90fbcc..eb40b7f349 100644 --- a/src/conf/domain_conf.c +++ b/src/conf/domain_conf.c @@ -103,7 +103,7 @@

[libvirt] [PATCH RFC 0/2] util: Add VIR_ENUM_IMPL_LABEL

2018-07-26 Thread Cole Robinson
This series adds VIR_ENUM_IMPL_LABEL and a demo conversion. VIR_ENUM_IMPL_LABEL allows passing in a string that briefly describes the value the enum represents, which we use to generate error messages for FromString and ToString function failures. This will allow us to drop a lot of code and

[libvirt] [PATCH RFC 1/2] util: Add VIR_ENUM_IMPL_LABEL

2018-07-26 Thread Cole Robinson
This allows passing in a string label describing the enum, which can be used to autogenerate error messages Signed-off-by: Cole Robinson --- src/util/virutil.c | 20 src/util/virutil.h | 15 ++- 2 files changed, 26 insertions(+), 9 deletions(-) diff --git

Re: [libvirt] [PATCH 7/9] conf: Refactor virDomainCachetuneDefParse

2018-07-26 Thread John Ferlan
On 07/18/2018 03:57 AM, bing@intel.com wrote: > From: Bing Niu > > Refactoring virDomainCachetuneDefParse, extracting vcpus extracting, > overlapping detecting and new resctrl allocation creating logic. > Those two logic is common among different resource allocation > technologies. > >

Re: [libvirt] [PATCH 6/9] conf: Rename cachetune to restune

2018-07-26 Thread Wang, Huaqiang
> -Original Message- > From: John Ferlan [mailto:jfer...@redhat.com] > Sent: Friday, July 27, 2018 12:33 AM > To: Niu, Bing ; libvir-list@redhat.com > Cc: Feng, Shaohe ; Wang, Huaqiang > ; Ding, Jian-feng ; > rui.z...@yandex.com > Subject: Re: [libvirt] [PATCH 6/9] conf: Rename

Re: [libvirt] [PATCH 6/9] conf: Rename cachetune to restune

2018-07-26 Thread Wang, Huaqiang
> -Original Message- > From: John Ferlan [mailto:jfer...@redhat.com] > Sent: Friday, July 27, 2018 12:33 AM > To: Niu, Bing ; libvir-list@redhat.com > Cc: Feng, Shaohe ; Wang, Huaqiang > ; Ding, Jian-feng ; > rui.z...@yandex.com > Subject: Re: [libvirt] [PATCH 6/9] conf: Rename

Re: [libvirt] [PATCH 6/9] conf: Rename cachetune to restune

2018-07-26 Thread John Ferlan
On 07/18/2018 03:57 AM, bing@intel.com wrote: > From: Bing Niu > > Resctrl not only supports cache tuning, but also memory bandwidth > tuning. Renaming cachetune to restune(resource tuning) to reflect > that. With restune, all allocation for different resources (cache, > memory bandwidth)

Re: [libvirt] [PATCH v2 0/4] New mdev type handling for aggregated resources

2018-07-26 Thread Cornelia Huck
On Thu, 26 Jul 2018 17:43:45 +0200 Erik Skultety wrote: > On Thu, Jul 26, 2018 at 05:30:07PM +0200, Cornelia Huck wrote: > > One thing I noticed is that we have seem to have an optional (?) > > vendor-driver created "aggregation" attribute (which always prints > > "true" in the Intel driver).

Re: [libvirt] [PATCH v2 0/4] New mdev type handling for aggregated resources

2018-07-26 Thread Erik Skultety
On Thu, Jul 26, 2018 at 08:29:45AM -0600, Alex Williamson wrote: > On Thu, 26 Jul 2018 15:50:28 +0200 > Erik Skultety wrote: > > > On Tue, Jul 24, 2018 at 11:44:40AM -0600, Alex Williamson wrote: > > > On Fri, 20 Jul 2018 10:19:24 +0800 > > > Zhenyu Wang wrote: > > > > > > > Current mdev device

Re: [libvirt] [PATCH v2 0/4] New mdev type handling for aggregated resources

2018-07-26 Thread Cornelia Huck
On Thu, 26 Jul 2018 09:51:26 -0600 Alex Williamson wrote: > On Thu, 26 Jul 2018 17:30:07 +0200 > Cornelia Huck wrote: > > > On Thu, 26 Jul 2018 15:50:28 +0200 > > Erik Skultety wrote: > > > Since libvirt doesn't have an API to create mdevs yet, this doesn't pose > > > an > > > issue for us

Re: [libvirt] [PATCH v2 0/4] New mdev type handling for aggregated resources

2018-07-26 Thread Alex Williamson
On Thu, 26 Jul 2018 17:30:07 +0200 Cornelia Huck wrote: > On Thu, 26 Jul 2018 15:50:28 +0200 > Erik Skultety wrote: > > > On Tue, Jul 24, 2018 at 11:44:40AM -0600, Alex Williamson wrote: > > > On Fri, 20 Jul 2018 10:19:24 +0800 > > > Zhenyu Wang wrote: > > > > > > > Current mdev device

Re: [libvirt] [PATCH v2 4/4] Documentation/vfio-mediated-device.txt: update for aggregation attribute

2018-07-26 Thread Cornelia Huck
On Fri, 20 Jul 2018 10:19:28 +0800 Zhenyu Wang wrote: > Update mdev doc on new aggregration attribute and instances attribute > for mdev. > > Cc: Kirti Wankhede > Cc: Alex Williamson > Cc: Kevin Tian > Signed-off-by: Zhenyu Wang > --- > Documentation/vfio-mediated-device.txt | 39

Re: [libvirt] [PATCH v2 0/4] New mdev type handling for aggregated resources

2018-07-26 Thread Erik Skultety
On Thu, Jul 26, 2018 at 05:30:07PM +0200, Cornelia Huck wrote: > On Thu, 26 Jul 2018 15:50:28 +0200 > Erik Skultety wrote: > > > On Tue, Jul 24, 2018 at 11:44:40AM -0600, Alex Williamson wrote: > > > On Fri, 20 Jul 2018 10:19:24 +0800 > > > Zhenyu Wang wrote: > > > > > > > Current mdev device

Re: [libvirt] [PATCH v2 1/4] vfio/mdev: Add new instances parameter for mdev create

2018-07-26 Thread Cornelia Huck
On Fri, 20 Jul 2018 10:19:25 +0800 Zhenyu Wang wrote: > For special mdev type which can aggregate instances for mdev device, > this extends mdev create interface by allowing extra "instances=xxx" > parameter, which is passed to mdev device model to be able to create > arbitrary bundled number of

[libvirt] [PATCH 2/3] lxc: Turn @veths into a string list in virLXCProcessStart

2018-07-26 Thread Michal Privoznik
This way it will be easier to use autofree. Signed-off-by: Michal Privoznik --- src/lxc/lxc_process.c | 24 +--- 1 file changed, 9 insertions(+), 15 deletions(-) diff --git a/src/lxc/lxc_process.c b/src/lxc/lxc_process.c index d021a890f7..3ac39d598c 100644 ---

[libvirt] [PATCH 3/3] lxc: Use VIR_AUTOPTR for @veths in virLXCProcessStart

2018-07-26 Thread Michal Privoznik
Now that we have VIR_AUTOPTR and that @veths is a string list we can use VIR_AUTOPTR to free it automagically. Signed-off-by: Michal Privoznik --- src/lxc/lxc_process.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/lxc/lxc_process.c b/src/lxc/lxc_process.c index

[libvirt] [PATCH 1/3] util: Rework virStringListAdd

2018-07-26 Thread Michal Privoznik
So every caller does the same: they use virStringListAdd() to add new item into the list and then free the old copy to replace it with new list. It's not very memory effective, nor environmental friendly. Signed-off-by: Michal Privoznik --- src/util/virmacmap.c | 8 ++--

[libvirt] [PATCH 0/3] lxc: Simplify virLXCProcessStart a tiny bit

2018-07-26 Thread Michal Privoznik
These are basically follow up patches as suggested by Erik in his review: https://www.redhat.com/archives/libvir-list/2018-July/msg01767.html Michal Prívozník (3): util: Rework virStringListAdd lxc: Turn @veths into a string list in virLXCProcessStart lxc: Use VIR_AUTOPTR for @veths in

Re: [libvirt] [PATCH] conf: fix virtType FromString check

2018-07-26 Thread Daniel P . Berrangé
On Thu, Jul 26, 2018 at 11:30:07AM -0400, Cole Robinson wrote: > In the domain definition, virtType is virDomainVirtType which is > unsigned, so comparing against -1 doesn't work. Cast to int first > > Fixes 8e2982b5767 > > Signed-off-by: Cole Robinson > --- > This regressed in the past as

Re: [libvirt] [PATCH v2 0/4] New mdev type handling for aggregated resources

2018-07-26 Thread Cornelia Huck
On Thu, 26 Jul 2018 15:50:28 +0200 Erik Skultety wrote: > On Tue, Jul 24, 2018 at 11:44:40AM -0600, Alex Williamson wrote: > > On Fri, 20 Jul 2018 10:19:24 +0800 > > Zhenyu Wang wrote: > > > > > Current mdev device create interface depends on fixed mdev type, which > > > get uuid > > > from

[libvirt] [PATCH] conf: fix virtType FromString check

2018-07-26 Thread Cole Robinson
In the domain definition, virtType is virDomainVirtType which is unsigned, so comparing against -1 doesn't work. Cast to int first Fixes 8e2982b5767 Signed-off-by: Cole Robinson --- This regressed in the past as well, when virtType was changed to virDomainVirtType in 7383b8cc068, fixed by the

[libvirt] [PATCH] conf: don't use virDomainVirtType in struct field

2018-07-26 Thread Daniel P . Berrangé
Use of enum types for struct fields is generally avoided since it causes warnings if the compiler assumes the enum is unsigned. For example commit 8e2982b5767a25e5da6533c65bfdc648c95b3c69 Author: Cole Robinson Date: Tue Jul 24 16:27:54 2018 -0400 conf: Clean up virDomainDefParseCaps

Re: [libvirt] [PATCH] qemu_monitor: Fix regression in getting disk capacity

2018-07-26 Thread Ján Tomko
On Thu, Jul 26, 2018 at 04:39:54PM +0200, Michal Privoznik wrote: In dbf990fd31e8 the qemuMonitorJSONBlockStatsUpdateCapacityOne() was split. However, due to a bug the return value was never set to something meaningful. Signed-off-by: Michal Privoznik --- src/qemu/qemu_monitor_json.c | 15

[libvirt] [PATCH] qemu_monitor: Fix regression in getting disk capacity

2018-07-26 Thread Michal Privoznik
In dbf990fd31e8 the qemuMonitorJSONBlockStatsUpdateCapacityOne() was split. However, due to a bug the return value was never set to something meaningful. Signed-off-by: Michal Privoznik --- src/qemu/qemu_monitor_json.c | 15 --- 1 file changed, 8 insertions(+), 7 deletions(-) diff

Re: [libvirt] [PATCH v2 0/4] New mdev type handling for aggregated resources

2018-07-26 Thread Alex Williamson
On Thu, 26 Jul 2018 15:50:28 +0200 Erik Skultety wrote: > On Tue, Jul 24, 2018 at 11:44:40AM -0600, Alex Williamson wrote: > > On Fri, 20 Jul 2018 10:19:24 +0800 > > Zhenyu Wang wrote: > > > > > Current mdev device create interface depends on fixed mdev type, which > > > get uuid > > > from

Re: [libvirt] [PATCH] conf: Fix typo in error msg of virDomainVideoDefValidate

2018-07-26 Thread Erik Skultety
On Thu, Jul 26, 2018 at 09:52:46PM +0800, Han Han wrote: > https://bugzilla.redhat.com/show_bug.cgi?id=1607825 > > Fix typo of error msg when 'none' type is not the only video device > defined in VM. > > Signed-off-by: Han Han > --- I tweaked the commit message and pushed. Thanks, Erik >

Re: [libvirt] [PATCH 3/7] tests: qemuhotplug: Fix segfault when XML loading fails

2018-07-26 Thread Cole Robinson
On 07/26/2018 02:44 AM, Michal Privoznik wrote: > On 07/24/2018 11:23 PM, Cole Robinson wrote: >> Some tests use the same VM state multiple times in a row. But if we >> failed loading the VM XML, subsequent tests crash on the NULL def >> pointer >> >> Signed-off-by: Cole Robinson >> --- >> I hit

Re: [libvirt] [dbus PATCH v2 2/2] Add syntax-check target in Makefile.am

2018-07-26 Thread Ján Tomko
On Thu, Jul 26, 2018 at 03:20:49PM +0200, Katerina Koukiou wrote: For now syntax checking is performed only on the python files using flake8. E501: (line too long) warning is ignored. Signed-off-by: Katerina Koukiou --- HACKING.md | 9 - Makefile.am | 6 ++ 2 files changed, 14

Re: [libvirt] [dbus PATCH v2 1/2] tests: fix all coding style issues to comply with flake8

2018-07-26 Thread Ján Tomko
On Thu, Jul 26, 2018 at 03:20:48PM +0200, Katerina Koukiou wrote: Signed-off-by: Katerina Koukiou --- tests/libvirttest.py| 9 + tests/test_connect.py | 2 +- tests/test_domain.py| 5 +++-- tests/test_interface.py | 12 +++- tests/test_network.py | 8

[libvirt] [PATCH] conf: Fix typo in error msg of virDomainVideoDefValidate

2018-07-26 Thread Han Han
https://bugzilla.redhat.com/show_bug.cgi?id=1607825 Fix typo of error msg when 'none' type is not the only video device defined in VM. Signed-off-by: Han Han --- src/conf/domain_conf.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/conf/domain_conf.c

Re: [libvirt] [PATCH v2 0/4] New mdev type handling for aggregated resources

2018-07-26 Thread Erik Skultety
On Tue, Jul 24, 2018 at 11:44:40AM -0600, Alex Williamson wrote: > On Fri, 20 Jul 2018 10:19:24 +0800 > Zhenyu Wang wrote: > > > Current mdev device create interface depends on fixed mdev type, which get > > uuid > > from user to create instance of mdev device. If user wants to use customized >

[libvirt] [PATCH] news: Usb and sata for virsh attach-disk --address

2018-07-26 Thread Han Han
Signed-off-by: Han Han --- docs/news.xml | 10 ++ 1 file changed, 10 insertions(+) diff --git a/docs/news.xml b/docs/news.xml index fc7924ad5f..a68ef2dc1c 100644 --- a/docs/news.xml +++ b/docs/news.xml @@ -76,6 +76,16 @@ using attach-disk or attach-interface commands.

Re: [libvirt] [PATCH 5/7] conf: Sync caps data even when SKIP_OSTYPE_CHECKS

2018-07-26 Thread Cole Robinson
On 07/26/2018 02:44 AM, Michal Privoznik wrote: > On 07/24/2018 11:23 PM, Cole Robinson wrote: >> We should still make an effort to fill in data, just not raise >> an error if say an ostype/virttype combo disappeared from caps. >> >> Signed-off-by: Cole Robinson >> --- >> src/conf/domain_conf.c

Re: [libvirt] [PATCH 5/9] util: Add MBA allocation to virresctrl

2018-07-26 Thread John Ferlan
On 07/26/2018 02:00 AM, bing.niu wrote: > > > On 2018年07月26日 06:37, John Ferlan wrote: >> >> >> On 07/18/2018 03:57 AM, bing@intel.com wrote: >>> From: Bing Niu >>> >>> Add memory bandwidth allocation support to virresctrl class. >>> Introducing virResctrlAllocMemBW which is used for

[libvirt] [dbus PATCH v2 2/2] Add syntax-check target in Makefile.am

2018-07-26 Thread Katerina Koukiou
For now syntax checking is performed only on the python files using flake8. E501: (line too long) warning is ignored. Signed-off-by: Katerina Koukiou --- HACKING.md | 9 - Makefile.am | 6 ++ 2 files changed, 14 insertions(+), 1 deletion(-) diff --git a/HACKING.md b/HACKING.md

[libvirt] [dbus PATCH v2 1/2] tests: fix all coding style issues to comply with flake8

2018-07-26 Thread Katerina Koukiou
Signed-off-by: Katerina Koukiou --- tests/libvirttest.py| 9 + tests/test_connect.py | 2 +- tests/test_domain.py| 5 +++-- tests/test_interface.py | 12 +++- tests/test_network.py | 8 tests/test_storage.py | 1 + 6 files changed, 21 insertions(+), 16

[libvirt] [dbus PATCH v2 0/2] Make correct use of setup fixtures & cleanup

2018-07-26 Thread Katerina Koukiou
diff from v1: * fixtures patch merged * fixed reminder flake8 issues * added patch introducing syntax-check target in the Makefile Katerina Koukiou (2): tests: fix all coding style issues to comply with flake8 Add syntax-check target in Makefile.am HACKING.md | 9 -

Re: [libvirt] [dbus PATCH 2/2] tests: fix all coding style issues to comply with pep8

2018-07-26 Thread Katerina Koukiou
On Thu, Jul 26, 2018 at 02:39:37PM +0200, Ján Tomko wrote: > On Thu, Jul 26, 2018 at 02:09:58PM +0200, Katerina Koukiou wrote: > > Is there nothing that could be said here in the commit message? > > Also, it might be a good time to introduce a 'syntax-check' target > to Makefile, to make sure

Re: [libvirt] [dbus PATCH 2/2] tests: fix all coding style issues to comply with pep8

2018-07-26 Thread Ján Tomko
On Thu, Jul 26, 2018 at 02:09:58PM +0200, Katerina Koukiou wrote: Is there nothing that could be said here in the commit message? Also, it might be a good time to introduce a 'syntax-check' target to Makefile, to make sure these won't get merged again. Signed-off-by: Katerina Koukiou ---

Re: [libvirt] [dbus PATCH 1/2] tests: {interface, node_device}_create should be used as setup fixtures

2018-07-26 Thread Ján Tomko
On Thu, Jul 26, 2018 at 02:09:57PM +0200, Katerina Koukiou wrote: * node_device_create was a fixture but we were calling it as normal function, thus it got triggered twice. * interface_create was not a fixture. This patch makes sure that the setup work these two functions are doing, will run

[libvirt] [dbus PATCH 2/2] tests: fix all coding style issues to comply with pep8

2018-07-26 Thread Katerina Koukiou
Signed-off-by: Katerina Koukiou --- tests/test_connect.py | 2 +- tests/test_domain.py| 5 +++-- tests/test_interface.py | 11 ++- tests/test_network.py | 8 tests/test_storage.py | 1 + 5 files changed, 15 insertions(+), 12 deletions(-) diff --git

[libvirt] [dbus PATCH 1/2] tests: {interface, node_device}_create should be used as setup fixtures

2018-07-26 Thread Katerina Koukiou
* node_device_create was a fixture but we were calling it as normal function, thus it got triggered twice. * interface_create was not a fixture. This patch makes sure that the setup work these two functions are doing, will run before the actual test call phase. Signed-off-by: Katerina Koukiou

[libvirt] [dbus PATCH 0/2] Make correct use of setup fixtures & cleanup

2018-07-26 Thread Katerina Koukiou
Katerina Koukiou (2): tests: {interface, node_device}_create should be used as setup fixtures tests: fix all coding style issues to comply with pep8 tests/libvirttest.py| 1 + tests/test_connect.py | 9 + tests/test_domain.py| 5 +++-- tests/test_interface.py | 23

Re: [libvirt] [PATCH v2 RESEND 00/12] PCI passthrough support on s390

2018-07-26 Thread Andrea Bolognani
On Thu, 2018-07-26 at 12:52 +0100, Daniel P. Berrangé wrote: > On Thu, Jul 26, 2018 at 01:47:52PM +0200, Andrea Bolognani wrote: > > On Thu, 2018-07-26 at 12:22 +0100, Daniel P. Berrangé wrote: > > > From the libvirt side we must avoid any scenario where QEMU auto-adds > > > devices behind our

Re: [libvirt] [PATCH v2 RESEND 00/12] PCI passthrough support on s390

2018-07-26 Thread Daniel P . Berrangé
On Thu, Jul 26, 2018 at 01:47:52PM +0200, Andrea Bolognani wrote: > On Thu, 2018-07-26 at 12:22 +0100, Daniel P. Berrangé wrote: > > On Thu, Jul 26, 2018 at 07:17:03PM +0800, Yi Min Zhao wrote: > > > 在 2018/7/26 下午7:00, Andrea Bolognani 写道: > > > > From the test cases I see a zpci devices, with

  1   2   >