Re: [libvirt] [libvirt-users] JVM crashes during GC

2019-04-23 Thread Sachin Soman
[Update] Further debugging I have found that the problematic objects are the " virConnectCredential" instances; these are created as part of the callback procedure. If I keep these instances from getting GC'ed, there are no issues. Also, as part of testing with esx driver, I see two instances of "

Re: [libvirt] [Qemu-devel] [PATCH 1/2] vfio/mdev: add version field as mandatory attribute for mdev device

2019-04-23 Thread Neo Jia
On Tue, Apr 23, 2019 at 11:39:39AM +0100, Daniel P. Berrangé wrote: > On Fri, Apr 19, 2019 at 04:35:04AM -0400, Yan Zhao wrote: > > device version attribute in mdev sysfs is used by user space software > > (e.g. libvirt) to query device compatibility for live migration of VFIO > > mdev devices. Thi

Re: [libvirt] [PATCH 1/2] vfio/mdev: add version field as mandatory attribute for mdev device

2019-04-23 Thread Yan Zhao
On Tue, Apr 23, 2019 at 11:02:56PM +0800, Alex Williamson wrote: > On Tue, 23 Apr 2019 01:41:57 -0400 > Yan Zhao wrote: > > > On Tue, Apr 23, 2019 at 09:21:00AM +0800, Alex Williamson wrote: > > > On Mon, 22 Apr 2019 21:01:52 -0400 > > > Yan Zhao wrote: > > > > > > > On Mon, Apr 22, 2019 at 10:3

Re: [libvirt] [Qemu-devel] [PATCH 1/2] vfio/mdev: add version field as mandatory attribute for mdev device

2019-04-23 Thread Yan Zhao
On Tue, Apr 23, 2019 at 06:24:19PM +0800, Daniel P. Berrangé wrote: > On Tue, Apr 23, 2019 at 01:41:57AM -0400, Yan Zhao wrote: > > On Tue, Apr 23, 2019 at 09:21:00AM +0800, Alex Williamson wrote: > > > On Mon, 22 Apr 2019 21:01:52 -0400 > > > Yan Zhao wrote: > > > > > > > On Mon, Apr 22, 2019 at

Re: [libvirt] [PATCH 1/2] vfio/mdev: add version field as mandatory attribute for mdev device

2019-04-23 Thread Yan Zhao
On Tue, Apr 23, 2019 at 05:59:32PM +0800, Cornelia Huck wrote: > On Fri, 19 Apr 2019 04:35:04 -0400 > Yan Zhao wrote: > > > device version attribute in mdev sysfs is used by user space software > > (e.g. libvirt) to query device compatibility for live migration of VFIO > > mdev devices. This attr

Re: [libvirt] [PATCH 2/2] drm/i915/gvt: export mdev device version to sysfs for Intel vGPU

2019-04-23 Thread Yan Zhao
On Tue, Apr 23, 2019 at 07:39:11PM +0800, Cornelia Huck wrote: > On Fri, 19 Apr 2019 04:35:59 -0400 > Yan Zhao wrote: > > > This feature implements the version attribute for Intel's vGPU mdev > > devices. > > > > version attribute is rw. It is queried by userspace software like libvirt > > to che

Re: [libvirt] [PATCH v4 04/29] network: use 'bridge' as actual type instead of 'network'

2019-04-23 Thread Laine Stump
On 4/17/19 1:19 PM, Daniel P. Berrangé wrote: Ports allocated on virtual networks with type=nat|route|open all get given an actual type of 'network'. Only ports in networks with type=bridge use an actual type of 'bridge'. This distinction makes little sense since the virtualization drivers will

Re: [libvirt] [PATCH] networkStartNetworkVirtual: Don't overwrite error in 'err5'

2019-04-23 Thread Peter Krempa
On Tue, Apr 23, 2019 at 17:14:27 +0200, Peter Krempa wrote: > Now the proper review: > > On Tue, Apr 23, 2019 at 16:21:49 +0200, Michal Privoznik wrote: > > If there's an error when setting up QoS on a bridge the control > > jumps over to 'err5' label. Here, the virNetDevBandwidthClear() > > is ca

Re: [libvirt] [PATCH] networkStartNetworkVirtual: Don't overwrite error in 'err5'

2019-04-23 Thread Peter Krempa
Now the proper review: On Tue, Apr 23, 2019 at 16:21:49 +0200, Michal Privoznik wrote: > If there's an error when setting up QoS on a bridge the control > jumps over to 'err5' label. Here, the virNetDevBandwidthClear() > is called to clear out any partially set QoS. This function can > also report

Re: [libvirt] [PATCH 1/2] vfio/mdev: add version field as mandatory attribute for mdev device

2019-04-23 Thread Alex Williamson
On Tue, 23 Apr 2019 01:41:57 -0400 Yan Zhao wrote: > On Tue, Apr 23, 2019 at 09:21:00AM +0800, Alex Williamson wrote: > > On Mon, 22 Apr 2019 21:01:52 -0400 > > Yan Zhao wrote: > > > > > On Mon, Apr 22, 2019 at 10:39:50PM +0800, Alex Williamson wrote: > > > > On Fri, 19 Apr 2019 04:35:04 -0

Re: [libvirt] [Qemu-devel] [PATCH 1/2] vfio/mdev: add version field as mandatory attribute for mdev device

2019-04-23 Thread Daniel P . Berrangé
On Tue, Apr 23, 2019 at 08:48:52AM -0600, Alex Williamson wrote: > On Tue, 23 Apr 2019 14:44:00 +0100 > Daniel P. Berrangé wrote: > > > On Tue, Apr 23, 2019 at 06:35:40AM -0600, Alex Williamson wrote: > > > On Tue, 23 Apr 2019 11:39:39 +0100 > > > Daniel P. Berrangé wrote: > > > > > > > On Fr

Re: [libvirt] [Qemu-devel] [PATCH 1/2] vfio/mdev: add version field as mandatory attribute for mdev device

2019-04-23 Thread Alex Williamson
On Tue, 23 Apr 2019 14:44:00 +0100 Daniel P. Berrangé wrote: > On Tue, Apr 23, 2019 at 06:35:40AM -0600, Alex Williamson wrote: > > On Tue, 23 Apr 2019 11:39:39 +0100 > > Daniel P. Berrangé wrote: > > > > > On Fri, Apr 19, 2019 at 04:35:04AM -0400, Yan Zhao wrote: > > > > +* version > > > >

Re: [libvirt] [PATCH] networkStartNetworkVirtual: Don't overwrite error in 'err5'

2019-04-23 Thread Peter Krempa
On Tue, Apr 23, 2019 at 16:21:49 +0200, Michal Privoznik wrote: > If there's an error when setting up QoS on a bridge the control > jumps over to 'err5' label. Here, the virNetDevBandwidthClear() > is called to clear out any partially set QoS. This function can > also report an error which would ov

Re: [libvirt] [PATCH 0/3] Emit event on lease attach/detach

2019-04-23 Thread Cole Robinson
On 4/23/19 9:32 AM, Daniel P. Berrangé wrote: > On Tue, Apr 23, 2019 at 03:06:22PM +0200, Michal Privoznik wrote: >> On 4/16/19 1:39 AM, Cole Robinson wrote: >>> On 4/5/19 3:57 AM, Michal Privoznik wrote: Unfortunately, we can't emit VIR_DOMAIN_EVENT_ID_DEVICE_ADDED or VIR_DOMAIN_EVENT_ID

[libvirt] [PATCH] networkStartNetworkVirtual: Don't overwrite error in 'err5'

2019-04-23 Thread Michal Privoznik
If there's an error when setting up QoS on a bridge the control jumps over to 'err5' label. Here, the virNetDevBandwidthClear() is called to clear out any partially set QoS. This function can also report an error which would overwrite the actual error that caused us jumping here. 🤦 Use virErrorPres

Re: [libvirt] [Qemu-devel] [PATCH 1/2] vfio/mdev: add version field as mandatory attribute for mdev device

2019-04-23 Thread Daniel P . Berrangé
On Tue, Apr 23, 2019 at 06:35:40AM -0600, Alex Williamson wrote: > On Tue, 23 Apr 2019 11:39:39 +0100 > Daniel P. Berrangé wrote: > > > On Fri, Apr 19, 2019 at 04:35:04AM -0400, Yan Zhao wrote: > > > +* version > > > + > > > + This attribute is rw. It is used to check whether two devices are >

Re: [libvirt] [PATCH v1] network: Convert to virErrorRestore/virErrorPreserveLast

2019-04-23 Thread Michal Privoznik
On 4/17/19 6:11 AM, Syed Humaid wrote: Replaced usage of virSaveLastError and virSetError/virFreeError with virErrorPreserveLast and virErrorRestore respectively. Signed-off-by: Syed Humaid --- src/network/bridge_driver.c | 15 ++- 1 file changed, 6 insertions(+), 9 deletions(-)

Re: [libvirt] [PATCH 0/3] Emit event on lease attach/detach

2019-04-23 Thread Daniel P . Berrangé
On Tue, Apr 23, 2019 at 03:06:22PM +0200, Michal Privoznik wrote: > On 4/16/19 1:39 AM, Cole Robinson wrote: > > On 4/5/19 3:57 AM, Michal Privoznik wrote: > > > Unfortunately, we can't emit VIR_DOMAIN_EVENT_ID_DEVICE_ADDED or > > > VIR_DOMAIN_EVENT_ID_DEVICE_REMOVED event because that carries devi

Re: [libvirt] [PATCH 0/3] Emit event on lease attach/detach

2019-04-23 Thread Michal Privoznik
On 4/16/19 1:39 AM, Cole Robinson wrote: On 4/5/19 3:57 AM, Michal Privoznik wrote: Unfortunately, we can't emit VIR_DOMAIN_EVENT_ID_DEVICE_ADDED or VIR_DOMAIN_EVENT_ID_DEVICE_REMOVED event because that carries device alias within itself and leases don't have one. Hmm. I understand that aren

Re: [libvirt] [Qemu-devel] [PATCH 1/2] vfio/mdev: add version field as mandatory attribute for mdev device

2019-04-23 Thread Alex Williamson
On Tue, 23 Apr 2019 11:39:39 +0100 Daniel P. Berrangé wrote: > On Fri, Apr 19, 2019 at 04:35:04AM -0400, Yan Zhao wrote: > > device version attribute in mdev sysfs is used by user space software > > (e.g. libvirt) to query device compatibility for live migration of VFIO > > mdev devices. This att

Re: [libvirt] [libvirt-users] JVM crashes during GC

2019-04-23 Thread Daniel P . Berrangé
On Tue, Apr 23, 2019 at 05:02:12PM +0530, Sachin Soman wrote: > [Update] > > Instead of passing an auth callback to Connect, if I store the credentials > in an INI file and pass the file path as authfile URI parameter, I dont see > these errors. That makes it sound like some kind of memory handli

Re: [libvirt] [PATCH 2/2] drm/i915/gvt: export mdev device version to sysfs for Intel vGPU

2019-04-23 Thread Cornelia Huck
On Fri, 19 Apr 2019 04:35:59 -0400 Yan Zhao wrote: > This feature implements the version attribute for Intel's vGPU mdev > devices. > > version attribute is rw. It is queried by userspace software like libvirt > to check whether two vGPUs are compatible for live migration. > > It consists of tw

Re: [libvirt] [libvirt-users] JVM crashes during GC

2019-04-23 Thread Sachin Soman
[Update] Instead of passing an auth callback to Connect, if I store the credentials in an INI file and pass the file path as authfile URI parameter, I dont see these errors. Thanks & Regards Sachin Soman On Sat, Apr 20, 2019 at 2:00 PM Sachin Soman wrote: > Did you get a chance to debug the

Re: [libvirt] [Qemu-devel] [PATCH 1/2] vfio/mdev: add version field as mandatory attribute for mdev device

2019-04-23 Thread Daniel P . Berrangé
On Fri, Apr 19, 2019 at 04:35:04AM -0400, Yan Zhao wrote: > device version attribute in mdev sysfs is used by user space software > (e.g. libvirt) to query device compatibility for live migration of VFIO > mdev devices. This attribute is mandatory if a mdev device supports live > migration. > > It

Re: [libvirt] [PATCH 2/3] libxlDriverConfigDispose: Free @configBaseDir too

2019-04-23 Thread Peter Krempa
On Tue, Apr 23, 2019 at 09:39:32 +0200, Michal Privoznik wrote: > Allocated in libxlDriverConfigNew(), the @configBaseDir is never > freed. > > 13 bytes in 1 blocks are definitely lost in loss record 36 of 125 > at 0x483579F: malloc (vg_replace_malloc.c:299) > by 0x8012469: strdup (strdup

Re: [libvirt] [PATCH 1/3] qemucaps2xmltest: Don't leak @binary

2019-04-23 Thread Peter Krempa
On Tue, Apr 23, 2019 at 09:39:31 +0200, Michal Privoznik wrote: > There's no need to keep @binary around. > virQEMUCapsInitGuestFromBinary() duplicates the string anyway. > > 1,002 bytes in 36 blocks are definitely lost in loss record 54 of 59 > at 0x483579F: malloc (vg_replace_malloc.c:299)

Re: [libvirt] [Qemu-devel] [PATCH 1/2] vfio/mdev: add version field as mandatory attribute for mdev device

2019-04-23 Thread Daniel P . Berrangé
On Tue, Apr 23, 2019 at 01:41:57AM -0400, Yan Zhao wrote: > On Tue, Apr 23, 2019 at 09:21:00AM +0800, Alex Williamson wrote: > > On Mon, 22 Apr 2019 21:01:52 -0400 > > Yan Zhao wrote: > > > > > On Mon, Apr 22, 2019 at 10:39:50PM +0800, Alex Williamson wrote: > > > > On Fri, 19 Apr 2019 04:35:04 -

Re: [libvirt] [PATCH 1/2] vfio/mdev: add version field as mandatory attribute for mdev device

2019-04-23 Thread Cornelia Huck
On Fri, 19 Apr 2019 04:35:04 -0400 Yan Zhao wrote: > device version attribute in mdev sysfs is used by user space software > (e.g. libvirt) to query device compatibility for live migration of VFIO > mdev devices. This attribute is mandatory if a mdev device supports live > migration. > > It cons

Re: [libvirt] [PATCH 1/2] vfio/mdev: add version field as mandatory attribute for mdev device

2019-04-23 Thread Cornelia Huck
On Tue, 23 Apr 2019 01:41:57 -0400 Yan Zhao wrote: > On Tue, Apr 23, 2019 at 09:21:00AM +0800, Alex Williamson wrote: > > On Mon, 22 Apr 2019 21:01:52 -0400 > > Yan Zhao wrote: > > > > > On Mon, Apr 22, 2019 at 10:39:50PM +0800, Alex Williamson wrote: > > > > On Fri, 19 Apr 2019 04:35:04 -0

Re: [libvirt] [PATCH 1/2] vfio/mdev: add version field as mandatory attribute for mdev device

2019-04-23 Thread Yan Zhao
On Mon, Apr 22, 2019 at 10:39:50PM +0800, Alex Williamson wrote: > On Fri, 19 Apr 2019 04:35:04 -0400 > Yan Zhao wrote: > > > device version attribute in mdev sysfs is used by user space software > > (e.g. libvirt) to query device compatibility for live migration of VFIO > > mdev devices. This at

[libvirt] [PATCH 2/2] drm/i915/gvt: export mdev device version to sysfs for Intel vGPU

2019-04-23 Thread Yan Zhao
This feature implements the version attribute for Intel's vGPU mdev devices. version attribute is rw. It is queried by userspace software like libvirt to check whether two vGPUs are compatible for live migration. It consists of two parts: common part and vendor proprietary part. common part: 32 b

Re: [libvirt] [PATCH 1/2] vfio/mdev: add version field as mandatory attribute for mdev device

2019-04-23 Thread Yan Zhao
On Tue, Apr 23, 2019 at 09:21:00AM +0800, Alex Williamson wrote: > On Mon, 22 Apr 2019 21:01:52 -0400 > Yan Zhao wrote: > > > On Mon, Apr 22, 2019 at 10:39:50PM +0800, Alex Williamson wrote: > > > On Fri, 19 Apr 2019 04:35:04 -0400 > > > Yan Zhao wrote: > > > > > > > device version attribute

[libvirt] [PATCH 1/2] vfio/mdev: add version field as mandatory attribute for mdev device

2019-04-23 Thread Yan Zhao
device version attribute in mdev sysfs is used by user space software (e.g. libvirt) to query device compatibility for live migration of VFIO mdev devices. This attribute is mandatory if a mdev device supports live migration. It consists of two parts: common part and vendor proprietary part. commo

Re: [libvirt] [PATCH 2/2] drm/i915/gvt: export mdev device version to sysfs for Intel vGPU

2019-04-23 Thread Yan Zhao
On Mon, Apr 22, 2019 at 04:37:39PM +0800, Zhenyu Wang wrote: > On 2019.04.19 04:35:59 -0400, Yan Zhao wrote: > > This feature implements the version attribute for Intel's vGPU mdev > > devices. > > > > version attribute is rw. It is queried by userspace software like libvirt > > to check whether t

[libvirt] [PATCH 0/2] introduction of version attribute for VFIO live migration

2019-04-23 Thread Yan Zhao
This patchset introduces a version attribute under sysfs of VFIO Mediated devices. This version attribute is used by user space software like libvirt to determine whether two mdev devices are compatible for live migration before starting live migration. Patch 1 defines version attribute as mandat

Re: [libvirt] [PATCH 0/3] qemu: monitor: detect more snapshot errors

2019-04-23 Thread Michal Privoznik
On 4/10/19 8:29 PM, Cole Robinson wrote: qemu in Fedora 30 rejects migration if the VM has nested VMX configured. This means managedsave and snapshots are rejected too. Unfortunately the scraping we need to resort to with the text monitor snapshot commands is not detecting that 'savevm' actually

Re: [libvirt] [PATCH 3/3] vmx: Free @firmware in virVMXParseConfig

2019-04-23 Thread Pino Toscano
On Tuesday, 23 April 2019 09:39:33 CEST Michal Privoznik wrote: > The @firmware string is allocated, but never freed. > > 4 bytes in 1 blocks are definitely lost in loss record 1 of 44 > at 0x483579F: malloc (vg_replace_malloc.c:299) > by 0x76FB469: strdup (strdup.c:42) > by 0x497B6DE

Re: [libvirt] New Feature: Intel MKTME Support

2019-04-23 Thread Mohammed, Karimullah
Hi Daniel, Just FYI we figured out how to generate domain and qemucaps xml files. For qemucaps xml files , we ran the libvirtd process and located the xml files in /var/cache/libvirtd/qemu/capabilities directory. And was able to generate domaincaps using virsh command under tools directory. We ar

[libvirt] [PATCH 1/3] qemucaps2xmltest: Don't leak @binary

2019-04-23 Thread Michal Privoznik
There's no need to keep @binary around. virQEMUCapsInitGuestFromBinary() duplicates the string anyway. 1,002 bytes in 36 blocks are definitely lost in loss record 54 of 59 at 0x483579F: malloc (vg_replace_malloc.c:299) by 0x796B1C7: vasprintf (vasprintf.c:73) by 0x4C3F2C6: virVasprint

[libvirt] [PATCH 3/3] vmx: Free @firmware in virVMXParseConfig

2019-04-23 Thread Michal Privoznik
The @firmware string is allocated, but never freed. 4 bytes in 1 blocks are definitely lost in loss record 1 of 44 at 0x483579F: malloc (vg_replace_malloc.c:299) by 0x76FB469: strdup (strdup.c:42) by 0x497B6DE: virStrdup (virstring.c:966) by 0x48F6FD3: virConfGetValueString (virco

[libvirt] [PATCH 0/3] Couple of mem leak fixes

2019-04-23 Thread Michal Privoznik
*** BLURB HERE *** Michal Prívozník (3): qemucaps2xmltest: Don't leak @binary libxlDriverConfigDispose: Free @configBaseDir too vmx: Free @firmware in virVMXParseConfig src/libxl/libxl_conf.c | 1 + src/vmx/vmx.c| 1 + tests/qemucaps2xmltest.c | 3 +-- 3 files changed, 3 inse

[libvirt] [PATCH 2/3] libxlDriverConfigDispose: Free @configBaseDir too

2019-04-23 Thread Michal Privoznik
Allocated in libxlDriverConfigNew(), the @configBaseDir is never freed. 13 bytes in 1 blocks are definitely lost in loss record 36 of 125 at 0x483579F: malloc (vg_replace_malloc.c:299) by 0x8012469: strdup (strdup.c:42) by 0x52926DE: virStrdup (virstring.c:966) by 0x11D46B: libxlD