Re: [libvirt] [PATCH v3 00/12] Make virNodeDeviceObj and virNodeDeviceObjList private

2017-06-29 Thread Erik Skultety
On Wed, Jun 14, 2017 at 09:27:44PM -0400, John Ferlan wrote: > > ping? > > Perhaps more involved - the first couple are from the previous series. > Once you get past the I hate it when someone renames things - it should > be a familiar sequence of creating a lockable object. Just a small note, as

Re: [libvirt] [PATCH v3 05/12] nodedev: Introduce virNodeDeviceObjNew

2017-06-29 Thread Erik Skultety
On Sat, Jun 03, 2017 at 09:11:55AM -0400, John Ferlan wrote: > Create an allocator for the virNodeDeviceObjPtr - include setting up > the mutex, saving the virNodeDeviceDefPtr, and locking the return object. > > Signed-off-by: John Ferlan > --- ACK Erik -- libvir-list

Re: [libvirt] [PATCH v3 08/12] nodedev: Dereference the obj/def in virNodeDeviceObjListFind* APIs

2017-07-03 Thread Erik Skultety
On Fri, Jun 30, 2017 at 01:08:22PM -0400, John Ferlan wrote: > > > On 06/30/2017 08:06 AM, Erik Skultety wrote: > > On Sat, Jun 03, 2017 at 09:11:58AM -0400, John Ferlan wrote: > >> Create local @obj and @def for the API's rather than referencing the > >> devs->

Re: [libvirt] [PATCH v3 10/12] nodedev: Introduce virNodeDeviceObjListFindSCSIHostByWWNs

2017-07-03 Thread Erik Skultety
On Sat, Jun 03, 2017 at 09:12:00AM -0400, John Ferlan wrote: > Alter the nodeDeviceLookupSCSIHostByWWN to use the new API in order > to find what it's looking for. > Would you mind enhancing the commit message a bit? I assume the new API is virNodeDeviceGetSCSIHostCaps but a random reader would

Re: [libvirt] [PATCH v3 09/12] nodedev: Introduce virNodeDeviceGetSCSIHostCaps

2017-07-03 Thread Erik Skultety
On Sat, Jun 03, 2017 at 09:11:59AM -0400, John Ferlan wrote: > We're about to move the call to nodeDeviceSysfsGetSCSIHostCaps from > node_device_driver into virnodedeviceobj, so move the guts of the code > from the driver specific node_device_linux_sysfs into its own API > since virnodedeviceobj

Re: [libvirt] [PATCH v3 01/12] nodedev: Alter virNodeDeviceObjRemove

2017-07-03 Thread Erik Skultety
On Fri, Jun 30, 2017 at 09:47:07AM -0400, John Ferlan wrote: > > > On 06/30/2017 07:41 AM, Erik Skultety wrote: > > On Fri, Jun 30, 2017 at 07:14:13AM -0400, John Ferlan wrote: > >> > >> > >> On 06/30/2017 04:40 AM, Erik Skultety wrote: > >>>

Re: [libvirt] [PATCH v3 12/12] nodedev: Convert virNodeDeviceObj to use virObjectLockable

2017-07-03 Thread Erik Skultety
On Thu, Jun 29, 2017 at 12:11:47PM -0400, John Ferlan wrote: > > > On 06/03/2017 09:12 AM, John Ferlan wrote: > > Now that we have a bit more control, let's convert our object into > > a lockable object and let that magic handle the create and lock/unlock. > > > > This also involves creating a

Re: [libvirt] [PATCH v2] Fix documentation errors about the path of conf files

2017-06-28 Thread Erik Skultety
On Wed, Jun 28, 2017 at 02:00:48PM +0800, Lily Zhu wrote: > The default conf files, for example, libvirtd.conf, virtlockd.conf > and virtlogd.conf, should be located under the directory > "/etc/libvirt" when root as root, rather than "/etc". > When run as non-root, the configuration file should be

Re: [libvirt] [PATCH v3 01/12] nodedev: Alter virNodeDeviceObjRemove

2017-06-29 Thread Erik Skultety
On Sat, Jun 03, 2017 at 09:11:51AM -0400, John Ferlan wrote: > Rather than passing the object to be removed by reference, pass by value > and then let the caller decide whether or not the object should be free'd. > This function should just handle the remove of the object from the list > for which

Re: [libvirt] [PATCH v3 03/12] nodedev: Use common naming for virnodedeviceobj

2017-06-29 Thread Erik Skultety
On Sat, Jun 03, 2017 at 09:11:53AM -0400, John Ferlan wrote: > A virNodeDeviceObjPtr is an @obj > > A virNodeDeviceObjListPtr is an @devs There was some argument that this messes up with history in terms of nt introducing any functional change, thus making it harder to go through the commits and

Re: [libvirt] [PATCH v3 02/12] test: Adjust cleanup/error paths for nodedev test APIs

2017-06-29 Thread Erik Skultety
On Sat, Jun 03, 2017 at 09:11:52AM -0400, John Ferlan wrote: > - Rather than "goto cleanup;" on failure to virNodeDeviceObjFindByName >an @obj, just return directly. This then allows the cleanup: label code >to not have to check "if (obj)" before calling virNodeDeviceObjUnlock. >This

Re: [libvirt] [PATCH v3 01/12] nodedev: Alter virNodeDeviceObjRemove

2017-06-29 Thread Erik Skultety
On Thu, Jun 29, 2017 at 01:24:45PM +0100, Daniel P. Berrange wrote: > On Thu, Jun 29, 2017 at 02:12:55PM +0200, Erik Skultety wrote: > > On Sat, Jun 03, 2017 at 09:11:51AM -0400, John Ferlan wrote: > > > Rather than passing the object to be removed by reference, pass by value

Re: [libvirt] [PATCH v3 04/12] nodedev: Use consistent names for driver variables

2017-06-29 Thread Erik Skultety
[...] > @@ -506,21 +506,21 @@ static void > dev_refresh(const char *udi) > { > const char *name = hal_name(udi); > -virNodeDeviceObjPtr dev; > +virNodeDeviceObjPtr obj; > > nodeDeviceLock(); > -dev = virNodeDeviceObjFindByName(>devs, name); > -if (dev) { > +obj =

Re: [libvirt] [PATCH v3 01/12] nodedev: Alter virNodeDeviceObjRemove

2017-06-29 Thread Erik Skultety
On Thu, Jun 29, 2017 at 09:57:09AM -0400, John Ferlan wrote: > > > On 06/29/2017 08:12 AM, Erik Skultety wrote: > > On Sat, Jun 03, 2017 at 09:11:51AM -0400, John Ferlan wrote: > >> Rather than passing the object to be removed by reference, pass by value > >> and t

Re: [libvirt] [PATCH v2 09/10] docs: Provide a nodedev driver stub documentation

2017-04-26 Thread Erik Skultety
> > I'm not a native speaker but the text makes sense and having something is > > definitely better than having no documentation at all. > > > > ACK > > > > Pavel > > If you remove all MDEV references you can push it right away. I did so and pushed the documentation stub. Thanks, Erik --

[libvirt] [PATCH v3 0/6] Add mdev reporting capability to the nodedev driver

2017-04-26 Thread Erik Skultety
- instead of one capability 'mdev' for both mdev device and physical parent I introduced 2, so we can do virsh nodedev-list --cap 'mdev_types' | 'mdev' to see either parent devices or the mediated devices themselves - other minor adjustments pointed out during review. Erik Erik Skultety (6): mdev: Pass

[libvirt] [PATCH v3 4/6] nodedev: Introduce the mdev capability to a PCI parent device

2017-04-26 Thread Erik Skultety
: ... ... optional_vendor_supplied_codename vfio-pci NUM ... ... ... Signed-off-by: Erik Skultety <eskul...@redhat.com> --- docs/schemas/nodedev.rng | 26 + src/conf/node_device_

[libvirt] [PATCH v3 6/6] docs: Document the mediated devices within the nodedev driver

2017-04-26 Thread Erik Skultety
Signed-off-by: Erik Skultety <eskul...@redhat.com> --- docs/drvnodedev.html.in | 164 +++- 1 file changed, 163 insertions(+), 1 deletion(-) diff --git a/docs/drvnodedev.html.in b/docs/drvnodedev.html.in index 0a3870343..8f820cca1 100644 ---

[libvirt] [PATCH v3 3/6] nodedev: Introduce new mdev_types and mdev nodedev capabilities

2017-04-26 Thread Erik Skultety
of mdev devices, since one day libvirt might be actually able to create the mdev devices in an automated way (just like we do for NPIV/vHBA). Signed-off-by: Erik Skultety <eskul...@redhat.com> --- include/libvirt/libvirt-nodedev.h| 2 ++ src/conf/node_device_conf.c | 10 +

[libvirt] [PATCH v3 1/6] mdev: Pass a uuidstr rather than an mdev object to some util functions

2017-04-26 Thread Erik Skultety
. Signed-off-by: Erik Skultety <eskul...@redhat.com> --- There's more than this, e.g. all hostdevs do it like that, but that's a refactor for another day. src/qemu/qemu_domain.c | 8 +--- src/security/security_apparmor.c | 10 +- src/security/security_dac.c

[libvirt] [PATCH v3 5/6] nodedev: Introduce mdev capability for mediated devices

2017-04-26 Thread Erik Skultety
device XML: mdev_4b20d080_1b54_4048_85b3_a6a62d165c01 /sys/devices/.../4b20d080-1b54-4048-85b3-a6a62d165c01 pci__06_00_0 vfio_mdev Signed-off-by: Erik Skultety <eskul...@redhat.com> --- docs/schemas/nodedev.rng | 17 + sr

[libvirt] [PATCH v3 2/6] nodedev: conf: Split PCI sub-capability parsing to separate methods

2017-04-26 Thread Erik Skultety
Since there's at least SRIOV and MDEV sub-capabilities to be parsed, let's make the code more readable by splitting it to several logical blocks. Signed-off-by: Erik Skultety <eskul...@redhat.com> --- src/conf/node_device_conf.c | 130 ++-- 1 file c

Re: [libvirt] [PATCH] util: Remove unused variate @errbuf in virPCIGetDeviceAddressFromSysfsLink

2017-04-27 Thread Erik Skultety
On Thu, Apr 27, 2017 at 09:52:52AM +0800, Wang King wrote: > From: w00185384 You should tweak your git config to use your real name. Since you already have a few patches in libvirt, I changed the 'author' field according to those. I also see you used S-o-B in the past which

Re: [libvirt] [PATCH] qemu: Ignore missing query-migrate-parameters

2017-04-27 Thread Erik Skultety
On Wed, Apr 26, 2017 at 11:25:46PM +0200, Jiri Denemark wrote: > Trivially no migration parameters are supported when > query-migrate-parameters QMP command is missing. There's no need to > report an error in such case especially when doing so breaks > compatibility with old QEMU. I'd suggest

Re: [libvirt] [PATCH] qemu: Ignore missing query-migrate-parameters

2017-04-27 Thread Erik Skultety
On Thu, Apr 27, 2017 at 09:22:14AM +0200, Jiri Denemark wrote: > On Thu, Apr 27, 2017 at 08:49:30 +0200, Erik Skultety wrote: > > On Wed, Apr 26, 2017 at 11:25:46PM +0200, Jiri Denemark wrote: > > > Trivially no migration parameters are supported when > > > query-mig

Re: [libvirt] [PATCH] qemu: numa: Don't return automatic nodeset for inactive domain

2017-04-27 Thread Erik Skultety
On Wed, Apr 26, 2017 at 03:05:00PM +0200, Peter Krempa wrote: > qemuDomainGetNumaParameters would return the automatic nodeset even for > the persistent config if the domain was running. This is incorrect since > the automatic nodeset will be re-queried upon starting the vm. > > Resolves:

Re: [libvirt] [PATCH v2 04/10] docs: Utilize our XSLT list generating template more

2017-04-24 Thread Erik Skultety
On Fri, Apr 21, 2017 at 02:51:50PM +0200, Pavel Hrdina wrote: > On Thu, Apr 20, 2017 at 03:05:54PM +0200, Erik Skultety wrote: > > Since we do have this template at hand, why not using it wherever > > possible (list of supported pool types and remote access section). > &g

Re: [libvirt] [PATCH] Fix minor typos

2017-04-24 Thread Erik Skultety
On Sat, Apr 22, 2017 at 10:11:01PM +0300, Yuri Chornoivan wrote: > Hi, > > Attached is a minor fix for the typos in libvirt's git/master. > > Best regards, > Yuri ACK, I'll push the patch in a moment. Erik -- libvir-list mailing list libvir-list@redhat.com

Re: [libvirt] [PATCH v3 4/8] tests: Add missing cache data for vircaps2xmltest

2017-04-28 Thread Erik Skultety
On Tue, Apr 25, 2017 at 01:10:28PM +0200, Martin Kletzander wrote: > Commit a0fdd2f6f9a0cc77ae285c289e2c16d314b6a907 added some data from > the system but forgot 3 files for each cache. Again, to me, the content of this patch is white noise. But I guess we want to test stuff, don't we... ACK

Re: [libvirt] [PATCH v3 1/8] tests: Add virfilewrapper -- the new super "mock"

2017-04-28 Thread Erik Skultety
On Tue, Apr 25, 2017 at 01:10:25PM +0200, Martin Kletzander wrote: > This mock (which is actually not mock at all, see later) can redirect > all accesses to a path into another path. There is no need to > create mocks for particular directories, you just create a directory > with all the data a

Re: [libvirt] [PATCH v3 2/8] util: Remove virsysfs and instead enhance virFileReadValue* functions

2017-04-28 Thread Erik Skultety
On Tue, Apr 25, 2017 at 01:10:26PM +0200, Martin Kletzander wrote: > It is no longer needed thanks to the great virfilemock.c. And this s/mock/wrapper > > -return 0; > + > +/* Arbitrarily sized number, feel free to change, but the function should be > + * used for small, interface-like

Re: [libvirt] [PATCH v3 3/8] tests: Test vircaps2xmldata XMLs in virschematest

2017-04-28 Thread Erik Skultety
On Tue, Apr 25, 2017 at 01:10:27PM +0200, Martin Kletzander wrote: > Signed-off-by: Martin Kletzander > --- > tests/virschematest.c | 3 ++- > 1 file changed, 2 insertions(+), 1 deletion(-) > > diff --git a/tests/virschematest.c b/tests/virschematest.c > index

[libvirt] [PATCH 0/2] Fix daemon crash caused by virHostdevUpdateActiveMediatedDevices

2017-04-28 Thread Erik Skultety
Erik Skultety (2): util: mdev: Use a local variable instead of an invalid pointer reference mdev: Fix daemon crash on domain shutdown after reconnect src/util/virhostdev.c | 4 ++-- src/util/virmdev.c| 18 +++--- src/util/virmdev.h| 2 +- 3 files changed, 14

[libvirt] [PATCH 2/2] mdev: Fix daemon crash on domain shutdown after reconnect

2017-04-28 Thread Erik Skultety
-off-by: Erik Skultety <eskul...@redhat.com> --- src/util/virhostdev.c | 4 ++-- src/util/virmdev.c| 13 - src/util/virmdev.h| 2 +- 3 files changed, 11 insertions(+), 8 deletions(-) diff --git a/src/util/virhostdev.c b/src/util/virhostdev.c index 2c557f5bb..579563c3f

[libvirt] [PATCH 1/2] util: mdev: Use a local variable instead of an invalid pointer reference

2017-04-28 Thread Erik Skultety
calling the function. The fact that it works now is just a coincidence and a bug in virMediatedDeviceListAdd that needs to be fixed in a separate commit. Therefore, use a local variable to hold data, rather than accessing the pointer later. Signed-off-by: Erik Skultety <eskul...@redhat.com> --

Re: [libvirt] [PATCH 0/5] A few fixes and improvements to the nodedev driver

2017-08-17 Thread Erik Skultety
On Wed, Jul 26, 2017 at 08:43:59AM +0200, Erik Skultety wrote: > These are just the few I came across when working on another nodedev-related > series. > > Erik Skultety (5): > nodedev: mdev: Report an error when virFileResolveLink fails > nodedev: udev: Remove the udevE

Re: [libvirt] [PATCH V2 2/2] Don't autogenerate seclabels of type 'none'

2017-08-18 Thread Erik Skultety
On Fri, Aug 18, 2017 at 12:18:20AM -0600, Jim Fehlig wrote: > On 08/17/2017 02:17 AM, Erik Skultety wrote: > > On Wed, Aug 16, 2017 at 05:54:08PM -0600, Jim Fehlig wrote: > > > When security drivers are active but confinement is not enabled, > > > there is no need to

Re: [libvirt] [PATCH] docs: Improve PCI topology and hotplug guidelines

2017-08-18 Thread Erik Skultety
On Thu, Aug 17, 2017 at 02:24:14PM +0200, Andrea Bolognani wrote: > Address some minor flaws in the original document that > were pointed out during review. > > Signed-off-by: Andrea Bolognani > --- > docs/pci-hotplug.html.in | 46

Re: [libvirt] [PATCH] qemu: don't check whether offline migration is safe

2017-08-18 Thread Erik Skultety
On Thu, Aug 17, 2017 at 06:53:45PM +0200, Pavel Hrdina wrote: > Offline migration transfers only the domain definition. > > Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1449715 > > Signed-off-by: Pavel Hrdina ACK Erik -- libvir-list mailing list

Re: [libvirt] [PATCH 5/5] nodedev: Protect every access to udev_monitor by locking the driver

2017-08-17 Thread Erik Skultety
On Tue, Aug 01, 2017 at 04:13:55PM -0400, John Ferlan wrote: > > > On 07/26/2017 02:44 AM, Erik Skultety wrote: > > Since @udev_monitor isn't immutable within the driver, we need to > > protect every access to it by locking the driver, so that no spurious > > action cha

[libvirt] [PATCH v4 0/6] Add mdev reporting capability to the nodedev driver

2017-05-15 Thread Erik Skultety
virsh man page to include mdev and mdev_types within the list of supported capabilities Erik Skultety (6): mdev: Pass a uuidstr rather than an mdev object to some util functions nodedev: conf: Split PCI sub-capability parsing to separate methods nodedev: Introduce new mdev_types and mdev nodedev

[libvirt] [PATCH v4 2/6] nodedev: conf: Split PCI sub-capability parsing to separate methods

2017-05-15 Thread Erik Skultety
Since there's at least SRIOV and MDEV sub-capabilities to be parsed, let's make the code more readable by splitting it to several logical blocks. Signed-off-by: Erik Skultety <eskul...@redhat.com> --- src/conf/node_device_conf.c | 142 ++-- 1 file c

[libvirt] [PATCH v4 6/6] docs: Document the mediated devices within the nodedev driver

2017-05-15 Thread Erik Skultety
Signed-off-by: Erik Skultety <eskul...@redhat.com> --- docs/drvnodedev.html.in | 168 +++- tools/virsh.pod | 7 +- 2 files changed, 171 insertions(+), 4 deletions(-) diff --git a/docs/drvnodedev.html.in b/docs/drvnodedev.html.in

[libvirt] [PATCH v4 1/6] mdev: Pass a uuidstr rather than an mdev object to some util functions

2017-05-15 Thread Erik Skultety
. Signed-off-by: Erik Skultety <eskul...@redhat.com> --- src/qemu/qemu_domain.c | 8 +--- src/security/security_apparmor.c | 10 +- src/security/security_dac.c | 20 ++-- src/security/security_selinux.c | 20 ++-- src/util/vir

[libvirt] [PATCH v4 5/6] nodedev: Introduce mdev capability for mediated devices

2017-05-15 Thread Erik Skultety
device XML: mdev_4b20d080_1b54_4048_85b3_a6a62d165c01 /sys/devices/.../4b20d080-1b54-4048-85b3-a6a62d165c01 pci__06_00_0 vfio_mdev Signed-off-by: Erik Skultety <eskul...@redhat.com> --- docs/schemas/nodedev.rng | 17 + sr

[libvirt] [PATCH v4 3/6] nodedev: Introduce new mdev_types and mdev nodedev capabilities

2017-05-15 Thread Erik Skultety
of mdev devices, since one day libvirt might be actually able to create the mdev devices in an automated way (just like we do for NPIV/vHBA). Signed-off-by: Erik Skultety <eskul...@redhat.com> --- include/libvirt/libvirt-nodedev.h| 2 ++ src/conf/node_device_conf.c | 10 +

[libvirt] [PATCH v4 4/6] nodedev: Introduce the mdev capability to a PCI parent device

2017-05-15 Thread Erik Skultety
: ... ... optional_vendor_supplied_codename vfio-pci NUM ... ... ... Signed-off-by: Erik Skultety <eskul...@redhat.com> --- docs/schemas/nodedev.rng | 26 + src/conf/node_device_

Re: [libvirt] [PATCH] nodedev_udev: Fix missing events when kernel report lots of udev events within a short time

2017-05-10 Thread Erik Skultety
On Tue, May 09, 2017 at 10:09:07AM +0800, ZhiPeng Lu wrote: > From: "ning.bo" > > When create Virtual Function for Inter XL710 use below commands: > for i in `seq 0 1`; do > echo 63 > > /sys/devices/pci:00/:00:03.2/:07:00.$i/sriov_numvfs > done > for i in

Re: [libvirt] [PATCH] virsh: Add --tls description for the virsh man page

2017-05-11 Thread Erik Skultety
On Wed, May 10, 2017 at 10:14:30AM -0400, John Ferlan wrote: > https://bugzilla.redhat.com/show_bug.cgi?id=1448806 > > Commit id '6a8d898d' neglected to update the man page. > > Signed-off-by: John Ferlan <jfer...@redhat.com> Reviewed-by: Erik Skultety <eskul...@red

[libvirt] [PATCH] qemu: Provide a much clearer message on device hot-plug

2017-05-11 Thread Erik Skultety
Adjust the current message to make it clear, that it is the hot-plug operation that is unsupported with the given host device type. https://bugzilla.redhat.com/show_bug.cgi?id=1450072 Signed-off-by: Erik Skultety <eskul...@redhat.com> --- src/qemu/qemu_hotplug.c | 10 ++ 1 file c

Re: [libvirt] [PATCH] nodedev_udev: Fix missing events when kernel report lots of udev events within a short time

2017-05-10 Thread Erik Skultety
On Wed, May 10, 2017 at 12:44:22PM +0100, Daniel P. Berrange wrote: > On Wed, May 10, 2017 at 01:38:00PM +0200, Erik Skultety wrote: > > On Tue, May 09, 2017 at 10:09:07AM +0800, ZhiPeng Lu wrote: > > > From: "ning.bo" <ning@zte.com.cn> > > > > &g

[libvirt] [PATCH] Post-release version bump to 3.4.0

2017-05-09 Thread Erik Skultety
Signed-off-by: Erik Skultety <eskul...@redhat.com> --- Pushed as trivial. configure.ac | 2 +- docs/news.xml | 8 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/configure.ac b/configure.ac index 0b564a030..3329b1781 100644 --- a/configure.ac +++ b/configure.ac @@

Re: [libvirt] [PATCH v4 4/6] nodedev: Introduce the mdev capability to a PCI parent device

2017-05-18 Thread Erik Skultety
On Wed, May 17, 2017 at 05:22:45PM -0400, John Ferlan wrote: > > > On 05/15/2017 08:10 AM, Erik Skultety wrote: > > The parent device needs to report the generic stuff about the supported > > mediated devices types, like device API, available instances, type name, > >

Re: [libvirt] [PATCH v4 4/6] nodedev: Introduce the mdev capability to a PCI parent device

2017-05-18 Thread Erik Skultety
On Thu, May 18, 2017 at 06:48:48AM -0400, John Ferlan wrote: > [...] > > >>> +static int > >>> +udevFillMdevType(struct udev_device *device, > >>> + const char *dir, > >>> + virNodeDevCapMdevTypePtr type) > >>> +{ > >>> +int ret = -1; > >>> +char *attrpath =

Re: [libvirt] [PATCH 2/3] util: Introduce virFileWaitForAccess

2017-06-21 Thread Erik Skultety
On Tue, Jun 20, 2017 at 12:21:48PM -0400, Dawid Zamirski wrote: > On Tue, 2017-06-20 at 17:45 +0200, Michal Privoznik wrote: > > On 06/20/2017 05:21 PM, Dawid Zamirski wrote: > > > On Tue, 2017-06-20 at 17:03 +0200, Erik Skultety wrote: > > > > Since we have a number

Re: [libvirt] [PATCH 3/3] nodedev: Work around the uevent race by hooking up virFileWaitForAccess

2017-06-21 Thread Erik Skultety
> > + */ > > +static int > > +udevWaitForAttrs(const char *sys_path, ...) > > +{ > > +int ret = -1; > > +const char *attr = NULL; > > +char *attr_path = NULL; > > +va_list args; > > + > > +va_start(args, sys_path); > > +while ((attr = va_arg(args, char *))) { > > +

Re: [libvirt] [PATCH 2/3] util: Introduce virFileWaitForAccess

2017-06-21 Thread Erik Skultety
On Tue, Jun 20, 2017 at 05:22:52PM +0200, Peter Krempa wrote: > On Tue, Jun 20, 2017 at 17:03:31 +0200, Erik Skultety wrote: > > Since we have a number of places where we workaround timing issues with > > devices, attributes (files in general) not being available at the time > &g

Re: [libvirt] [PATCH 0/3] Workaround mdev uevent race affecting node device driver

2017-06-21 Thread Erik Skultety
On Tue, Jun 20, 2017 at 01:59:59PM -0400, John Ferlan wrote: > > > On 06/20/2017 11:03 AM, Erik Skultety wrote: > > This series resolves https://bugzilla.redhat.com/show_bug.cgi?id=1463285 > > > > Erik Skultety (3): > > util: Report an error when virFileResolveLi

Re: [libvirt] RFC: Creating mediated devices with libvirt

2017-06-22 Thread Erik Skultety
; On Fri, 16 Jun 2017 11:32:04 -0400 > > > > Laine Stump <la...@redhat.com> wrote: > > > > > > > > > On 06/15/2017 02:42 PM, Alex Williamson wrote: > > > > > > On Thu, 15 Jun 2017 09:33:01 +0100 > > > > > > "Dani

Re: [libvirt] [PATCH] tests: virstoragetest: fix --without-yajl

2017-06-21 Thread Erik Skultety
On Wed, Jun 21, 2017 at 09:03:06AM -0400, Cole Robinson wrote: > Recently added JSON tests should be skipped if compiled --without-yajl > > https://bugzilla.redhat.com/show_bug.cgi?id=1463435 > Signed-off-by: Cole Robinson ACK Erik -- libvir-list mailing list

Re: [libvirt] RFC: Creating mediated devices with libvirt

2017-06-22 Thread Erik Skultety
[...] > > > > ^this is the thing we constantly keep discussing as everyone has a slightly > > different angle of view - libvirt does not implement any kind of policy, > > therefore the only "configuration" would be the PCI parent placement - you > > say > > what to do and we do it, no logic in

[libvirt] [PATCH] nodedev: udev: Drop udev monitor fd check in udevEventHandleCallback

2017-06-26 Thread Erik Skultety
We do perform that magical check every time an event is received, but unless we explicitly unref'd or disconnected the monitor, we should not get a spurious event from a different source. Signed-off-by: Erik Skultety <eskul...@redhat.com> --- This is just a poke patch, since I also c

Re: [libvirt] [PATCH] nodedev: udev: Drop udev monitor fd check in udevEventHandleCallback

2017-06-26 Thread Erik Skultety
On Mon, Jun 26, 2017 at 01:12:03PM +0100, Daniel P. Berrange wrote: > On Mon, Jun 26, 2017 at 01:47:04PM +0200, Erik Skultety wrote: > > We do perform that magical check every time an event is received, but > > unless we explicitly unref'd or disconnected the monitor, we sho

[libvirt] [PATCH 1/3] util: Report an error when virFileResolveLinkHelper's lstat fails

2017-06-20 Thread Erik Skultety
://bugzilla.redhat.com/show_bug.cgi?id=1463285 Signed-off-by: Erik Skultety <eskul...@redhat.com> --- src/util/virfile.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/util/virfile.c b/src/util/virfile.c index d444b32f8..6bbcc3d15 100644 --- a/src/util/virfile.c +++ b/src/util/vir

[libvirt] [PATCH 3/3] nodedev: Work around the uevent race by hooking up virFileWaitForAccess

2017-06-20 Thread Erik Skultety
Signed-off-by: Erik Skultety <eskul...@redhat.com> --- src/node_device/node_device_udev.c | 48 +- 1 file changed, 47 insertions(+), 1 deletion(-) diff --git a/src/node_device/node_device_udev.c b/src/node_device/node_device_udev.c index 174124a1b..4f9ca0c67

[libvirt] [PATCH 2/3] util: Introduce virFileWaitForAccess

2017-06-20 Thread Erik Skultety
have to duplicate this ugly workaround even more. This is a prerequisite for https://bugzilla.redhat.com/show_bug.cgi?id=1463285. Signed-off-by: Erik Skultety <eskul...@redhat.com> --- src/libvirt_private.syms | 1 + src/util/virfile.c | 36 sr

[libvirt] [PATCH 0/3] Workaround mdev uevent race affecting node device driver

2017-06-20 Thread Erik Skultety
This series resolves https://bugzilla.redhat.com/show_bug.cgi?id=1463285 Erik Skultety (3): util: Report an error when virFileResolveLinkHelper's lstat fails util: Introduce virFileWaitForAccess nodedev: Work around the uevent race by hooking up virFileWaitForAccess src

Re: [libvirt] RFC: Creating mediated devices with libvirt

2017-06-23 Thread Erik Skultety
[...] > >> So, just for clarification of the concept, the device with ^this UUID will > >> have > >> had to be defined by the nodedev API by the time we start to edit the > >> domain > >> XML in this manner in which case the only thing the autocreate=yes would > >> do is > >> to actually create

[libvirt] [PATCH] nodedev: mdev: Fix build caused by symbol shadowing

2017-05-18 Thread Erik Skultety
GCC 4.6 complains about a local declaration shadowing a global symbol. Signed-off-by: Erik Skultety <eskul...@redhat.com> --- Pushed as build breaker. src/node_device/node_device_udev.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/node_

Re: [libvirt] libvirt-question

2017-05-23 Thread Erik Skultety
On Tue, May 23, 2017 at 10:29:14AM +0800, zhun...@gmail.com wrote: > Hello,does libvirt provides API to get qemu process ID by vm ID or name??or > is there any methods to do this?? > thanks!! No, libvirt doesn't provide such API. Depends on what you really want to do. Libvirt uses domain objects

Re: [libvirt] libvirt-question

2017-05-23 Thread Erik Skultety
On Tue, May 23, 2017 at 10:29:14AM +0800, zhun...@gmail.com wrote: > Hello,does libvirt provides API to get qemu process ID by vm ID or name??or > is there any methods to do this?? > thanks!! Oh, and I also forgot to mention that these kinds of questions are better suited for libvirt-users

Re: [libvirt] [PATCH 2/2] qemu: don't relabel chardev source file if virtlogd is used

2017-05-23 Thread Erik Skultety
> > while (cur != NULL) { > > @@ -10628,6 +10630,8 @@ > > virDomainChrSourceDefParseXML(virDomainChrSourceDefPtr def, > > case VIR_DOMAIN_CHR_TYPE_UNIX: > > if (!append && def->type == VIR_DOMAIN_CHR_TYPE_FILE) > > append =

Re: [libvirt] [PATCH] node_device: fix memory leak in nodeDeviceSysfsGetSCSIHostCaps

2017-05-26 Thread Erik Skultety
On Thu, May 25, 2017 at 10:39:48PM -0400, Yi Wang wrote: > The @tmp is allocated in virVHBAGetConfig in virVHBAIsVportCapable > condition, it will lost when virVHBAGetConfig called again. > > Signed-off-by: Yi Wang > --- > src/node_device/node_device_linux_sysfs.c | 3 ++- >

[libvirt] [PATCH v2] nodedev: Increase the netlink socket buffer size to the one used by udev

2017-05-19 Thread Erik Skultety
e got root privileges. https://bugzilla.redhat.com/show_bug.cgi?id=1450960 Signed-off-by: ning.bo <ning@zte.com.cn> Signed-off-by: Erik Skultety <eskul...@redhat.com> --- Additionally, we might want to check for the errno, providing a specific message if such issue occurs again in a furth

Re: [libvirt] [PATCH v2] nodedev: Increase the netlink socket buffer size to the one used by udev

2017-05-29 Thread Erik Skultety
On Mon, May 29, 2017 at 02:16:17PM +0200, Michal Privoznik wrote: > On 05/19/2017 03:16 PM, Erik Skultety wrote: > > From: "ning.bo" <ning@zte.com.cn> > > > > When a number of SRIOV VFs (up to 128 on Intel XL710) is created: > > for i in `seq 0 1`

Re: [libvirt] [PATCH] util: fix memory leak in virSocketAddrFormatFull

2017-05-26 Thread Erik Skultety
On Thu, May 25, 2017 at 10:12:45PM -0400, Yi Wang wrote: > The @ipv6_host allocated in virAsprintf may be lost when virAsprintf > addrstr failed. > > Signed-off-by: Yi Wang > --- > src/util/virsocketaddr.c | 4 +++- > 1 file changed, 3 insertions(+), 1 deletion(-) > > diff

Re: [libvirt] [PATCH v2] nodedev: Increase the netlink socket buffer size to the one used by udev

2017-05-29 Thread Erik Skultety
On Fri, May 19, 2017 at 03:16:26PM +0200, Erik Skultety wrote: > From: "ning.bo" <ning@zte.com.cn> > Ping? > When a number of SRIOV VFs (up to 128 on Intel XL710) is created: > for i in `seq 0 1`; do > echo 63 > /sys/class/net//device/sriov_numvfs &g

[libvirt] [PATCH] qemu: Fix serial stub console allocation

2017-05-29 Thread Erik Skultety
When adding the aliased serial stub console, the structure wasn't properly allocated (VIR_ALLOC instead of virDomainChrDefNew) which then resulted in SIGSEGV in virDomainChrSourceIsEqual during a serial device coldplug. https://bugzilla.redhat.com/show_bug.cgi?id=1434278 Signed-off-by: Erik

[libvirt] [PATCH] qemu:json: Fix daemon crash on handling domain shutdown event

2017-05-30 Thread Erik Skultety
torJSONHandleShutdown 3 in qemuMonitorJSONIOProcessEvent 4 in qemuMonitorJSONIOProcessLine 5 in qemuMonitorJSONIOProcess 6 in qemuMonitorIOProcess 7 in qemuMonitorIO 8 in virEventPollDispatchHandles 9 in virEventPollRunOnce 10 in virEventRunDefaultImpl 11 in virNetDaemonRun 12 in main Signed-off-by: Erik Skulte

Re: [libvirt] [PATCH] qemu:json: Fix daemon crash on handling domain shutdown event

2017-05-30 Thread Erik Skultety
On Tue, May 30, 2017 at 10:53:44AM +0200, Peter Krempa wrote: > On Tue, May 30, 2017 at 10:41:17 +0200, Erik Skultety wrote: > > commit a8eba5036 added further checking of the guest shutdown cause, but > > this enhancement is available since qemu 2.10, causing a crash because > &

[libvirt] [PATCH] udev: Fix build on older platforms

2017-05-31 Thread Erik Skultety
Caused by commit @d1eea6c1 due to the missing symbol on older platforms. Signed-off-by: Erik Skultety <eskul...@redhat.com> --- Despite falling under build-breaker category, I'd like to get a proper review, since I'm not really familiar with autoconf and there might be a better fix.

Re: [libvirt] [PATCH] qemu: Don't special case mdevs when assigning PCI addresses

2017-06-02 Thread Erik Skultety
On Fri, Jun 02, 2017 at 08:20:12AM +0200, Andrea Bolognani wrote: > On Thu, 2017-06-01 at 21:24 -0400, Laine Stump wrote: > > > @@ -645,9 +645,6 @@ > > > qemuDomainDeviceCalculatePCIConnectFlags(virDomainDeviceDefPtr dev, > > >  return pcieFlags; > > >  } > > > > > > -

Re: [libvirt] [PATCH v4 3/3] interface: Convert virInterfaceObj to use virObjectLockable

2017-06-05 Thread Erik Skultety
On Sat, Jun 03, 2017 at 06:53:23AM -0400, John Ferlan wrote: > Now that we have a bit more control, let's convert our object into > a lockable object and let that magic handle the create and lock/unlock. > > This commit also introduces virInterfaceObjEndAPI in order to handle the > lock unlock and

Re: [libvirt] [PATCH v4 1/3] interface: Introduce virInterfaceObjNew

2017-06-05 Thread Erik Skultety
On Sat, Jun 03, 2017 at 06:53:21AM -0400, John Ferlan wrote: > Create/use a helper to perform the object allocation > > Signed-off-by: John Ferlan > --- > src/conf/virinterfaceobj.c | 31 +++ > 1 file changed, 23 insertions(+), 8 deletions(-) > >

Re: [libvirt] [PATCH v2] qemu: Fix serial stub console allocation

2017-06-07 Thread Erik Skultety
On Thu, Jun 01, 2017 at 02:57:59PM +0200, Erik Skultety wrote: > When adding the aliased serial stub console, the structure wasn't > properly allocated (VIR_ALLOC instead of virDomainChrDefNew) which then > resulted in SIGSEGV in virDomainChrSourceIsEqual during a serial device &

Re: [libvirt] [PATCH] qemu: Fix serial stub console allocation

2017-06-01 Thread Erik Skultety
On Mon, May 29, 2017 at 02:33:04PM +0200, Peter Krempa wrote: > On Mon, May 29, 2017 at 13:11:09 +0200, Erik Skultety wrote: > > When adding the aliased serial stub console, the structure wasn't > > properly allocated (VIR_ALLOC instead of virDomainChrDefNew) which then > >

[libvirt] [PATCH v2] qemu: Fix serial stub console allocation

2017-06-01 Thread Erik Skultety
When adding the aliased serial stub console, the structure wasn't properly allocated (VIR_ALLOC instead of virDomainChrDefNew) which then resulted in SIGSEGV in virDomainChrSourceIsEqual during a serial device coldplug. https://bugzilla.redhat.com/show_bug.cgi?id=1434278 Signed-off-by: Erik

Re: [libvirt] [PATCH] udev: Fix build on older platforms

2017-05-31 Thread Erik Skultety
On Wed, May 31, 2017 at 12:44:37PM +0200, Michal Privoznik wrote: > On 05/31/2017 12:22 PM, Erik Skultety wrote: > > Caused by commit @d1eea6c1 due to the missing symbol on older platforms. > > > > Signed-off-by: Erik Skultety <eskul...@redhat.com> > > --- > &

Re: [libvirt] Availability of libvirt-3.4.0 Release Candidate 2

2017-05-31 Thread Erik Skultety
On Wed, May 31, 2017 at 12:53:08PM +0200, Andrea Bolognani wrote: > On Tue, 2017-05-30 at 23:15 +0200, Daniel Veillard wrote: > >   As scheduled, I have tagged it in git and pushed signed tarball and rpms > > to the usual place: > > > >   ftp://libvirt.org/libvirt/ > > > >  no difference in my

Re: [libvirt] [PATCH v4 2/3] interface: Consume @def in virInterfaceObjNew

2017-06-06 Thread Erik Skultety
On Sat, Jun 03, 2017 at 06:53:22AM -0400, John Ferlan wrote: > Move the consumption of @def in virInterfaceObjNew and then handle that > in the error path of virInterfaceObjListAssignDef since it's caller expects > to need to free @def when NULL is returned and so would virInterfaceObjFree. > >

Re: [libvirt] [PATCH] fix memory leak in daemonUnixSocketPaths

2017-06-13 Thread Erik Skultety
On Mon, Jun 12, 2017 at 02:02:20AM -0400, Yi Wang wrote: > The @rundir is allocated in virGetUserRuntimeDirectory, may lost > when virFileMakePath failed. ACK. I slightly reworded the commit message and pushed. Thanks, Erik -- libvir-list mailing list libvir-list@redhat.com

Re: [libvirt] [PATCH] qemu/doc: Fix function name for handling events

2017-06-13 Thread Erik Skultety
On Mon, Jun 12, 2017 at 05:11:20PM +0200, Philipp Hahn wrote: > Insert missing "IO" into function name. > --- > src/qemu/EVENTHANDLERS.txt | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/src/qemu/EVENTHANDLERS.txt b/src/qemu/EVENTHANDLERS.txt > index

Re: [libvirt] [PATCH] daemonUnixSocketPaths: Unify exit paths

2017-06-13 Thread Erik Skultety
On Tue, Jun 13, 2017 at 03:09:47PM +0200, Michal Privoznik wrote: > Right now, there is a lot of exit points from the function. > Depending on their position they need to copy the same free > calls. This goes against our style where we usually have just one > exit point from the function which

Re: [libvirt] [PATCH] fix memory leak in daemonUnixSocketPaths

2017-06-13 Thread Erik Skultety
On Tue, Jun 13, 2017 at 01:55:24PM +0200, Michal Privoznik wrote: > On 06/13/2017 11:02 AM, Erik Skultety wrote: > > On Mon, Jun 12, 2017 at 02:02:20AM -0400, Yi Wang wrote: > >> The @rundir is allocated in virGetUserRuntimeDirectory, may lost > >> when virFileMake

Re: [libvirt] [PATCH] fix memory leak in daemonUnixSocketPaths

2017-06-13 Thread Erik Skultety
On Tue, Jun 13, 2017 at 03:06:14PM +0200, Michal Privoznik wrote: > On 06/13/2017 03:05 PM, Erik Skultety wrote: > > On Tue, Jun 13, 2017 at 01:55:24PM +0200, Michal Privoznik wrote: > >> On 06/13/2017 11:02 AM, Erik Skultety wrote: > >>> On Mon, Jun 12, 2017 at 0

Re: [libvirt] [PATCH] qemu: Don't try to use hugepages if not enabled

2017-06-14 Thread Erik Skultety
On Wed, Jun 14, 2017 at 10:48:33AM +0200, Michal Privoznik wrote: > https://bugzilla.redhat.com/show_bug.cgi?id=1214369 > > My fix 671d18594f4 was incomplete. If domain doesn't have > hugepages enalbed, because of missing condition we would still be s/enalbed/enabled > putting hugepages path

[libvirt] [PATCH v2] qemu: monitor: Fix a memory leak in qemuMonitorJSONAttachCharDevCommand

2017-06-14 Thread Erik Skultety
@backend is cleared before we hit the cleanup label. Signed-off-by: Erik Skultety <eskul...@redhat.com> --- src/qemu/qemu_monitor_json.c | 41 - 1 file changed, 20 insertions(+), 21 deletions(-) diff --git a/src/qemu/qemu_monitor_json.c b/sr

Re: [libvirt] [PATCH] qemu: monitor: Fix a memory leak in qemuMonitorJSONAttachCharDevCommand

2017-06-14 Thread Erik Skultety
On Tue, Jun 13, 2017 at 06:17:55PM +0200, Pavel Hrdina wrote: > On Tue, Jun 13, 2017 at 06:01:17PM +0200, Erik Skultety wrote: > > With the current logic, we only free @tlsalias as part of the error > > label and would have to free it explicitly earlier in the code. Convert >

[libvirt] RFC: Creating mediated devices with libvirt

2017-06-14 Thread Erik Skultety
Hi all, so there's been an off-list discussion about finally implementing creation of mediated devices with libvirt and it's more than desired to get as many opinions on that as possible, so please do share your ideas. This did come up already as part of some older threads ([1] for example), so

[libvirt] [PATCH] qemu: monitor: Fix a memory leak in qemuMonitorJSONAttachCharDevCommand

2017-06-13 Thread Erik Skultety
the success road to avoid SIGSEGV, since JSON object append operation consumes pointers. Signed-off-by: Erik Skultety <eskul...@redhat.com> --- src/qemu/qemu_monitor_json.c | 47 ++-- 1 file changed, 23 insertions(+), 24 deletions(-) diff --git a/sr

<    7   8   9   10   11   12   13   14   15   16   >