[libvirt] [PATCH] conf: Don't parse edev of non-passthrough input device

2018-07-10 Thread Han Han
In input devices, edev attribute is only for passthrough devices. Don't parse this for other input devices. Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1591151 Signed-off-by: Han Han --- src/conf/domain_conf.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git

[libvirt] [PATCH 1/2] util: Refactor virFileIsCDROM to virFileCheckCDROM

2018-07-10 Thread Han Han
Add enum type of cdrom statuses. Add argument cd_status in virFileCheckCDROM to store cdrom status. Now virFileCheckCDROM could be used to check the cdrom drive status such as no info, no disc, trey open, drive not ready or ok. Signed-off-by: Han Han --- src/libvirt_private.syms | 2 +-

[libvirt] [PATCH v2 0/2] Change virFileIsCDROM to check cdrom status

2018-07-10 Thread Han Han
v1 link: https://www.redhat.com/archives/libvir-list/2018-July/msg00103.html Refactor virFileIsCDROM to virFileCheckCDROM and now it could be used to store cdrom status. In libvirt, it gives general Input/Output error when reading a not ready cdrom backend vol. This error should be replaced with

[libvirt] [PATCH 2/2] storage: Improve error handling on cdrom backend

2018-07-10 Thread Han Han
Implement virFileCheckCDROM in virStorageBackendVolOpen to check if cdrom backend is ready. Skip the error of cdrom not ready. Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1596096 Signed-off-by: Han Han --- src/storage/storage_util.c | 15 ++- 1 file changed, 14

Re: [libvirt] [PATCH 0/2] Change virFileIsCDROM to check cdrom status

2018-07-10 Thread Han Han
Sorry I forget to add the former patch link. Please ignore these mails. On Wed, Jul 11, 2018 at 10:52 AM, Han Han wrote: > Refactor virFileIsCDROM to virFileCheckCDROM and now it could be used to > store cdrom status. > > In libvirt, it gives general Input/Output error when reading a not ready

[libvirt] [PATCH 2/2] storage: Improve error handling on cdrom backend

2018-07-10 Thread Han Han
Implement virFileCheckCDROM in virStorageBackendVolOpen to check if cdrom backend is ready. Skip the error of cdrom not ready. Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1596096 Signed-off-by: Han Han --- src/storage/storage_util.c | 15 ++- 1 file changed, 14

[libvirt] [PATCH 1/2] util: Refactor virFileIsCDROM to virFileCheckCDROM

2018-07-10 Thread Han Han
Add enum type of cdrom statuses. Add argument cd_status in virFileCheckCDROM to store cdrom status. Now virFileCheckCDROM could be used to check the cdrom drive status such as no info, no disc, trey open, drive not ready or ok. Signed-off-by: Han Han --- src/libvirt_private.syms | 2 +-

[libvirt] [PATCH 0/2] Change virFileIsCDROM to check cdrom status

2018-07-10 Thread Han Han
Refactor virFileIsCDROM to virFileCheckCDROM and now it could be used to store cdrom status. In libvirt, it gives general Input/Output error when reading a not ready cdrom backend vol. This error should be replaced with warning just like the warning of lacking backing file. Han Han (2): util:

Re: [libvirt] [PATCH] storage: prefer using newDef to save configfile

2018-07-10 Thread Shichangkuo
> -Original Message- > From: Michal Privoznik [mailto:mpriv...@redhat.com] > Sent: Tuesday, July 10, 2018 9:27 PM > To: shichangkuo (Cloud); 'libvir-list@redhat.com'; 'jfer...@redhat.com' > Subject: Re: [libvirt] [PATCH] storage: prefer using newDef to save configfile > > On 07/10/2018

[libvirt] [PATCH v3 2/5] libvirt.c: Return error when remoteOnly is set but server is empty

2018-07-10 Thread Marcos Paulo de Souza
Some drivers require a server in order to work, so this flag removes the burden of esach driver to check for an server by doing it in virConnectOpenInternal. Signed-off-by: Marcos Paulo de Souza --- src/libvirt.c | 7 +++ 1 file changed, 7 insertions(+) diff --git a/src/libvirt.c

[libvirt] [PATCH v3 5/5] phyp_driver: Set remoteOnly member of virConnectDriver

2018-07-10 Thread Marcos Paulo de Souza
Phyp driver can't function without a server being informed, so this flag makes libvirt to check for a valid server before calling connectOpen. Signed-off-by: Marcos Paulo de Souza --- src/phyp/phyp_driver.c | 7 +-- 1 file changed, 1 insertion(+), 6 deletions(-) diff --git

[libvirt] [PATCH v3 0/5] Making libvirt aware of a server need

2018-07-10 Thread Marcos Paulo de Souza
Hi guys, this is the third version of the patchset to add a new member to virConnectDriver in order to simplfy the check for a server. Now, libvirt does the work inside virConnectOpenInternal after getting the correct driver from the URI. v2:

[libvirt] [PATCH v3 3/5] esx_driver: Set remoteOnly member of virConnectDriver

2018-07-10 Thread Marcos Paulo de Souza
ESX driver can't function without a server being informed, so this flag makes libvirt to check for a valid server before calling connectOpen. Signed-off-by: Marcos Paulo de Souza --- src/esx/esx_driver.c | 8 +--- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git

[libvirt] [PATCH v3 1/5] driver.h: Add remoteOnly member to virConnectDriver struct

2018-07-10 Thread Marcos Paulo de Souza
This new flag will be set when a driver needs a remote URL in order to work, as ESX, HyperV and Phyp. Signed-off-by: Marcos Paulo de Souza --- src/driver.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/driver.h b/src/driver.h index 0b1f7a2269..c4d94ba294 100644 --- a/src/driver.h

[libvirt] [PATCH v3 4/5] hyperv_driver: Set remoteOnly member of virConnectDriver

2018-07-10 Thread Marcos Paulo de Souza
HyperV driver can't function without a server being informed, so this flag makes libvirt to check for a valid server before calling connectOpen. Signed-off-by: Marcos Paulo de Souza --- src/hyperv/hyperv_driver.c | 8 +--- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git

[libvirt] [PATCH v2 1/2] conf: nodedev: Don't refresh host caps in testdriver

2018-07-10 Thread Cole Robinson
Add a 'skipUpdateCaps' bool that we set for test_driver.c nodedevs which will skip accessing host resources via virNodeDeviceUpdateCaps Signed-off-by: Cole Robinson --- src/conf/virnodedeviceobj.c | 13 - src/conf/virnodedeviceobj.h | 4 src/test/test_driver.c | 2 ++ 3

[libvirt] [PATCH v2 0/2] test: Implement virConnectListAllNodeDevices

2018-07-10 Thread Cole Robinson
v1: https://www.redhat.com/archives/libvir-list/2018-February/msg01135.html virnodedeviceobj.c generic ListAll infrastructure is not stateless and will try to refresh nodedev scsi/pci/etc. config. Understandable this doesn't play well with the test driver. Trying to untangle it is a bit tough

[libvirt] [PATCH v2 2/2] test: Implement virConnectListAllNodeDevices

2018-07-10 Thread Cole Robinson
Signed-off-by: Cole Robinson --- src/test/test_driver.c | 13 + 1 file changed, 13 insertions(+) diff --git a/src/test/test_driver.c b/src/test/test_driver.c index 7374c83eaa..3bc79bf358 100644 --- a/src/test/test_driver.c +++ b/src/test/test_driver.c @@ -5381,6 +5381,18 @@

[libvirt] [PATCH] test: Implement virConnectListAllInterfaces

2018-07-10 Thread Cole Robinson
This adds some generic virinterfaceobj code, roughly matching what is used by other stateful drivers like network, storage, etc. Signed-off-by: Cole Robinson --- src/conf/virinterfaceobj.c | 105 + src/conf/virinterfaceobj.h | 7 +++

Re: [libvirt] [PATCH v3 05/35] cfg.mk: no trailing semicolon at line invoking VIR_DEFINE_* cleanup macro

2018-07-10 Thread Sukrit Bhatnagar
On Tue, 10 Jul 2018 at 16:30, Erik Skultety wrote: > > On Sat, Jun 30, 2018 at 02:30:09PM +0530, Sukrit Bhatnagar wrote: > > Add rule to ensure that there is no semicolon at the end of > > the line where a VIR_DEFINE_* cleanup macro is invoked. > > > > Signed-off-by: Sukrit Bhatnagar > > --- > >

Re: [libvirt] [PATCH v3 04/35] cfg.mk: single variable declaration per line when using cleanup macro

2018-07-10 Thread Sukrit Bhatnagar
On Tue, 10 Jul 2018 at 16:24, Erik Skultety wrote: > > On Sat, Jun 30, 2018 at 02:30:08PM +0530, Sukrit Bhatnagar wrote: > > Add rule to ensure that each variable declaration made using > > a cleanup macro is in its own separate line. > > > > Sometimes a variable might be initialized from a value

Re: [libvirt] [Qemu-devel] [PULL 25/26] block: Remove deprecated -drive option serial

2018-07-10 Thread Daniel P . Berrangé
On Tue, Jul 10, 2018 at 05:01:22PM +0200, Cornelia Huck wrote: > Who is, in general, testing which libvirt version? I can think of: > - libvirt developers, which will probably run libvirt current git, but > more likely a released QEMU? In general libvirt devs tend to run a mixture of whatever

Re: [libvirt] [Qemu-devel] [PULL 25/26] block: Remove deprecated -drive option serial

2018-07-10 Thread Daniel P . Berrangé
On Tue, Jul 10, 2018 at 04:09:38PM +0100, Peter Maydell wrote: > On 10 July 2018 at 15:22, Cornelia Huck wrote: > > On Tue, 10 Jul 2018 07:59:15 +0200 > > Markus Armbruster wrote: > > > >> In addition to actively pulling libvirt developers into review of > >> deprecation patches, we should

Re: [libvirt] [dbus PATCH v2] gitignore: add tests/.pytest_cache

2018-07-10 Thread Andrea Bolognani
On Tue, 2018-07-10 at 11:18 -0400, Anya Harter wrote: > Sorry, I'm still pretty new to .gitignore files. :) No worries, that's exactly what reviews are for :) -- Andrea Bolognani / Red Hat / Virtualization -- libvir-list mailing list libvir-list@redhat.com

Re: [libvirt] [Qemu-devel] [PULL 25/26] block: Remove deprecated -drive option serial

2018-07-10 Thread Peter Krempa
On Tue, Jul 10, 2018 at 17:01:22 +0200, Cornelia Huck wrote: > On Tue, 10 Jul 2018 16:39:31 +0200 > Peter Krempa wrote: > > On Tue, Jul 10, 2018 at 16:22:08 +0200, Cornelia Huck wrote: > > > On Tue, 10 Jul 2018 07:59:15 +0200 > > > Markus Armbruster wrote: [...] > > > "ERROR: 'old_option' is

Re: [libvirt] [dbus PATCH v2] gitignore: add tests/.pytest_cache

2018-07-10 Thread Anya Harter
On 07/10/2018 11:13 AM, Andrea Bolognani wrote: > On Tue, 2018-07-10 at 10:00 -0400, Anya Harter wrote: >> gitignore: add tests/.pytest_cache >> >> Signed-off-by: Anya Harter > > The commit message should have been adjusted - you're ignoring > all .pytest_cache/ directories now, not just the

Re: [libvirt] [dbus PATCH v2] gitignore: add tests/.pytest_cache

2018-07-10 Thread Andrea Bolognani
On Tue, 2018-07-10 at 10:00 -0400, Anya Harter wrote: > gitignore: add tests/.pytest_cache > > Signed-off-by: Anya Harter The commit message should have been adjusted - you're ignoring all .pytest_cache/ directories now, not just the one in tests/ :) [...] > @@ -44,3 +44,4 @@ vgcore.* >

Re: [libvirt] [Qemu-devel] [PULL 25/26] block: Remove deprecated -drive option serial

2018-07-10 Thread Peter Maydell
On 10 July 2018 at 15:22, Cornelia Huck wrote: > On Tue, 10 Jul 2018 07:59:15 +0200 > Markus Armbruster wrote: > >> In addition to actively pulling libvirt developers into review of >> deprecation patches, we should pursue the idea to optionally let QEMU >> fail on use of deprecated features,

Re: [libvirt] [Qemu-devel] [PULL 25/26] block: Remove deprecated -drive option serial

2018-07-10 Thread Cornelia Huck
On Tue, 10 Jul 2018 16:39:31 +0200 Peter Krempa wrote: > On Tue, Jul 10, 2018 at 16:22:08 +0200, Cornelia Huck wrote: > > On Tue, 10 Jul 2018 07:59:15 +0200 > > Markus Armbruster wrote: > > > > > In addition to actively pulling libvirt developers into review of > > > deprecation patches, we

Re: [libvirt] [PATCH 2/2] storage: Improve error handling on cdrom backend

2018-07-10 Thread Peter Krempa
On Tue, Jul 03, 2018 at 10:29:39 +0800, Han Han wrote: > Implement virFileCdromStatus() in virStorageBackendVolOpen to show > detailed errors or warnings of cdrom instead of general Input/output error. > > Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1596096 > Signed-off-by: Han Han >

Re: [libvirt] auto generated golang dbus binding for libvirt

2018-07-10 Thread Vasiliy Tolstov
вт, 10 июл. 2018 г. в 16:33, Peter Krempa : > > On Tue, Jul 10, 2018 at 16:24:55 +0300, Vasiliy Tolstov wrote: > > Hi. Thanks for dbus based interface to libvirt. Now i'm able to > > automatic generate bindings for go > > https://godoc.org/sdstack.com/sdstack/go-libvirt > > Code generator is ugly

Re: [libvirt] [PATCH 2/2 v2] qemu: monitor: Make qemuMonitorAddObject more robust against programming errors

2018-07-10 Thread Ján Tomko
On Wed, Jul 04, 2018 at 04:51:04PM +0200, Peter Krempa wrote: Document and check that @props contains a pointer to a json object and check that both necessary fields are present. Also mark @props as NONNULL. Signed-off-by: Peter Krempa --- Diff: - added the not commited fix to add "%s" to the

Re: [libvirt] [PATCH 1/2] qemu: hotplug: Do not try to add secret object for TLS if it does not exist

2018-07-10 Thread Ján Tomko
On Wed, Jul 04, 2018 at 04:40:55PM +0200, Peter Krempa wrote: The check whether the object holding secret for decryption of the TLS environment was wrong and would always attempt to add the object. This lead to a crash due to recent refactors. Resolves:

Re: [libvirt] [PATCH python] spec: Remove Group: and %defattr

2018-07-10 Thread Michal Privoznik
On 07/10/2018 03:50 PM, Cole Robinson wrote: > These are only needed for RHEL5 builds, which are no longer supported > > https://lists.fedoraproject.org/archives/list/de...@lists.fedoraproject.org/message/CMCUBB4SWS3URHTRRS3OPFM4HF5CGKBW/ > https://fedoraproject.org/wiki/RPMGroups >

Re: [libvirt] [Qemu-devel] [PULL 25/26] block: Remove deprecated -drive option serial

2018-07-10 Thread Peter Krempa
On Tue, Jul 10, 2018 at 16:22:08 +0200, Cornelia Huck wrote: > On Tue, 10 Jul 2018 07:59:15 +0200 > Markus Armbruster wrote: > > > In addition to actively pulling libvirt developers into review of > > deprecation patches, we should pursue the idea to optionally let QEMU > > fail on use of

Re: [libvirt] [PATCH 1/2] util: Introduce virFileCdromStatus

2018-07-10 Thread Michal Privoznik
On 07/10/2018 03:34 PM, Han Han wrote: > Sorry, it should be virFileCdromStatus not virFileCdromState :) Yes, that makes sense. Also, please do not top post on technical lists. It's common to either reply in line or at the bottom. Michal -- libvir-list mailing list libvir-list@redhat.com

Re: [libvirt] [Qemu-devel] [PULL 25/26] block: Remove deprecated -drive option serial

2018-07-10 Thread Kevin Wolf
Am 10.07.2018 um 16:22 hat Cornelia Huck geschrieben: > On Tue, 10 Jul 2018 07:59:15 +0200 > Markus Armbruster wrote: > > > In addition to actively pulling libvirt developers into review of > > deprecation patches, we should pursue the idea to optionally let QEMU > > fail on use of deprecated

Re: [libvirt] [PATCH] conf: virDomainDefValidateInternal prohibit some characters in shmem name

2018-07-10 Thread Jiri Denemark
On Tue, Jul 10, 2018 at 13:37:34 +0200, Simon Kobyda wrote: > XML shmem name will not include characters '/', '.' or '..', as shmem name > is used in a path > https://bugzilla.redhat.com/show_bug.cgi?id=1192400 > --- > src/conf/domain_conf.c | 13 + > 1 file changed, 13 insertions(+)

Re: [libvirt] [Qemu-devel] [PULL 25/26] block: Remove deprecated -drive option serial

2018-07-10 Thread Cornelia Huck
On Tue, 10 Jul 2018 07:59:15 +0200 Markus Armbruster wrote: > In addition to actively pulling libvirt developers into review of > deprecation patches, we should pursue the idea to optionally let QEMU > fail on use of deprecated features, then have libvirt run its test suite > that way. What

[libvirt] [dbus PATCH v2] gitignore: add tests/.pytest_cache

2018-07-10 Thread Anya Harter
Signed-off-by: Anya Harter --- .gitignore | 1 + 1 file changed, 1 insertion(+) diff --git a/.gitignore b/.gitignore index ca9e4e1..b2021d4 100644 --- a/.gitignore +++ b/.gitignore @@ -44,3 +44,4 @@ vgcore.* /src/org.libvirt.service /tests/test_util +**/.pytest_cache -- 2.17.1 --

[libvirt] [PATCH python] spec: Remove Group: and %defattr

2018-07-10 Thread Cole Robinson
These are only needed for RHEL5 builds, which are no longer supported https://lists.fedoraproject.org/archives/list/de...@lists.fedoraproject.org/message/CMCUBB4SWS3URHTRRS3OPFM4HF5CGKBW/ https://fedoraproject.org/wiki/RPMGroups Signed-off-by: Cole Robinson --- libvirt-python.spec.in | 5 -

Re: [libvirt] [PATCH v3 35/35] util: identity: use VIR_AUTOFREE instead of VIR_FREE for scalar types

2018-07-10 Thread Erik Skultety
On Sat, Jun 30, 2018 at 02:30:39PM +0530, Sukrit Bhatnagar wrote: > 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.

Re: [libvirt] [PATCH v3 28/35] util: bitmap: use VIR_AUTOPTR for aggregate types

2018-07-10 Thread Erik Skultety
On Sat, Jun 30, 2018 at 02:30:32PM +0530, Sukrit Bhatnagar wrote: > 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

Re: [libvirt] [PATCH v3 29/35] util: iohelper: use VIR_AUTOFREE instead of VIR_FREE for scalar types

2018-07-10 Thread Erik Skultety
On Sat, Jun 30, 2018 at 02:30:33PM +0530, Sukrit Bhatnagar wrote: > 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.

Re: [libvirt] [PATCH v3 30/35] util: arptable: use VIR_AUTOFREE instead of VIR_FREE for scalar types

2018-07-10 Thread Erik Skultety
On Sat, Jun 30, 2018 at 02:30:34PM +0530, Sukrit Bhatnagar wrote: > 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.

Re: [libvirt] [PATCH 1/2] util: Introduce virFileCdromStatus

2018-07-10 Thread Han Han
Sorry, it should be virFileCdromStatus not virFileCdromState :) On Tue, Jul 10, 2018 at 9:28 PM, Han Han wrote: > Hello Michel, > I agree with you that we could integrate these two APIs into one. If so, I > think we should change the API name virFileIsCDROM to **virFileCheckCDROM** > or

Re: [libvirt] auto generated golang dbus binding for libvirt

2018-07-10 Thread Peter Krempa
On Tue, Jul 10, 2018 at 16:24:55 +0300, Vasiliy Tolstov wrote: > Hi. Thanks for dbus based interface to libvirt. Now i'm able to > automatic generate bindings for go > https://godoc.org/sdstack.com/sdstack/go-libvirt > Code generator is ugly (gen.go and template.tpl) but package already > able to

Re: [libvirt] [PATCH 1/2] util: Introduce virFileCdromStatus

2018-07-10 Thread Han Han
Hello Michel, I agree with you that we could integrate these two APIs into one. If so, I think we should change the API name virFileIsCDROM to **virFileCheckCDROM** or **virFileCdromState**. virFileIsCDROM is confusing and doesn't indicate the function of checking state. On Tue, Jul 10, 2018 at

Re: [libvirt] [PATCH] storage: prefer using newDef to save configfile

2018-07-10 Thread Michal Privoznik
On 07/10/2018 09:15 AM, Shichangkuo wrote: > When re-defining an active storage pool, the configfile has not changed. This > issue was introduced by bfcd8fc9, > storage: Use virStoragePoolObjGetDef accessor for driver. So we prefer using > newDef to save configfile. > > Signed-off-by: Changkuo

[libvirt] auto generated golang dbus binding for libvirt

2018-07-10 Thread Vasiliy Tolstov
Hi. Thanks for dbus based interface to libvirt. Now i'm able to automatic generate bindings for go https://godoc.org/sdstack.com/sdstack/go-libvirt Code generator is ugly (gen.go and template.tpl) but package already able to do basic operations. Thanks again for you work. -- Vasiliy Tolstov,

Re: [libvirt] [PATCH v3 27/35] util: bitmap: remove redundant include directive

2018-07-10 Thread Erik Skultety
On Sat, Jun 30, 2018 at 02:30:31PM +0530, Sukrit Bhatnagar wrote: > The include directive for viralloc.h is added in virbitmap.h > in a previous patch. Same as patch 9. Reviewed-by: Erik Skultety -- libvir-list mailing list libvir-list@redhat.com

Re: [libvirt] [PATCH v3 26/35] util: bitmap: define cleanup function using VIR_DEFINE_AUTOPTR_FUNC

2018-07-10 Thread Erik Skultety
On Sat, Jun 30, 2018 at 02:30:30PM +0530, Sukrit Bhatnagar wrote: > 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. > >

Re: [libvirt] [PATCH v3 23/35] util: json: remove redundant include directive

2018-07-10 Thread Erik Skultety
On Sat, Jun 30, 2018 at 02:30:27PM +0530, Sukrit Bhatnagar wrote: > The include directive for viralloc.h is added in virjson.h > in a previous patch. Same as patch 9. Reviewed-by: Erik Skultety (patches 22-23) -- libvir-list mailing list libvir-list@redhat.com

Re: [libvirt] [PATCH v3 21/35] util: auth: use VIR_AUTOPTR for aggregate types

2018-07-10 Thread Erik Skultety
On Sat, Jun 30, 2018 at 02:30:25PM +0530, Sukrit Bhatnagar wrote: > 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

Re: [libvirt] [PATCH v3 20/35] util: auth: use VIR_AUTOFREE instead of VIR_FREE for scalar types

2018-07-10 Thread Erik Skultety
On Sat, Jun 30, 2018 at 02:30:24PM +0530, Sukrit Bhatnagar wrote: > 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.

Re: [libvirt] [PATCH v3 19/35] util: auth: remove redundant include directive

2018-07-10 Thread Erik Skultety
On Sat, Jun 30, 2018 at 02:30:23PM +0530, Sukrit Bhatnagar wrote: > The include directive for viralloc.h is added in virauthconfig.h > in a previous patch. Same as patch 9. Reviewed-by: Erik Skultety -- libvir-list mailing list libvir-list@redhat.com

Re: [libvirt] [PATCH v3 18/35] util: authconfig: use VIR_AUTOFREE instead of VIR_FREE for scalar types

2018-07-10 Thread Erik Skultety
On Sat, Jun 30, 2018 at 02:30:22PM +0530, Sukrit Bhatnagar wrote: > 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.

Re: [libvirt] [PATCH v3 16/35] util: authconfig: define cleanup function using VIR_DEFINE_AUTOPTR_FUNC

2018-07-10 Thread Erik Skultety
On Sat, Jun 30, 2018 at 02:30:20PM +0530, Sukrit Bhatnagar wrote: > 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. > >

Re: [libvirt] [PATCH v3 17/35] util: authconfig: remove redundant include directive

2018-07-10 Thread Erik Skultety
On Sat, Jun 30, 2018 at 02:30:21PM +0530, Sukrit Bhatnagar wrote: > The include directive for viralloc.h is added in virauthconfig.h > in a previous patch. Same suggestion as in patch 9. Reviewed-by: Erik Skultety -- libvir-list mailing list libvir-list@redhat.com

Re: [libvirt] [PATCH v3 15/35] util: file: use VIR_AUTOPTR for aggregate types

2018-07-10 Thread Erik Skultety
On Sat, Jun 30, 2018 at 02:30:19PM +0530, Sukrit Bhatnagar wrote: > 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

Re: [libvirt] [PATCH v3 14/35] util: file: use VIR_AUTOFREE instead of VIR_FREE for scalar types

2018-07-10 Thread Erik Skultety
On Sat, Jun 30, 2018 at 02:30:18PM +0530, Sukrit Bhatnagar wrote: > 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.

Re: [libvirt] [PATCH v3 11/35] util: command: use VIR_AUTOPTR for aggregate types

2018-07-10 Thread Erik Skultety
On Sat, Jun 30, 2018 at 02:30:15PM +0530, Sukrit Bhatnagar wrote: > 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

Re: [libvirt] [PATCH v3 10/35] util: command: use VIR_AUTOFREE instead of VIR_FREE for scalar types

2018-07-10 Thread Erik Skultety
On Sat, Jun 30, 2018 at 02:30:14PM +0530, Sukrit Bhatnagar wrote: > 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.

Re: [libvirt] [PATCH v3 09/35] util: command: remove redundant include directive

2018-07-10 Thread Erik Skultety
On Sat, Jun 30, 2018 at 02:30:13PM +0530, Sukrit Bhatnagar wrote: > The include directive for viralloc.h is added in vircommand.h > in a previous patch. How about: "viralloc.h is pulled in by vircommand.h" Reviewed-by: Erik Skultety -- libvir-list mailing list libvir-list@redhat.com

Re: [libvirt] [PATCH v3 08/35] util: command: define cleanup function using VIR_DEFINE_AUTOPTR_FUNC

2018-07-10 Thread Erik Skultety
On Sat, Jun 30, 2018 at 02:30:12PM +0530, Sukrit Bhatnagar wrote: > 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. > >

Re: [libvirt] [PATCH v3 07/35] util: string: define cleanup function using VIR_DEFINE_AUTOPTR_FUNC

2018-07-10 Thread Erik Skultety
On Sat, Jun 30, 2018 at 02:30:11PM +0530, Sukrit Bhatnagar wrote: > 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. > >

Re: [libvirt] [PATCH v3 06/35] util: string: introduce typedef for string

2018-07-10 Thread Erik Skultety
On Sat, Jun 30, 2018 at 02:30:10PM +0530, Sukrit Bhatnagar wrote: > Alias virString to (char *) so that the new cleanup macros > can be used for a list of strings (char **). > > Signed-off-by: Sukrit Bhatnagar > --- > src/util/virstring.h | 2 ++ > 1 file changed, 2 insertions(+) > > diff --git

Re: [libvirt] [jenkins-ci PATCH] guests: Make mappings more future proof

2018-07-10 Thread Andrea Bolognani
On Wed, 2018-06-13 at 15:01 +0200, Andrea Bolognani wrote: > We can reasonably expect the next major release of CentOS > to be somewhat close to current Fedora releases in terms of > packaging, and to ditch the soon-to-be-unsupported Python 2 > in favor of Python 3. > > Rewrite some of the

Re: [libvirt] [PATCH] conf: virDomainDefValidateInternal prohibit some characters in shmem name

2018-07-10 Thread Pavel Hrdina
On Tue, Jul 10, 2018 at 01:45:33PM +0200, Peter Krempa wrote: > On Tue, Jul 10, 2018 at 13:37:34 +0200, Simon Kobyda wrote: > > XML shmem name will not include characters '/', '.' or '..', as shmem name > > is used in a path > > https://bugzilla.redhat.com/show_bug.cgi?id=1192400 > > --- > >

Re: [libvirt] [PATCH] conf: virDomainDefValidateInternal prohibit some characters in shmem name

2018-07-10 Thread Peter Krempa
On Tue, Jul 10, 2018 at 13:37:34 +0200, Simon Kobyda wrote: > XML shmem name will not include characters '/', '.' or '..', as shmem name > is used in a path > https://bugzilla.redhat.com/show_bug.cgi?id=1192400 > --- > src/conf/domain_conf.c | 13 + > 1 file changed, 13 insertions(+)

Re: [libvirt] [PATCH v2 1/7] qemu: caps: Introduce a capability for egl-headless

2018-07-10 Thread Michal Privoznik
On 07/09/2018 06:24 PM, Erik Skultety wrote: > Since QEMU 2.10, it's possible to use a new type of display - > egl-headless which uses drm nodes to provide OpenGL support. This patch > adds a capability for that. However, since QEMU doesn't provide a QMP > command to probe it, this is only a

Re: [libvirt] [PATCH v2 4/7] conf: Introduce virDomainGraphicsDefHasOpenGL helper

2018-07-10 Thread Michal Privoznik
On 07/09/2018 06:24 PM, Erik Skultety wrote: > A simple helper which will loop through all the graphics elements and > checks whether at least one of them enables OpenGL support, either by > containing or being of type 'egl-headless'. > > Signed-off-by: Erik Skultety > --- >

[libvirt] [PATCH] conf: virDomainDefValidateInternal prohibit some characters in shmem name

2018-07-10 Thread Simon Kobyda
XML shmem name will not include characters '/', '.' or '..', as shmem name is used in a path https://bugzilla.redhat.com/show_bug.cgi?id=1192400 --- src/conf/domain_conf.c | 13 + 1 file changed, 13 insertions(+) diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c index

Re: [libvirt] [PATCH v2 2/7] conf: Introduce a new graphics display type 'headless'

2018-07-10 Thread Michal Privoznik
On 07/09/2018 06:24 PM, Erik Skultety wrote: > Since 2.10 QEMU supports a new display type egl-headless which uses the > drm nodes for OpenGL rendering copying back the rendered bits back to > QEMU into a dma-buf which can be accessed by standard "display" apps > like VNC or SPICE. Although this

Re: [libvirt] [PATCH v2 7/7] docs: Update news about the VNC console enablement for mdevs

2018-07-10 Thread Michal Privoznik
On 07/09/2018 06:24 PM, Erik Skultety wrote: > Signed-off-by: Erik Skultety > --- > docs/news.xml | 10 ++ > 1 file changed, 10 insertions(+) ACK Michal -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list

Re: [libvirt] [PATCH v2 5/7] conf: Introduce new attribute 'display'

2018-07-10 Thread Michal Privoznik
On 07/09/2018 06:24 PM, Erik Skultety wrote: > QEMU 2.12 introduced a new type of display for mediated devices using > vfio-pci backend which allows a mediated device to be used as a VGA > compatible device as an alternative to an emulated video device. QEMU > exposes this feature via a vfio

Re: [libvirt] [PATCH v2 6/7] qemu: command: Enable formatting vfio-pci.display option onto cmdline

2018-07-10 Thread Michal Privoznik
On 07/09/2018 06:24 PM, Erik Skultety wrote: > Since QEMU 2.12, QEMU understands a new vfio-pci device option 'display' > which can be used to turn on display capabilities on vgpu-enabled > mediated devices, IOW emulated GPU devices like QXL will no longer be > needed with vgpu-enable mdevs. >

Re: [libvirt] [PATCH 1/2] qemu: Add ccw support for vhost-vsock

2018-07-10 Thread Ján Tomko
On Wed, Jul 04, 2018 at 01:21:44PM +0200, Boris Fiuczynski wrote: Add support and tests for vhost-vsock-ccw. Signed-off-by: Boris Fiuczynski --- src/qemu/qemu_command.c | 15 +++-- src/qemu/qemu_domain_address.c| 7 +++- .../vhost-vsock-ccw-auto.args

Re: [libvirt] [PATCH 0/4] qemu: move rerror/werror to -device

2018-07-10 Thread Ján Tomko
On Mon, Jul 09, 2018 at 05:56:20PM +0200, Peter Krempa wrote: This series requires the qemu 3.0.0 capabilities that I've sent with https://www.redhat.com/archives/libvir-list/2018-July/msg00454.html Peter Krempa (4): tests: qemuxml2argv: Unify all tests for disk error policy tests:

Re: [libvirt] [PATCH 0/4] Clean up QMP schema testing and add support for RBD auth for -blockdev

2018-07-10 Thread Ján Tomko
On Mon, Jul 09, 2018 at 04:12:35PM +0200, Peter Krempa wrote: QEMU recently added support for passing RBD credentials also for -blockdev/blockdev-add. First two patches remove the need for a separate stash for the QMP schema data, patch 3 adds new capabilities and finally the last patch adds

Re: [libvirt] [PATCH v3 05/35] cfg.mk: no trailing semicolon at line invoking VIR_DEFINE_* cleanup macro

2018-07-10 Thread Erik Skultety
On Sat, Jun 30, 2018 at 02:30:09PM +0530, Sukrit Bhatnagar wrote: > Add rule to ensure that there is no semicolon at the end of > the line where a VIR_DEFINE_* cleanup macro is invoked. > > Signed-off-by: Sukrit Bhatnagar > --- NACK, the compiler will fail in such case, so the syntax-rule

Re: [libvirt] [PATCH v3 04/35] cfg.mk: single variable declaration per line when using cleanup macro

2018-07-10 Thread Erik Skultety
On Sat, Jun 30, 2018 at 02:30:08PM +0530, Sukrit Bhatnagar wrote: > Add rule to ensure that each variable declaration made using > a cleanup macro is in its own separate line. > > Sometimes a variable might be initialized from a value returned > by a macro or a function, which may take on more

Re: [libvirt] [PATCH v3 03/35] cfg.mk: correct spacing between type and asterisk in VIR_AUTOFREE

2018-07-10 Thread Erik Skultety
On Sat, Jun 30, 2018 at 02:30:07PM +0530, Sukrit Bhatnagar wrote: > Add rule to ensure that there is exactly one blank space between > the type name and the asterisk when passed as the argument to the > VIR_AUTOFREE macro. > > Signed-off-by: Sukrit Bhatnagar > --- We would have to enforce this

Re: [libvirt] [PATCH v3 02/35] cfg.mk: variable initialization when declared with cleanup macro

2018-07-10 Thread Erik Skultety
On Sat, Jun 30, 2018 at 02:30:06PM +0530, Sukrit Bhatnagar wrote: > A variable, which is never assigned a value in the function, might get > passed into the cleanup function which may or may not raise any errors. > > To maintain the correct usage, the variable must be initialized, either > with a

Re: [libvirt] [PATCH v2 1/6] qemuProcessStartPRDaemonHook: Try to set NS iff domain was started with one

2018-07-10 Thread Peter Krempa
On Thu, Jul 05, 2018 at 09:44:33 +0200, Michal Privoznik wrote: > Users have possibility to disable qemu namespace feature (e.g. > because they are running on *BSD which lacks Linux NS support). > If that's the case we should not try to move qemu-pr-helper into > the same namespace as qemu is in.

Re: [libvirt] [PATCH v2 2/6] qemuDomainValidateStorageSource: Relax PR validation

2018-07-10 Thread Peter Krempa
On Thu, Jul 05, 2018 at 09:44:34 +0200, Michal Privoznik wrote: > Rather than rejecting the user provided path and alias for the > managed PR reservation we will ignore the provided path. The > reason is that migration XML does contain path even for managed > reservations. > > Signed-off-by:

Re: [libvirt] [PATCH v2 3/6] virStoragePRDefFormat: Suppress path formatting for migratable XML

2018-07-10 Thread Peter Krempa
On Thu, Jul 05, 2018 at 09:44:35 +0200, Michal Privoznik wrote: > If there are managed reservations for a disk source, the path to > the pr-helper socket is generated automatically by libvirt when > needed and points somewhere under priv->libDir. Therefore it is > very unlikely that the path will

Re: [libvirt] [PATCH v2 4/6] qemu: Wire up PR_MANAGER_STATUS_CHANGED event

2018-07-10 Thread Peter Krempa
On Thu, Jul 05, 2018 at 09:44:36 +0200, Michal Privoznik wrote: > This event is emitted on the monitor if one of pr-managers lost > connection to its pr-helper process. What libvirt needs to do is > restart the pr-helper process iff it corresponds to managed > pr-manager. > > Signed-off-by:

Re: [libvirt] [PATCH v2 5/6] qemu_monitor: Introduce qemuMonitorJSONGetPRManagerInfo

2018-07-10 Thread Peter Krempa
On Thu, Jul 05, 2018 at 09:44:37 +0200, Michal Privoznik wrote: > This function fetches status of all pr-managers. So far, qemu > reports only a single attribute "connected" but that fits our > needs. > > Signed-off-by: Michal Privoznik > --- > src/qemu/qemu_monitor.c | 25 + >

Re: [libvirt] [PATCH v2 6/6] qemu: Fetch pr-helper process info on reconnect

2018-07-10 Thread Peter Krempa
On Thu, Jul 05, 2018 at 09:44:38 +0200, Michal Privoznik wrote: > If qemu-pr-helper process died while libvirtd was not running no > event is emitted. Therefore, when reconnecting to the monitor we > must check the qemu-pr-helper process status and act accordingly. > > Signed-off-by: Michal

Re: [libvirt] [PATCH 8/9] qemu: command: Refactor floppy controller command formatting

2018-07-10 Thread Peter Krempa
On Tue, Jul 10, 2018 at 11:27:51 +0200, Ján Tomko wrote: > On Tue, Jul 10, 2018 at 10:44:48AM +0200, Peter Krempa wrote: > > Aggregate the code for the two separate formats used according to the > > machine type and add some supporting code so that the function is > > actually readable. > > > >

Re: [libvirt] [PATCH 9/9] qemu: command: Rename qemuBuildDriveDevStr to qemuBuildDiskDeviceStr

2018-07-10 Thread Ján Tomko
On Tue, Jul 10, 2018 at 10:44:49AM +0200, Peter Krempa wrote: It builds the string for '-device' from a virDomainDiskDef. Signed-off-by: Peter Krempa --- src/qemu/qemu_command.c | 12 ++-- src/qemu/qemu_command.h | 10 +- src/qemu/qemu_hotplug.c | 2 +- 3 files changed, 12

Re: [libvirt] [PATCH 8/9] qemu: command: Refactor floppy controller command formatting

2018-07-10 Thread Ján Tomko
On Tue, Jul 10, 2018 at 10:44:48AM +0200, Peter Krempa wrote: Aggregate the code for the two separate formats used according to the machine type and add some supporting code so that the function is actually readable. Signed-off-by: Peter Krempa --- src/qemu/qemu_command.c | 58

Re: [libvirt] [PATCH 7/9] qemu: command: Don't generate disk drive alias manually for floppies

2018-07-10 Thread Ján Tomko
On Tue, Jul 10, 2018 at 10:44:47AM +0200, Peter Krempa wrote: qemuBulildFloppyCommandLineOptions built it's own version of the -drive *its alias. Replace it by qemuAliasDiskDriveFromDisk. Signed-off-by: Peter Krempa --- src/qemu/qemu_command.c | 19 ++- 1 file changed, 14

Re: [libvirt] [PATCH 6/9] qemu: command: Split out formatting of disk source commandline

2018-07-10 Thread Ján Tomko
On Tue, Jul 10, 2018 at 10:44:46AM +0200, Peter Krempa wrote: Further split qemuBuildDiskCommandLine to separate formatting of the source part. Signed-off-by: Peter Krempa --- src/qemu/qemu_command.c | 37 ++--- 1 file changed, 26 insertions(+), 11 deletions(-)

Re: [libvirt] [PATCH 5/9] qemu: hotplug: Add warning regarding SD hotplug

2018-07-10 Thread Ján Tomko
On Tue, Jul 10, 2018 at 10:44:45AM +0200, Peter Krempa wrote: SD card hotplug should not be implemented until they can be used via -blockdev. Signed-off-by: Peter Krempa --- src/qemu/qemu_hotplug.c | 3 +++ 1 file changed, 3 insertions(+) Reviewed-by: Ján Tomko Jano signature.asc

Re: [libvirt] [PATCH 4/9] qemu: command: Rename and export qemuDiskBusNeedsDeviceArg

2018-07-10 Thread Ján Tomko
On Tue, Jul 10, 2018 at 10:44:44AM +0200, Peter Krempa wrote: Change the semantics to exactly opposite and rename it to qemuDiskBusNeedsDriveArg. This will be necessary as some devices can't be used with -blockdev. Signed-off-by: Peter Krempa --- src/qemu/qemu_command.c | 23

Re: [libvirt] [PATCH 3/9] tests: Remove disk from 'serial-unix-chardev' test

2018-07-10 Thread Ján Tomko
On Tue, Jul 10, 2018 at 10:44:43AM +0200, Peter Krempa wrote: We are testing character devices so the disk is not necessary. Minimize the configuration. This will prevent changes when switching to blockdev. Signed-off-by: Peter Krempa --- tests/qemuxml2argvdata/serial-unix-chardev.args

Re: [libvirt] [PATCH 2/9] qemu: domain: Reject copy_on_read for read-only disks

2018-07-10 Thread Ján Tomko
On Tue, Jul 10, 2018 at 10:44:42AM +0200, Peter Krempa wrote: The sectors read from the backing image need to be written to the top level image. If a disk is marked read-only the image can't be written. QEMU handled that by disabling copy_on_read and reporting a warning: -drive

Re: [libvirt] [PATCH 1/9] qemu: domain: Remove code assuming disk format probing

2018-07-10 Thread Ján Tomko
On Tue, Jul 10, 2018 at 10:44:41AM +0200, Peter Krempa wrote: After commit c95f50cb021ea9a297 we always set a disk format in the post parse callback so the code that madates use of explicit format for mandates shareable disks no longer makes sense. Signed-off-by: Peter Krempa ---

  1   2   >