[libvirt] [PATCH v2 3/3] qemu: hotplug: Reject VFIO hotplug if setting RLIMIT_MEMLOCK fails

2015-11-09 Thread Peter Krempa
Check the return value of virCommandSetMaxMemLock when hotplugging VFIO PCI hostdevs and reject the hotplug if the memory limit can't be set. --- src/qemu/qemu_hotplug.c | 5 - 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/qemu/qemu_hotplug.c b/src/qemu/qemu_hotplug.c index

[libvirt] [PATCH v2 2/3] qemu: hotplug: Fix mlock limit handling on memory hotplug

2015-11-09 Thread Peter Krempa
If mlock is required either due to use of VFIO hostdevs or due to the fact that it's enabled it needs to be tweaked prior to adding new memory or after removing a module. Add a helper to determine when it's necessary and reuse it both on hotplug and hotunplug. Resolves:

[libvirt] [PATCH v2 1/3] qemu: Extract logic to determine the mlock limit size for VFIO

2015-11-09 Thread Peter Krempa
New function qemuDomainGetMlockLimitBytes will now handle the calculation so that it unifies the logic to one place and allows later reuse. --- src/qemu/qemu_command.c | 18 ++ src/qemu/qemu_domain.c | 27 +++ src/qemu/qemu_domain.h | 2 ++

[libvirt] [PATCH java] Add support for Libvirt Qemu Library

2015-11-09 Thread Wido den Hollander
This allows us to send Qemu Guest Agent commands to running domains. Signed-off-by: Wido den Hollander --- src/main/java/org/libvirt/Domain.java | 36 ++ src/main/java/org/libvirt/Library.java | 3 +++

[libvirt] [PATCH v2 0/3] qemu: Fix mlock limit on memory hotplug

2015-11-09 Thread Peter Krempa
Peter Krempa (3): qemu: Extract logic to determine the mlock limit size for VFIO qemu: hotplug: Fix mlock limit handling on memory hotplug qemu: hotplug: Reject VFIO hotplug if setting RLIMIT_MEMLOCK fails src/qemu/qemu_command.c | 18 ++--- src/qemu/qemu_domain.c | 54

Re: [libvirt] [PATCH v2 3/3] qemu: hotplug: Reject VFIO hotplug if setting RLIMIT_MEMLOCK fails

2015-11-09 Thread John Ferlan
On 11/09/2015 07:50 AM, Peter Krempa wrote: > Check the return value of virCommandSetMaxMemLock when hotplugging VFIO > PCI hostdevs and reject the hotplug if the memory limit can't be set. > --- > src/qemu/qemu_hotplug.c | 5 - > 1 file changed, 4 insertions(+), 1 deletion(-) > ACK John

Re: [libvirt] [PATCH v2 1/3] qemu: Extract logic to determine the mlock limit size for VFIO

2015-11-09 Thread John Ferlan
On 11/09/2015 07:50 AM, Peter Krempa wrote: > New function qemuDomainGetMlockLimitBytes will now handle the > calculation so that it unifies the logic to one place and allows later > reuse. > --- > src/qemu/qemu_command.c | 18 ++ > src/qemu/qemu_domain.c | 27

Re: [libvirt] [PATCH v2 2/3] qemu: hotplug: Fix mlock limit handling on memory hotplug

2015-11-09 Thread John Ferlan
On 11/09/2015 07:50 AM, Peter Krempa wrote: > If mlock is required either due to use of VFIO hostdevs or due to the > fact that it's enabled it needs to be tweaked prior to adding new memory > or after removing a module. Add a helper to determine when it's > necessary and reuse it both on

[libvirt] [PATCH v2 14/17] qemu: assume -drive cache always uses v2 option names

2015-11-09 Thread Daniel P. Berrange
As of QEMU 0.10.0, the -drive cache option stopped using the on/off value names, so the QEMU driver can assume use of the new value names. Signed-off-by: Daniel P. Berrange --- src/qemu/qemu_capabilities.c | 3 -- src/qemu/qemu_capabilities.h

[libvirt] [PATCH v2 01/17] qemu: mandate QEMU version 0.12.0 or newer

2015-11-09 Thread Daniel P. Berrange
Check the QEMU version and refuse to work with QEMU versions older than 0.12.0. This is approximately the vintage of QEMU that is available in RHEL-6 era distros. Signed-off-by: Daniel P. Berrange --- src/qemu/qemu_capabilities.c | 7 ++

[libvirt] [PATCH v2 03/17] qemu: assume -vnc arg always takes a ':'

2015-11-09 Thread Daniel P. Berrange
As of QEMU 0.9.0 the -vnc option accepts a ':' to separate port from listen address, so the QEMU driver can assume that support for listen addresses is always available. Signed-off-by: Daniel P. Berrange --- src/qemu/qemu_capabilities.c | 4 -

[libvirt] [PATCH v2 04/17] qemu: assume 'info chardev' is always available

2015-11-09 Thread Daniel P. Berrange
As of QEMU 0.11.0 the 'info chardev' monitor command can be used to report on allocated chardev paths, so we can drop support for parsing QEMU stderr to locate the PTY paths. Signed-off-by: Daniel P. Berrange --- src/qemu/qemu_process.c | 204

[libvirt] [PATCH v2 00/17] Drop support for QEMU < 0.12.0

2015-11-09 Thread Daniel P. Berrange
A v2 of this series: https://www.redhat.com/archives/libvir-list/2015-November/msg00165.html The patches for introducing virtlogd will be significantly simplified if we don't need to worry about parsing stderr during startup. This is required prior to QEMU 0.11 so that we can get the

[libvirt] [PATCH v2 17/17] qemu: assume various QEMU 0.10 features are always available

2015-11-09 Thread Daniel P. Berrange
The -sdl and -net ...name=XXX arguments were both introduced in QEMU 0.10, so the QEMU driver can assume they are always available. Signed-off-by: Daniel P. Berrange --- src/qemu/qemu_capabilities.c | 4 src/qemu/qemu_capabilities.h

[libvirt] [PATCH v2 11/17] qemu: really remove last traces of Xenner support

2015-11-09 Thread Daniel P. Berrange
We have twice previously attempted to remove Xenner support commit de9be0ab4d7abe4c3ae5beaaff7ddb208921f1f1 Author: Daniel P. Berrange Date: Wed Aug 22 17:29:01 2012 +0100 Remove xenner support commit 92572c3d71bd08e6dd1897c7b14be9d27df608e9 Author: Ján

[libvirt] [PATCH v2 16/17] qemu: assume -vga is always available

2015-11-09 Thread Daniel P. Berrange
As of QEMU 0.10.0 the -vga argument was introduced, so the QEMU driver can assume it is always available. Signed-off-by: Daniel P. Berrange --- src/qemu/qemu_capabilities.c | 4 -- src/qemu/qemu_capabilities.h | 2 +-

[libvirt] [PATCH v2 12/17] qemu: assume vnet-hdr feature is always available

2015-11-09 Thread Daniel P. Berrange
--- src/qemu/qemu_capabilities.c | 7 +-- src/qemu/qemu_capabilities.h | 2 +- src/qemu/qemu_command.c| 16 src/qemu/qemu_command.h| 2 -- src/qemu/qemu_hotplug.c

[libvirt] [PATCH v2 06/17] qemu: handle USB bus in qemuAssignDeviceDiskAliasFixed()

2015-11-09 Thread Daniel P. Berrange
The qemuAssignDeviceDiskAliasFixed() method was missing handling for the USB disk bus type. Signed-off-by: Daniel P. Berrange --- src/qemu/qemu_command.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/qemu/qemu_command.c b/src/qemu/qemu_command.c index

[libvirt] [PATCH v2 02/17] qemu: remove all support for kQEMU

2015-11-09 Thread Daniel P. Berrange
The kQEMU accelerator was deleted in QEMU 0.12, so we no longer need to support it in the QEMU driver. Signed-off-by: Daniel P. Berrange --- src/qemu/qemu_capabilities.c | 18 -- src/qemu/qemu_capabilities.h | 19 --- src/qemu/qemu_command.c

[libvirt] [PATCH v2 05/17] qemu: assume -no-reboot is always available

2015-11-09 Thread Daniel P. Berrange
The -no-reboot arg was added in QEMU 0.9.0, so the QEMU driver can now assume it is always present. Signed-off-by: Daniel P. Berrange --- src/qemu/qemu_capabilities.c | 3 --- src/qemu/qemu_capabilities.h | 2 +-

[libvirt] [PATCH v2 13/17] qemu: assume support for all migration protocols except rdma

2015-11-09 Thread Daniel P. Berrange
Since we require QEMU 0.12.0, we can assume that QEMU supports all of the fd, tcp, unix and exec migration protocols. Signed-off-by: Daniel P. Berrange --- src/qemu/qemu_capabilities.c | 34 +- src/qemu/qemu_capabilities.h

[libvirt] [PATCH v2 07/17] qemu: handle floppy disk bus when parsing command line argv

2015-11-09 Thread Daniel P. Berrange
The QEMU argv -> virDomainDef conversion code was not handling -drive arguments using the floppy bus. This caused them to be added as hard disks instead. Signed-off-by: Daniel P. Berrange --- src/qemu/qemu_command.c | 5 + 1 file changed, 5 insertions(+) diff --git

Re: [libvirt] [PATCH v2 1/3] qemu: Extract logic to determine the mlock limit size for VFIO

2015-11-09 Thread Peter Krempa
On Mon, Nov 09, 2015 at 13:09:59 -0500, John Ferlan wrote: > On 11/09/2015 07:50 AM, Peter Krempa wrote: > > New function qemuDomainGetMlockLimitBytes will now handle the > > calculation so that it unifies the logic to one place and allows later > > reuse. > > --- [...] > > +/** > > + *

Re: [libvirt] [PATCH v2 2/3] qemu: hotplug: Fix mlock limit handling on memory hotplug

2015-11-09 Thread Peter Krempa
On Mon, Nov 09, 2015 at 13:11:16 -0500, John Ferlan wrote: > On 11/09/2015 07:50 AM, Peter Krempa wrote: > > If mlock is required either due to use of VFIO hostdevs or due to the > > fact that it's enabled it needs to be tweaked prior to adding new memory > > or after removing a module. Add a

Re: [libvirt] [PATCH 01/10] conf: Make @def const in virDomainDefGetMemoryInitial

2015-11-09 Thread Peter Krempa
On Tue, Oct 20, 2015 at 09:34:05 -0400, John Ferlan wrote: > > > On 10/16/2015 08:11 AM, Peter Krempa wrote: > > Keep const correctness and allow to use this function in cases where > > @def is const in the caller. > > --- > > src/conf/domain_conf.c | 2 +- > > src/conf/domain_conf.h | 2 +- > >

Re: [libvirt] [PATCH] bhyve: monitor: do not override domain's privateData

2015-11-09 Thread Roman Bogorodskiy
Roman Bogorodskiy wrote: > Current monitor code overrides domain object's privateData, e.g. > in virBhyveProcessStart(): > > vm->privateData = bhyveMonitorOpen(vm, driver); > > where bhyveMonitorPtr() returns bhyveMonitorPtr. > > This is not right thing to do, so make bhyveMonitorPtr > a

Re: [libvirt] [PATCH v2 11/17] qemu: really remove last traces of Xenner support

2015-11-09 Thread John Ferlan
On 11/09/2015 11:24 AM, Daniel P. Berrange wrote: > We have twice previously attempted to remove Xenner > support > > commit de9be0ab4d7abe4c3ae5beaaff7ddb208921f1f1 > Author: Daniel P. Berrange > Date: Wed Aug 22 17:29:01 2012 +0100 > > Remove xenner support

[libvirt] [PATCH] Allow building lxc without virt-login-shell

2015-11-09 Thread Cédric Bosdonnat
Add a configure option to disable virt-login-shell build even if lxc is enabled. --- configure.ac | 14 ++ tools/Makefile.am | 12 ++-- 2 files changed, 20 insertions(+), 6 deletions(-) diff --git a/configure.ac b/configure.ac index f481c50..c766351 100644 ---

Re: [libvirt] [PATCH v2 00/17] Drop support for QEMU < 0.12.0

2015-11-09 Thread John Ferlan
On 11/09/2015 11:24 AM, Daniel P. Berrange wrote: > A v2 of this series: > > https://www.redhat.com/archives/libvir-list/2015-November/msg00165.html > > The patches for introducing virtlogd will be significantly > simplified if we don't need to worry about parsing stderr > during startup.

Re: [libvirt] [PATCH v2 04/17] qemu: assume 'info chardev' is always available

2015-11-09 Thread John Ferlan
On 11/09/2015 11:24 AM, Daniel P. Berrange wrote: > As of QEMU 0.11.0 the 'info chardev' monitor command can be > used to report on allocated chardev paths, so we can drop > support for parsing QEMU stderr to locate the PTY paths. > > Signed-off-by: Daniel P. Berrange >

Re: [libvirt] [PATCH v2 08/17] qemu: assume -drive argument is always available

2015-11-09 Thread John Ferlan
On 11/09/2015 11:24 AM, Daniel P. Berrange wrote: > As of QEMU 0.9.1 the -drive argument can be used to configure > all disks, so the QEMU driver can assume it is always available > and drop support for -hda/-cdrom/etc. > As I found out (and provided some details in patch 17) - the

Re: [libvirt] [PATCH v2 13/17] qemu: assume support for all migration protocols except rdma

2015-11-09 Thread John Ferlan
On 11/09/2015 11:24 AM, Daniel P. Berrange wrote: > Since we require QEMU 0.12.0, we can assume that QEMU supports > all of the fd, tcp, unix and exec migration protocols. > > Signed-off-by: Daniel P. Berrange > --- > src/qemu/qemu_capabilities.c |

Re: [libvirt] [PATCH v2 17/17] qemu: assume various QEMU 0.10 features are always available

2015-11-09 Thread John Ferlan
On 11/09/2015 11:24 AM, Daniel P. Berrange wrote: > The -sdl and -net ...name=XXX arguments were both introduced > in QEMU 0.10, so the QEMU driver can assume they are always > available. > The -sdl wasn't really removed it seems - although it did me peeking into the rabbit hole for a make

Re: [libvirt] [sandbox 2/2] Code formatting fix

2015-11-09 Thread Daniel P. Berrange
On Sat, Nov 07, 2015 at 03:59:00PM -0800, Cédric Bosdonnat wrote: > --- > libvirt-sandbox/libvirt-sandbox-config.c | 7 ++- > 1 file changed, 2 insertions(+), 5 deletions(-) > > diff --git a/libvirt-sandbox/libvirt-sandbox-config.c > b/libvirt-sandbox/libvirt-sandbox-config.c > index

Re: [libvirt] [sandbox 1/2] Try guessing host-image image format

2015-11-09 Thread Daniel P. Berrange
On Sat, Nov 07, 2015 at 03:58:59PM -0800, Cédric Bosdonnat wrote: > --- > libvirt-sandbox/libvirt-sandbox-config.c | 2 ++ > 1 file changed, 2 insertions(+) ACK Regards, Daniel -- |: http://berrange.com -o-http://www.flickr.com/photos/dberrange/ :| |: http://libvirt.org