[libvirt] [PATCH] qemu: Fix memory leak in processGuestPanicEvent

2018-01-26 Thread John Ferlan
After processing the processEvent->data for a qemuProcessEventHandler callout, it's expected that the called processEvent->eventType helper will perform the proper free on the data field. In this case it's a qemuMonitorEventPanicInfoPtr. Signed-off-by: John Ferlan ---

[libvirt] [PATCH] fix regex to check CN from server certificate

2018-01-26 Thread Tiago M. Vieira
Currently when the script validates the PKI files and the certificate 'Subject:' field contains RDNs after the Common Name (CN), these values are also included, creating a false result that the CN is not correct. A small change to the sed regex fixes this issue, by extracting only the value for

[libvirt] [PATCH v2] vbox: fix SEGV during dumpxml of a serial port

2018-01-26 Thread Laine Stump
commit 77a12987a48 changed the "virDomainChrSourceDef source" inside virDomainChrDef to "virDomainChrSourceDefPtr source", and started allocating source inside virDomainChrDefNew(), but vboxDumpSerial() was allocating a virDomainChrDef with a simple VIR_ALLOC() (i.e. never calling

[libvirt] [RFC v2 REPOST] arm64: KVM: KVM API extensions for SVE

2018-01-26 Thread Dave Martin
Hi all, Reposting this to give people another chance to comment before I move ahead... ---8<--- Here's a second, slightly more complete stab at the KVM API extensions for SVE. I haven't started implementing in earnest yet, so any comments at this stage would be very helpful. [libvir-list

Re: [libvirt] [PATCH 0/6] port allocator: make used port bitmap global etc

2018-01-26 Thread Nikolay Shirokovskiy
ping On 20.12.2017 09:35, Nikolay Shirokovskiy wrote: > This patch set addresses issue described in [1] and the core of > changes go to the first patch. The others are cleanups and > refactorings. > > [1] https://www.redhat.com/archives/libvir-list/2017-December/msg00600.html > > Nikolay

Re: [libvirt] [REBASE PATCH v2 1/9] qemu: Add support for DUMP_COMPLETED event

2018-01-26 Thread Jiri Denemark
On Fri, Jan 26, 2018 at 08:43:38 -0500, John Ferlan wrote: > > > On 01/25/2018 11:59 AM, Jiri Denemark wrote: > > On Fri, Jan 19, 2018 at 14:53:08 -0500, John Ferlan wrote: > >> The event is fired when the domain memory only dump completes. > >> > >> Wire up the code to extract and send along

Re: [libvirt] [REBASE PATCH v2 8/9] qemu: Allow showing the dump progress for memory only dump

2018-01-26 Thread Jiri Denemark
On Fri, Jan 19, 2018 at 14:53:15 -0500, John Ferlan wrote: > https://bugzilla.redhat.com/show_bug.cgi?id=916061 > > If the QEMU version running is new enough (based on the DUMP_COMPLETED > event), then we can add a 'detach' boolean to the dump-guest-memory > command in order to tell QEMU to run

Re: [libvirt] [REBASE PATCH v2 6/9] qemu: Introduce qemuDomainGetJobInfoDumpStats

2018-01-26 Thread Jiri Denemark
On Fri, Jan 19, 2018 at 14:53:13 -0500, John Ferlan wrote: > Add an API to allow fetching the Dump statistics for the job > via the qemuDomainGetJobInfo API. > > Signed-off-by: John Ferlan > --- > src/qemu/qemu_driver.c | 56 >

[libvirt] [PATCH 07/10] nodedev: allow opening with nodedev:///system and nodedev:///session URIs

2018-01-26 Thread Daniel P . Berrangé
Allow the possibility of opening a connection to only the nodedev driver, by defining nodedev:///system and nodedev:///session URIs and registering a fake hypervisor driver that supports them. The hypervisor drivers can now directly open a nodedev driver connection at time of need, instead of

[libvirt] [PATCH 08/10] secret: allow opening with secret:///system and secret:///session URIs

2018-01-26 Thread Daniel P . Berrangé
Allow the possibility of opening a connection to only the secret driver, by defining secret:///system and secret:///session URIs and registering a fake hypervisor driver that supports them. The hypervisor drivers can now directly open a secret driver connection at time of need, instead of having

Re: [libvirt] [REBASE PATCH v2 1/9] qemu: Add support for DUMP_COMPLETED event

2018-01-26 Thread John Ferlan
On 01/25/2018 11:59 AM, Jiri Denemark wrote: > On Fri, Jan 19, 2018 at 14:53:08 -0500, John Ferlan wrote: >> The event is fired when the domain memory only dump completes. >> >> Wire up the code to extract and send along the status. >> >> Signed-off-by: John Ferlan >> --- >>

[libvirt] [PATCH 04/10] network: allow opening with network:///system and network:///session URIs

2018-01-26 Thread Daniel P . Berrangé
Allow the possibility of opening a connection to only the network driver, by defining network:///system and network:///session URIs and registering a fake hypervisor driver that supports them. The hypervisor drivers can now directly open a network driver connection at time of need, instead of

[libvirt] [PATCH 09/10] storage: open secret driver connection at time of use

2018-01-26 Thread Daniel P . Berrangé
Instead of passing around a virConnectPtr object, just open a connection to the secret driver at time of use. Opening connections on demand will be beneficial when the secret driver is in a separate daemon. It also solves the problem that a number of callers just pass in a NULL connection today

[libvirt] [PATCH 00/10] Enable direct use of secondary drivers

2018-01-26 Thread Daniel P . Berrangé
Currently the secondary drivers can only be used if you have a connection to a primary hypervisor driver. This series introduces explicit URIs that allow opening a connection that only talks to a specific secondary driver. In the future these URIs will resolve to individual daemons containing

[libvirt] [PATCH 01/10] storage: move driver registration back to end of the file

2018-01-26 Thread Daniel P . Berrangé
By convention the last thing in the driver.c files should be the driver callback table and function to register it. Signed-off-by: Daniel P. Berrangé --- src/storage/storage_driver.c | 172 +-- 1 file changed, 86 insertions(+), 86

[libvirt] [PATCH 05/10] nwfilter: allow opening with nwfilter:///system URI

2018-01-26 Thread Daniel P . Berrangé
Allow the possibility of opening a connection to only the storage driver, by defining a nwfilter:///system URI and registering a fake hypervisor driver that supports it. The hypervisor drivers can now directly open a nwfilter driver connection at time of need, instead of having to pass around a

[libvirt] [PATCH 02/10] storage: allow opening with storage:///system and storage:///session URIs

2018-01-26 Thread Daniel P . Berrangé
Allow the possibility of opening a connection to only the storage driver, by defining storage:///system and storage:///session URIs and registering a fake hypervisor driver that supports them. The hypervisor drivers can now directly open a storage driver connection at time of need, instead of

[libvirt] [PATCH 10/10] storage: remove virConnectPtr from all backend functions

2018-01-26 Thread Daniel P . Berrangé
Now that we can open connections to the secondary drivers on demand, there is no need to pass a virConnectPtr into all the backend functions. Signed-off-by: Daniel P. Berrangé --- src/storage/storage_backend.h | 45 ++---

[libvirt] [PATCH 06/10] interface: allow opening with interface:///system and interface:///session URIs

2018-01-26 Thread Daniel P . Berrangé
Allow the possibility of opening a connection to only the interface driver, by defining interface:///system and interface:///session URIs and registering a fake hypervisor driver that supports them. The hypervisor drivers can now directly open a interface driver connection at time of need,

[libvirt] [PATCH 03/10] network: move driver registration back to end of the file

2018-01-26 Thread Daniel P . Berrangé
By convention the last thing in the driver.c files should be the driver callback table and function to register it. Signed-off-by: Daniel P. Berrangé --- src/network/bridge_driver.c | 90 ++--- 1 file changed, 45 insertions(+), 45

Re: [libvirt] [REBASE PATCH v2 5/9] qemu: Introduce qemuDomainGetJobInfoMigrationStats

2018-01-26 Thread Jiri Denemark
On Fri, Jan 19, 2018 at 14:53:12 -0500, John Ferlan wrote: > Extract out the parts of qemuDomainGetJobStatsInternal that get > the migration stats. We're about to add the ability to get just > dump information. > > Signed-off-by: John Ferlan > --- > src/qemu/qemu_driver.c |

Re: [libvirt] [PATCHv4 RESEND] vhost-user: add support reconnect for vhost-user ports

2018-01-26 Thread Michal Privoznik
On 01/17/2018 05:14 PM, ZhiPeng Lu wrote: > For vhost-user ports, Open vSwitch acts as the server and QEMU the client. > When OVS crashes or restarts, the QEMU process should be reconnected to > OVS. > > Signed-off-by: ZhiPeng Lu > Signed-off-by: Michal Privoznik

Re: [libvirt] [PATCH 07/15] nodedev: Introduce virNodeDeviceCapsListExport

2018-01-26 Thread Wuzongyong (Euler Dept)
> -Original Message- > From: libvir-list-boun...@redhat.com [mailto:libvir-list- > boun...@redhat.com] On Behalf Of Erik Skultety > Sent: Thursday, January 25, 2018 5:24 PM > To: libvir-list@redhat.com > Cc: Erik Skultety > Subject: [libvirt] [PATCH 07/15] nodedev:

Re: [libvirt] [PATCH v5 00/16] Move qemu command line controller checks to qemuDomainDeviceDefValidateController* checks

2018-01-26 Thread John Ferlan
ping^2 Tks - John On 01/19/2018 01:27 PM, John Ferlan wrote: > > ping? > > Should still apply with current top. I can resend if requested. > > Tks, > > John > > On 01/05/2018 06:47 PM, John Ferlan wrote: >> v4: https://www.redhat.com/archives/libvir-list/2017-December/msg00401.html >> >>

Re: [libvirt] [PATCH 02/15] conf: nodedev: Rename virNodeDeviceCapMatch to virNodeDevObjHasCap

2018-01-26 Thread Michal Privoznik
On 01/25/2018 10:23 AM, Erik Skultety wrote: > We currently have 2 methods that do the capability matching. This should > be condensed to a single function and all the derivates should just call > into that using a proper type conversion. > > Signed-off-by: Erik Skultety >

Re: [libvirt] [PATCH 01/15] conf: nodedev: Rename virNodeDevObjHasCap to virNodeDevObjHasCapStr

2018-01-26 Thread Michal Privoznik
On 01/25/2018 10:23 AM, Erik Skultety wrote: > We currently have 2 methods that do the capability matching. This should > be condensed to a single function and all the derivates should just call > into that using a proper type conversion. > > Signed-off-by: Erik Skultety >

Re: [libvirt] [PATCH 03/15] conf: nodedev: Convert virNodeDevObjHasCapStr to a simple wrapper

2018-01-26 Thread Michal Privoznik
On 01/25/2018 10:23 AM, Erik Skultety wrote: > This patch drops the capability matching redundancy by simply converting > the string input to our internal types which are then in turn used for > the actual capability matching. > > Signed-off-by: Erik Skultety > --- >

Re: [libvirt] [PATCH 05/15] nodedev: Move the sysfs-related cap handling to node_device_conf.c

2018-01-26 Thread Michal Privoznik
On 01/25/2018 10:23 AM, Erik Skultety wrote: > The capabilities are defined/parsed/formatted/queried from this module, > no reason for 'update' not being part of the module as well. This also > involves some module-specific prefix changes. > This patch also drops the node_device_linux_sysfs module

Re: [libvirt] [PATCH 08/15] conf: nodedev: Refresh capabilities before touching them

2018-01-26 Thread Michal Privoznik
On 01/25/2018 10:23 AM, Erik Skultety wrote: > Most of them are static, however in case of PCI and SCSI_HOST devices, > the nested capabilities can change dynamically, e.g. due to a driver > change (from host_pci_driver -> vfio_pci). > > Signed-off-by: Erik Skultety >

Re: [libvirt] [PATCH 11/15] util: mdev: Introduce virMediatedDeviceTypeReadAttrs getter

2018-01-26 Thread Michal Privoznik
On 01/25/2018 10:23 AM, Erik Skultety wrote: > This should serve as a replacement for the existing udevFillMdevType > which is responsible for fetching the device type's attributes from the > sysfs interface. The problem with the existing solution is that it's > tied to the udev backend. > >

Re: [libvirt] [PATCH 04/15] nodedev: Drop the nodeDeviceSysfsGetSCSIHostCaps wrapper

2018-01-26 Thread Michal Privoznik
On 01/25/2018 10:23 AM, Erik Skultety wrote: > We can call directly the virNodeDeviceGetSCSIHostCaps helper instead. > > Signed-off-by: Erik Skultety > --- > src/conf/node_device_conf.c | 12 > src/node_device/node_device_driver.c | 2 +- >

Re: [libvirt] [PATCH 06/15] nodedev: Export nodeDeviceUpdateCaps from node_device_conf.c

2018-01-26 Thread Michal Privoznik
On 01/25/2018 10:23 AM, Erik Skultety wrote: > Since we moved the helpers from nodedev driver to src/conf, the actual > 'update' function using those helpers should be moved as well so that we > don't need to call back into the driver. > > Signed-off-by: Erik Skultety > ---

Re: [libvirt] [PATCH 09/15] util: mdev: Drop some unused symbols/includes from the header

2018-01-26 Thread Michal Privoznik
On 01/25/2018 10:23 AM, Erik Skultety wrote: > There were some leftovers from early development which never got used. > > Signed-off-by: Erik Skultety > --- > src/util/virmdev.h | 3 --- > 1 file changed, 3 deletions(-) ACK, nice. Michal -- libvir-list mailing list

Re: [libvirt] [PATCH 12/15] util: pci: Introduce virPCIGetMdevTypes helper

2018-01-26 Thread Michal Privoznik
On 01/25/2018 10:23 AM, Erik Skultety wrote: > This is a replacement for the existing udevPCIGetMdevTypesCap which is > static to the udev backend. This simple helper constructs the sysfs path > from the device's base path for each mdev type and queries the > corresponding attributes of that type.

Re: [libvirt] [PATCH 07/15] nodedev: Introduce virNodeDeviceCapsListExport

2018-01-26 Thread Michal Privoznik
On 01/25/2018 10:23 AM, Erik Skultety wrote: > Whether asking for a number of capabilities supported by a device or > listing them, it's handled essentially by a copy-paste code, so extract > the common stuff into this new helper which also updates all > capabilities just before touching them. >

Re: [libvirt] [PATCH 10/15] util: mdev: Introduce virMediatedDeviceType structure

2018-01-26 Thread Michal Privoznik
On 01/25/2018 10:23 AM, Erik Skultety wrote: > This is later going to replace the existing virNodeDevCapMdevType, since: > 1) it's going to couple related stuff in a single module > 2) util is supposed to contain helpers that are widely accessible across > the whole repository. > > Signed-off-by:

Re: [libvirt] [PATCH 14/15] conf: Replace usage of virNodeDevCapMdevType with virMediatedDeviceType

2018-01-26 Thread Michal Privoznik
On 01/25/2018 10:24 AM, Erik Skultety wrote: > Now that we have all the building blocks in place, switch the nodedev > driver to use the "new" virMediatedDeviceType type instead of the "old" > virNodeDevCapMdevType one. > > Signed-off-by: Erik Skultety > --- >

Re: [libvirt] [PATCH 13/15] nodedev: udev: Drop the unused mdev type helpers

2018-01-26 Thread Michal Privoznik
On 01/25/2018 10:24 AM, Erik Skultety wrote: > These are not necessary anymore, since these are going to be shadowed by > the helpers provided by util/virmdev.c module. > > Signed-off-by: Erik Skultety > --- > src/node_device/node_device_udev.c | 119 >

Re: [libvirt] [PATCH 15/15] conf: nodedev: Update PCI mdev capabilities dynamically

2018-01-26 Thread Michal Privoznik
On 01/25/2018 10:24 AM, Erik Skultety wrote: > Just like SRIOV, a PCI device is only capable of the mediated devices > framework when it's bound to the vendor native driver, thus if a driver > change occurs, e.g. vendor_native->vfio, we need to refresh some of the > device's capabilities to

Re: [libvirt] [PATCH 0/9] Resolve libvirtd hang on termination with connected long running client

2018-01-26 Thread Daniel P . Berrangé
On Fri, Jan 26, 2018 at 11:47:04AM +0300, Nikolay Shirokovskiy wrote: > > > On 19.01.2018 20:23, John Ferlan wrote: > > RFC: > > https://www.redhat.com/archives/libvir-list/2018-January/msg00318.html > > > > Adjustments since RFC... > > > > Patches 1&2: No change, were already R-B'd > > Patch

Re: [libvirt] [PATCH 0/9] Resolve libvirtd hang on termination with connected long running client

2018-01-26 Thread Nikolay Shirokovskiy
On 19.01.2018 20:23, John Ferlan wrote: > RFC: > https://www.redhat.com/archives/libvir-list/2018-January/msg00318.html > > Adjustments since RFC... > > Patches 1&2: No change, were already R-B'd > Patch 3: Removed code as noted in code review, update commit message > Patch 4: From old series

Re: [libvirt] [REBASE PATCH v2 7/9] qemu: Add dump completed event to the capabilities

2018-01-26 Thread Jiri Denemark
On Fri, Jan 19, 2018 at 14:53:14 -0500, John Ferlan wrote: > Add the DUMP_COMPLETED check to the capabilities. This is the > mechanism used to determine whether the dump-guest-memory command > can support the "-detach" option and thus be able to wait on the > event and allow for a query of the

Re: [libvirt] [PATCH RESEND v1 1/2] i386: Add Intel Processor Trace feature support

2018-01-26 Thread Paolo Bonzini
On 22/01/2018 11:36, Kang, Luwei wrote: >>> On Thu, Jan 18, 2018 at 03:44:49PM +0100, Paolo Bonzini wrote: On 18/01/2018 15:37, Eduardo Habkost wrote: > On Thu, Jan 18, 2018 at 02:39:57PM +0100, Paolo Bonzini wrote: >> On 18/01/2018 14:24, Eduardo Habkost wrote: >>> However, if

Re: [libvirt] [REBASE PATCH v2 4/9] qemu: Add new parameter to qemuMonitorDumpToFd

2018-01-26 Thread Jiri Denemark
On Fri, Jan 19, 2018 at 14:53:11 -0500, John Ferlan wrote: > Add a @detach parameter to the API in order allow running the QEMU > code as a thread. > > Signed-off-by: John Ferlan > --- > src/qemu/qemu_driver.c | 2 +- > src/qemu/qemu_monitor.c | 7 +-- >

Re: [libvirt] [REBASE PATCH v2 3/9] qemu: Introduce qemuMonitor[JSON]QueryDump

2018-01-26 Thread Jiri Denemark
On Fri, Jan 19, 2018 at 14:53:10 -0500, John Ferlan wrote: > Add the query-dump API's in order to allow the dump-guest-memory > to be used to monitor progress. > > Signed-off-by: John Ferlan > --- > src/qemu/qemu_monitor.c | 14 + > src/qemu/qemu_monitor.h