[libvirt] [PATCH 04/10] qemu: command: Always execute memory device formatter

2015-10-16 Thread Peter Krempa
Since we already make sure before that the domain configuration is valid we may execute it always at the cost of doing 0 iterations of the for loop. This patch will simplify later refactor as it will avoid whitespace changes. --- src/qemu/qemu_command.c | 47 +++---

[libvirt] [PATCH 00/10] Allow memory hotplug without NUMA on ppc64

2015-10-16 Thread Peter Krempa
Peter Krempa (10): conf: Make @def const in virDomainDefGetMemoryInitial conf: Turn targetNode in struct virDomainMemoryDef to signed qemu: command: Make qemuBuildMemoryBackendStr usable without NUMA qemu: command: Always execute memory device formatter qemu: domain: Add common function

[libvirt] [PATCH 09/10] qemu: command: Prepare memory device def formatter for missing target node

2015-10-16 Thread Peter Krempa
Prepare the command line generator for the possibility that in some configurations the target NUMA node info will be missing. --- src/qemu/qemu_command.c | 9 +++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/src/qemu/qemu_command.c b/src/qemu/qemu_command.c index 5e7b052..98

[libvirt] [PATCH 07/10] qemu: domain: Remove memory device check from post parse callback

2015-10-16 Thread Peter Krempa
We check that is present when we have memory devices at the time we start the VM or add the device, so we can remove it from the post parse callback to be more tolerant to users. --- src/qemu/qemu_domain.c | 8 1 file changed, 8 deletions(-) diff --git a/src/qemu/qemu_domain.c b/src/qem

[libvirt] [PATCH 10/10] qemu: ppc64: Support memory hotplug without NUMA enabled

2015-10-16 Thread Peter Krempa
ppc64 guests don't require adding a NUMA node for hotplug memory to work. Lift the requirement and add test cases. --- src/qemu/qemu_domain.c | 32 ++ .../qemuxml2argv-memory-hotplug-ppc64-nonuma.args | 19 +++ .../qemuxml2argv-memory-hotplug-pp

[libvirt] [PATCH 02/10] conf: Turn targetNode in struct virDomainMemoryDef to signed

2015-10-16 Thread Peter Krempa
Later on, we will need to know whether the user specified the target node or not. Turn the variable into a signed value. We already treat it as signed in various parts of the qemu driver. --- src/conf/domain_conf.c | 10 ++ src/conf/domain_conf.h | 2 +- 2 files changed, 7 insertions(+),

[libvirt] [PATCH 06/10] qemu: command: Move dimm device checks from formatter to checker

2015-10-16 Thread Peter Krempa
Aggregate the checks of the dimm device into the verification function rather than having them in the formatter. --- src/qemu/qemu_command.c | 65 ++ src/qemu/qemu_command.h | 4 +-- src/qemu/qemu_domain.c | 83 -

Re: [libvirt] [PATCH 02/10] conf: Turn targetNode in struct virDomainMemoryDef to signed

2015-10-20 Thread Peter Krempa
On Tue, Oct 20, 2015 at 09:36:29 -0400, John Ferlan wrote: > > > On 10/16/2015 08:11 AM, Peter Krempa wrote: > > Later on, we will need to know whether the user specified the target > > node or not. Turn the variable into a signed value. We already treat it > > as sig

Re: [libvirt] [PATCH] vsh: print help more often

2015-10-21 Thread Peter Krempa
On Wed, Oct 21, 2015 at 10:48:13 +0200, Michal Privoznik wrote: > So, consider following scenario: > > virsh # migrate --help > > In this case migrate help is printed out. So far so good. > However, you start writing this long migrate command (I bet you > know the arguments there can get quite

Re: [libvirt] [PATCH 1/4] virsh-domain: use correct base for virStrToLong_ui

2015-10-23 Thread Peter Krempa
On Thu, Oct 22, 2015 at 11:24:02 -0400, Laine Stump wrote: > On 10/21/2015 08:22 AM, Pavel Hrdina wrote: > > While parsing device addresses we should use correct base and don't > > count on auto-detect. For example, PCI address uses hex numbers, but > > each number starting with 0 will be auto-det

Re: [libvirt] [PATCH] tests: Fix virnetdaemontest to be skipped in non-yajl environment

2015-10-23 Thread Peter Krempa
On Fri, Oct 23, 2015 at 15:38:25 +0530, Prerna wrote: > When libvirt is compiled without yajl-devel, virnetdaemontest fails. > This causes 'make check' to fail with nondescript errors, such as following: > [snip]... > PASS: read-bufsiz > PASS: read-non-seekable > PASS: s

Re: [libvirt] [PATCH] qemu: Resolve agent deadlock

2015-10-26 Thread Peter Krempa
On Mon, Oct 26, 2015 at 11:06:21 -0400, John Ferlan wrote: > If we have a shutdown of a VM by a qemu agent while an agent EOF occurs > at relatively the same time, it's possible that a deadlock occurs depending > on what happens first. > > Assume qemuProcessHandleAgentEOF runs first, with the vm->

Re: [libvirt] [PATCH] qemu: Resolve agent deadlock

2015-10-26 Thread Peter Krempa
On Mon, Oct 26, 2015 at 17:28:57 -0400, John Ferlan wrote: > > > On 10/26/2015 11:37 AM, Peter Krempa wrote: > > On Mon, Oct 26, 2015 at 11:06:21 -0400, John Ferlan wrote: > >> If we have a shutdown of a VM by a qemu agent while an agent EOF occurs > >> at relati

Re: [libvirt] [PATCH 00/10] Allow memory hotplug without NUMA on ppc64

2015-10-26 Thread Peter Krempa
On Fri, Oct 23, 2015 at 23:14:55 +0530, Shivaprasad bhat wrote: > Hi Peter, > > Went through the series and gave a try. The series looks good. > > One thing I wonder, should we allow the dimms without targetNode info > in the xml be hotplugged when > the guest is actually configured with NUMA nod

Re: [libvirt] [PATCH v2 0/2] reorder usb controllers correctly

2015-10-27 Thread Peter Krempa
On Tue, Oct 27, 2015 at 10:37:27 +0100, Pavel Hrdina wrote: > new in v2: > - used git format-patch -b I think Jan meant that it was hard to review with that option due to the fact that it contains both whitespace and functional changes, not that you should actually use it to send patches. They ca

Re: [libvirt] [PATCH 1/3] cpu_map.xml: add cmt feature to x86

2015-10-29 Thread Peter Krempa
On Thu, Oct 29, 2015 at 14:02:28 +0800, Qiaowei Ren wrote: > Some Intel processor families (e.g. the Intel Xeon processor E5 v3 > family) introduced CMT (Cache Monitoring Technology) to measure the > usage of cache by applications running on the platform. This patch > add it into x86 part of cpu_ma

Re: [libvirt] [PATCH v6 01/13] virstoragefile: Add virStorageSourceGetBackingStore

2015-11-01 Thread Peter Krempa
On Thu, Oct 29, 2015 at 14:43:08 +0100, Matthias Gatto wrote: > Create virStorageSourceGetBackingStore function in > preparation for quorum: > Actually, if we want to get a backing store inside a virStorageSource > we have to do it manually(src->backingStore = backingStore). > The problem is that w

Re: [libvirt] [PATCH v6 03/13] virstoragefile: Add virStorageSourceSetBackingStore

2015-11-01 Thread Peter Krempa
On Thu, Oct 29, 2015 at 14:43:10 +0100, Matthias Gatto wrote: > As explained for virStorageSourceGetBackingStore, quorum allows > multiple backing store, this make the operation to set bs complex > because we have to check if the backingStore is used as an array > or a pointer, and set it different

Re: [libvirt] [PATCH v6 02/13] virstoragefile: Always use virStorageSourceGetBackingStore to get backing store

2015-11-01 Thread Peter Krempa
On Thu, Oct 29, 2015 at 14:43:09 +0100, Matthias Gatto wrote: > Uniformize backing store usage by calling virStorageSourceGetBackingStore > instead of setting backing store manually. > > Signed-off-by: Matthias Gatto > Signed-off-by: John Ferlan > --- > src/conf/domain_conf.c|

Re: [libvirt] [PATCH v6 11/11] quorum: Block snapshot operation with RAID

2015-11-02 Thread Peter Krempa
On Thu, Oct 29, 2015 at 14:43:19 +0100, Matthias Gatto wrote: > For now we block all snapshot operations with quorum, because it would require > a lot more code, espacially because Qemu doesn't really suport it. Snapshots aren't the only thing that will not work. Basically every other block operat

Re: [libvirt] [PATCH v6 05/13] virstoragefile: change backingStore to backingStores.

2015-11-02 Thread Peter Krempa
On Thu, Oct 29, 2015 at 14:43:12 +0100, Matthias Gatto wrote: > The backingStore field was a virStorageSourcePtr. > Because a quorum can contain more that one backingStore at the same level, > it's now an array of 'virStorageSourcePtr'. > > This patch rename src->backingStore to src->backingStore

Re: [libvirt] [PATCH v2 1/9] Implement virPCIIsAKnownStub function

2015-11-02 Thread Peter Krempa
On Mon, Nov 02, 2015 at 03:18:20 +0530, Shivaprasad G Bhat wrote: > The checks to known stubs can be easily done having this > implementation and easy to reuse. > > Signed-off-by: Shivaprasad G Bhat > --- > src/util/virpci.c | 28 ++-- > 1 file changed, 18 insertions(+)

Re: [libvirt] [PATCH 2/9] Initialize the stubDriver of pci devices if bound to a valid one

2015-11-02 Thread Peter Krempa
On Mon, Nov 02, 2015 at 03:19:13 +0530, Shivaprasad G Bhat wrote: > The stubDriver name can be used to make useful decisions if readily available. > Set it if bound to a valid one during initialisation. > > Signed-off-by: Shivaprasad G Bhat > --- > src/util/virpci.c |9 + > 1 file ch

Re: [libvirt] [PATCH v2 3/9] Add iommu group number info to virPCIDevice

2015-11-02 Thread Peter Krempa
On Mon, Nov 02, 2015 at 03:21:13 +0530, Shivaprasad G Bhat wrote: > The iommu group number need not be fetched from the sysfs > everytime as it remains constant. Fetch it once during > allocation. Add a helper to set the value to set it from tests. > > Signed-off-by: Shivaprasad G Bhat > --- > s

Re: [libvirt] [PATCH v2 6/9] Split reprobe action from the virPCIUnbindFromStub into a new function

2015-11-02 Thread Peter Krempa
On Mon, Nov 02, 2015 at 03:23:26 +0530, Shivaprasad G Bhat wrote: > The reprobe needs to be called multiple times for vfio devices for each > device in the iommu group in future patch. So split the reprobe into a > new function. No functional change. > > Signed-off-by: Shivaprasad G Bhat > --- >

Re: [libvirt] [PATCH v2 9/9] Wait for iommmu device to go away before reprobing the host driver

2015-11-02 Thread Peter Krempa
On Mon, Nov 02, 2015 at 03:28:00 +0530, Shivaprasad G Bhat wrote: > There could be a delay of 1 or 2 seconds before the vfio-pci driver > is unbound and the device file /dev/vfio/ is actually > removed. If the file exists, the host driver probing the device > can lead to crash. So, wait and avoid t

Re: [libvirt] [PATCH] syntax-check: Add sc_prohibit_space_in_label rule

2015-11-02 Thread Peter Krempa
On Mon, Nov 02, 2015 at 10:34:35 +0100, Andrea Bolognani wrote: > This guards against code such as > > cleanup : > > which is happily accepted by the compiler but does not conform > to our style guidelines. > --- > cfg.mk | 6 ++ > 1 file changed, 6 insertions(+) > > diff --git a/cfg.mk b/

Re: [libvirt] [PATCH v6 08/13] domain_conf: Read and Write quorum config

2015-11-02 Thread Peter Krempa
On Thu, Oct 29, 2015 at 14:43:15 +0100, Matthias Gatto wrote: > Add the capabiltty to libvirt to parse and format the quorum syntax > as described here: > http://www.redhat.com/archives/libvir-list/2014-May/msg00533.html > > As explain Peter Krempa in the V5, we need a different

Re: [libvirt] [PATCH v6 09/13] qemu: Add quorum support in qemuBuildDriveDevStr

2015-11-02 Thread Peter Krempa
On Thu, Oct 29, 2015 at 14:43:16 +0100, Matthias Gatto wrote: > Allow libvirt to build the quorum string used by quemu. > > Add 2 static functions: qemuBuildRAIDStr and > qemuBuildRAIDFileSourceStr. > qemuBuildRAIDStr is made because a quorum can have another quorum > as a child, so we may need to

Re: [libvirt] [PATCH 2/4] Virsh-edit interface was added

2015-11-02 Thread Peter Krempa
On Mon, Nov 02, 2015 at 14:34:44 +0300, rodinasop...@gmail.com wrote: > From: sonya > > --- > tools/virsh-edit.h | 44 > 1 file changed, 44 insertions(+) > create mode 100644 tools/virsh-edit.h > > diff --git a/tools/virsh-edit.h b/tools/virsh-edit.

Re: [libvirt] [PATCH 1/4] General structures and interfaces were added

2015-11-02 Thread Peter Krempa
On Mon, Nov 02, 2015 at 14:34:43 +0300, rodinasop...@gmail.com wrote: > From: sonya The commit message is used to explain the changes. > > --- > tools/Makefile.am | 1 + > tools/virsh-domain.c| 195 > > tools/virsh-edit.c | 97

Re: [libvirt] [PATCH] virkeymaps.h: Fix VPATH build with --disable-dependency-tracking

2015-11-03 Thread Peter Krempa
On Tue, Nov 03, 2015 at 09:08:04 +0100, Michal Privoznik wrote: > Funny things happen when you try to do a VPATH build and pass > --disable-dependency-tracking argument to the configure script. > Not only the directory structure is not created at the end of > configure phase, but also contradictory

Re: [libvirt] [PATCH] virkeymaps.h: Fix VPATH build with --disable-dependency-tracking

2015-11-03 Thread Peter Krempa
On Tue, Nov 03, 2015 at 10:40:50 +0100, Peter Krempa wrote: > On Tue, Nov 03, 2015 at 09:08:04 +0100, Michal Privoznik wrote: > > Funny things happen when you try to do a VPATH build and pass > > --disable-dependency-tracking argument to the configure script. > > Not only th

Re: [libvirt] [PATCH] virkeymaps.h: Fix VPATH build with --disable-dependency-tracking

2015-11-03 Thread Peter Krempa
On Tue, Nov 03, 2015 at 10:55:31 +0100, Peter Krempa wrote: > On Tue, Nov 03, 2015 at 10:40:50 +0100, Peter Krempa wrote: > > On Tue, Nov 03, 2015 at 09:08:04 +0100, Michal Privoznik wrote: > > > Funny things happen when you try to do a VPATH build and pass > > > --

Re: [libvirt] [PATCH 1/5] util: add API for writing to rotating files

2015-11-03 Thread Peter Krempa
On Tue, Nov 03, 2015 at 16:04:20 +, Daniel Berrange wrote: > Add a virRotatingFile object which allows writing to a file > with automation rotation to N backup files when a size limit > is reached. This is useful for guest logging when a guaranteed > finite size limit is required. Use of extern

Re: [libvirt] [PATCH 5/5] qemu: add support for sending QEMU stdout/stderr to virtlogd

2015-11-04 Thread Peter Krempa
On Tue, Nov 03, 2015 at 16:04:24 +, Daniel Berrange wrote: > Currently the QEMU stdout/stderr streams are written directly to > a regular file (eg /var/log/libvirt/qemu/$GUEST.log). While those > can be rotated by logrotate (using copytruncate option) this is > not very efficient. It also leave

[libvirt] [PATCH] qemu: process: Fix automatic setting of locked memory limit for VFIO

2015-11-04 Thread Peter Krempa
For VFIO passthrough the guest memory including the device memory to be resident in memory. Previously we used a magic constant of 1GiB that we added to the current memory size of the VM to accomodate all this. It is possible though that the device that is passed through exposes more than that. To

Re: [libvirt] [PATCH] qemu: process: Fix automatic setting of locked memory limit for VFIO

2015-11-04 Thread Peter Krempa
On Wed, Nov 04, 2015 at 08:43:34 -0700, Alex Williamson wrote: > On Wed, 2015-11-04 at 16:14 +0100, Peter Krempa wrote: > > For VFIO passthrough the guest memory including the device memory to be > > resident in memory. Previously we used a magic constant of 1GiB that we > >

[libvirt] [PATCH 2/2] qemu: migration: Actually error out on unsupported migration flag

2015-11-05 Thread Peter Krempa
The code reported that a migration flag is unsupported but didn't jump to the error label. Probably an oversight in commit f88af9dc that introduced the flag checking. --- src/qemu/qemu_migration.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/qemu/qemu_migration.c b/src/qemu/qemu_migrati

[libvirt] [PATCH 1/2] qemu: migration: Properly parse memory hotplug migration flag

2015-11-05 Thread Peter Krempa
Since the flag was not enabled when 'eating' the migration cookie, libvirt reported a bogus error when memory hotplug was enabled: unsupported migration cookie feature memory-hotplug The error was ignored though due to a bug in the code so it slipped through testing. Resolves: https://bugzilla.

[libvirt] [PATCH 0/2] Fix spurious error when migrating with memory hotplug

2015-11-05 Thread Peter Krempa
Peter Krempa (2): qemu: migration: Properly parse memory hotplug migration flag qemu: migration: Actually error out on unsupported migration flag src/qemu/qemu_migration.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) -- 2.6.2 -- libvir-list mailing list libvir-list@redhat.com

Re: [libvirt] [PATCH] qemu: process: Fix automatic setting of locked memory limit for VFIO

2015-11-05 Thread Peter Krempa
On Wed, Nov 04, 2015 at 17:16:53 -0700, Alex Williamson wrote: > On Wed, 2015-11-04 at 16:54 +0100, Peter Krempa wrote: > > On Wed, Nov 04, 2015 at 08:43:34 -0700, Alex Williamson wrote: > > > On Wed, 2015-11-04 at 16:14 +0100, Peter Krempa wrote: [...] > > Additionally i

Re: [libvirt] [PATCH 0/7] Drop support for QEMU < 0.12.0

2015-11-05 Thread Peter Krempa
On Thu, Nov 05, 2015 at 17:33:52 +, Daniel Berrange wrote: > 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 dyanamically allocated /dev/pty/NNN

Re: [libvirt] [PATCH] qemu: process: Fix automatic setting of locked memory limit for VFIO

2015-11-05 Thread Peter Krempa
On Thu, Nov 05, 2015 at 08:41:46 -0700, Alex Williamson wrote: > On Thu, 2015-11-05 at 16:27 +0100, Peter Krempa wrote: > > On Wed, Nov 04, 2015 at 17:16:53 -0700, Alex Williamson wrote: [...] > The power devs will need to speak to what their locked memory > requirements are a

Re: [libvirt] [PATCH 0/2] Fix spurious error when migrating with memory hotplug

2015-11-06 Thread Peter Krempa
On Thu, Nov 05, 2015 at 20:37:09 +0100, Jiri Denemark wrote: > On Thu, Nov 05, 2015 at 15:38:41 +0100, Peter Krempa wrote: > > Peter Krempa (2): > > qemu: migration: Properly parse memory hotplug migration flag > > qemu: migration: Actually error out on unsupported migrati

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

2015-11-06 Thread Peter Krempa
This is necessary so that VFIO doesn't break killing the guests. Peter Krempa (2): qemu: Extract logic to determine the mlock limit size for VFIO qemu: hotplug: Fix mlock limit handling on memory hotplug src/qemu/qemu_command.c | 18 ++ src/qemu/qemu_domain.c

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

2015-11-06 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 | 17 + src/qemu/qemu_domain.h | 2 ++ src/qemu/qemu_hotplug.c

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

2015-11-06 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: https://bugzilla.redhat.com

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

2015-11-08 Thread Peter Krempa
On Fri, Nov 06, 2015 at 13:39:06 -0500, John Ferlan wrote: > On 11/06/2015 10:47 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 afte

[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

[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 ++ src/qemu/qemu_

[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: https://bugzilla.redhat.com

[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

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

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 afte

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 +

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

2015-11-10 Thread Peter Krempa
On Mon, Nov 09, 2015 at 13:50:14 +0100, Peter Krempa wrote: > 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 &g

Re: [libvirt] [PATCH 04/10] qemu: command: Always execute memory device formatter

2015-11-10 Thread Peter Krempa
On Tue, Oct 20, 2015 at 09:57:49 -0400, John Ferlan wrote: > On 10/16/2015 08:11 AM, Peter Krempa wrote: > > Since we already make sure before that the domain configuration is > > valid we may execute it always at the cost of doing 0 iterations of the > > for loop. >

Re: [libvirt] [PATCH 08/10] conf: Prepare making memory device target node optional

2015-11-10 Thread Peter Krempa
On Tue, Oct 20, 2015 at 17:31:57 -0400, John Ferlan wrote: > > > On 10/16/2015 08:11 AM, Peter Krempa wrote: > > Adjust the config code so that it does not enforce that target memory > > node is specified. To avoid breakage, adjust the qemu memory hotplug > > conf

[libvirt] [PATCH v2 0/7] Allow memory hotplug without NUMA on ppc64

2015-11-10 Thread Peter Krempa
This fixes most of the stuff pointed out in the review. Peter Krempa (7): qemu: command: Make qemuBuildMemoryBackendStr usable without NUMA qemu: command: Always execute memory device formatter qemu: domain: Add common function to perform memory hotplug checks qemu: command: Move dimm

[libvirt] [PATCH v2 7/7] qemu: ppc64: Support memory hotplug without NUMA enabled

2015-11-10 Thread Peter Krempa
ppc64 guests don't require adding a NUMA node for hotplug memory to work. Lift the requirement and add test cases. --- src/qemu/qemu_domain.c | 32 ++ .../qemuxml2argv-memory-hotplug-ppc64-nonuma.args | 28 .../qemuxml2argv-memory-hotpl

[libvirt] [PATCH v2 1/7] qemu: command: Make qemuBuildMemoryBackendStr usable without NUMA

2015-11-10 Thread Peter Krempa
Make the function usable so that -1 can be passed to it as cell ID so that we can later enable memory hotplug on non-NUMA guests for certain architectures. --- src/qemu/qemu_command.c | 32 1 file changed, 20 insertions(+), 12 deletions(-) diff --git a/src/qemu/qe

[libvirt] [PATCH v2 2/7] qemu: command: Always execute memory device formatter

2015-11-10 Thread Peter Krempa
Since we already make sure before that the domain configuration is valid we may execute it always at the cost of doing 0 iterations of the for loop. This patch will simplify later refactor as it will avoid whitespace changes. --- src/qemu/qemu_command.c | 47 +++---

[libvirt] [PATCH v2 5/7] conf: Prepare making memory device target node optional

2015-11-10 Thread Peter Krempa
Adjust the config code so that it does not enforce that target memory node is specified. To avoid breakage, adjust the qemu memory hotplug config checker to disallow such config for now. --- docs/formatdomain.html.in | 5 +++-- docs/schemas/domaincommon.rng | 8 +--- src/conf/domain_conf

[libvirt] [PATCH v2 3/7] qemu: domain: Add common function to perform memory hotplug checks

2015-11-10 Thread Peter Krempa
Add a function that will aggregate various checks related to memory hotplug so that they aren't scattered accross various parts of the code. --- src/qemu/qemu_command.c | 26 ++--- src/qemu/qemu_domain.c | 78 + src/qemu/qemu_domain.h |

[libvirt] [PATCH v2 6/7] qemu: command: Prepare memory device def formatter for missing target node

2015-11-10 Thread Peter Krempa
Prepare the command line generator for the possibility that in some configurations the target NUMA node info will be missing. --- src/qemu/qemu_command.c | 9 +++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/src/qemu/qemu_command.c b/src/qemu/qemu_command.c index e6c240c..8f

[libvirt] [PATCH v2 4/7] qemu: command: Move dimm device checks from formatter to checker

2015-11-10 Thread Peter Krempa
Aggregate the checks of the dimm device into the verification function rather than having them in the formatter. --- src/qemu/qemu_command.c | 65 ++ src/qemu/qemu_command.h | 4 +-- src/qemu/qemu_domain.c | 92 - sr

Re: [libvirt] [PATCH] hypervisor driver for Jailhouse

2015-11-10 Thread Peter Krempa
On Tue, Nov 10, 2015 at 13:17:41 +0100, Christian Loehle wrote: > >From README: > The jailhouse hypervisor driver for the libvirt project aims to provide > rudimentary support for managing jailhouse with the libvirt library. The > main advantage of this is the possibility to use virt-manager as a G

[libvirt] [PATCH 1/3] qemu: domain: Restructurate control flow in qemuDomainGetMlockLimitBytes

2015-11-10 Thread Peter Krempa
Break early when hard limit is set so that it's not intermixed by other logic for determining the limit. --- src/qemu/qemu_domain.c | 12 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/src/qemu/qemu_domain.c b/src/qemu/qemu_domain.c index 416ab5b..12517a5 100644 --- a/s

[libvirt] [PATCH 3/3] qemu: Explain why mlock size is modified when def->mem.locked is enabled

2015-11-10 Thread Peter Krempa
--- src/qemu/qemu_domain.c | 5 + 1 file changed, 5 insertions(+) diff --git a/src/qemu/qemu_domain.c b/src/qemu/qemu_domain.c index 11cd39e..7f2783b 100644 --- a/src/qemu/qemu_domain.c +++ b/src/qemu/qemu_domain.c @@ -3673,6 +3673,11 @@ qemuDomainRequiresMlock(virDomainDefPtr def) { si

[libvirt] [PATCH 0/3] qemu: Tweak VFIO limit documentation

2015-11-10 Thread Peter Krempa
Peter Krempa (3): qemu: domain: Restructurate control flow in qemuDomainGetMlockLimitBytes qemu: Explain mlock limit size more in detail qemu: Explain why mlock size is modified when def->mem.locked is enabled src/qemu/qemu_domain.c | 34 -- 1 f

[libvirt] [PATCH 2/3] qemu: Explain mlock limit size more in detail

2015-11-10 Thread Peter Krempa
Based on Alex's explanation [1] in the recent discussion let's update the comment explaining the memory lock limit calculation. [1] http://www.redhat.com/archives/libvir-list/2015-November/msg00329.html --- src/qemu/qemu_domain.c | 19 --- 1 file changed, 16 insertions(+), 3 delet

Re: [libvirt] [PATCH] qemu: process: Fix automatic setting of locked memory limit for VFIO

2015-11-10 Thread Peter Krempa
On Tue, Nov 10, 2015 at 09:40:34 -0700, Alex Williamson wrote: > On Fri, 2015-11-06 at 08:30 +0100, Peter Krempa wrote: [...] > Now the next question is whether this peer-to-peer DMA is useful, or > even used. I have heard of users assigning multiple AMD cards to a > system and m

Re: [libvirt] [PATCH 1/2] conf: add crash to hyperv features

2015-11-10 Thread Peter Krempa
On Thu, Nov 05, 2015 at 16:54:02 +0300, Dmitry Andreev wrote: > > > On 05.11.2015 14:06, Jiri Denemark wrote: > > On Mon, Oct 26, 2015 at 13:23:32 +0300, Dmitry Andreev wrote: > >> Add crash CPU feature for Hyper-V. Hyper-V crash MSR's can be used > >> by Hyper-V based guests to notify about occu

Re: [libvirt] [PATCH] qemu: Fix job entry debug message

2015-11-11 Thread Peter Krempa
On Wed, Nov 11, 2015 at 15:15:56 +0100, Jiri Denemark wrote: > Logging current async job while in BeginJob is useful, but the async job > we want to start is even more interesting. A little confusing on the first read. > > Signed-off-by: Jiri Denemark > --- > src/qemu/qemu_domain.c | 16 ++

Re: [libvirt] [PATCH] qemu: Fix style in qemuProcessStart

2015-11-11 Thread Peter Krempa
On Wed, Nov 11, 2015 at 15:30:10 +0100, Jiri Denemark wrote: > Signed-off-by: Jiri Denemark > --- > src/qemu/qemu_process.c | 5 ++--- > 1 file changed, 2 insertions(+), 3 deletions(-) > ACK signature.asc Description: Digital signature -- libvir-list mailing list libvir-list@redhat.com https:/

Re: [libvirt] [PATCH] security: Cleanup DAC driver

2015-11-11 Thread Peter Krempa
On Wed, Nov 11, 2015 at 15:26:58 +0100, Jiri Denemark wrote: > Fixes several style issues and removes "DEF" (what is it supposed to > mean anyway?) from debug messages. > > Signed-off-by: Jiri Denemark > --- > src/security/security_dac.c | 22 ++ > 1 file changed, 10 insertio

Re: [libvirt] [PATCH 2/3] qemu: Explain mlock limit size more in detail

2015-11-11 Thread Peter Krempa
On Wed, Nov 11, 2015 at 15:23:55 +0100, Andrea Bolognani wrote: > On Wed, 2015-11-11 at 06:57 +0100, Peter Krempa wrote: > > Based on Alex's explanation [1] in the recent discussion let's update > > the comment explaining the memory lock limit calculation. > > &g

Re: [libvirt] [PATCH 01/24] qemu: Refactor waiting for completed migration on destination

2015-11-13 Thread Peter Krempa
On Thu, Nov 12, 2015 at 19:37:03 +0100, Jiri Denemark wrote: > Move the code from qemuMigrationFinish into a dedicated function. > > Signed-off-by: Jiri Denemark > --- > src/qemu/qemu_migration.c | 45 + > 1 file changed, 29 insertions(+), 16 deletions

Re: [libvirt] [PATCH 02/24] qemu: Refactor the code to build -incoming command line

2015-11-13 Thread Peter Krempa
On Thu, Nov 12, 2015 at 19:37:04 +0100, Jiri Denemark wrote: > Move the code from qemuBuildCommandLine into dedicated functions. > > Signed-off-by: Jiri Denemark > --- > > Notes: > Both functions will later be moved to qemu_migration.c > > src/qemu/qemu_command.c | 75 > ++

Re: [libvirt] [PATCH 02/24] qemu: Refactor the code to build -incoming command line

2015-11-13 Thread Peter Krempa
On Fri, Nov 13, 2015 at 10:28:08 +0100, Jiri Denemark wrote: > On Fri, Nov 13, 2015 at 10:06:08 +0100, Peter Krempa wrote: > > On Thu, Nov 12, 2015 at 19:37:04 +0100, Jiri Denemark wrote: > > > Move the code from qemuBuildCommandLine into dedicated functions. > > >

Re: [libvirt] [PATCH 03/24] qemu: Don't generate migration URI in qemuBuildCommandLine

2015-11-13 Thread Peter Krempa
On Thu, Nov 12, 2015 at 19:37:05 +0100, Jiri Denemark wrote: > Make callers of qemuBuildCommandLine responsible for providing the URI > which should be passed as a parameter for -incoming. > > Signed-off-by: Jiri Denemark > --- > src/qemu/qemu_command.c | 32 >

Re: [libvirt] [PATCH 04/24] qemu: Move incoming URI code to qemu_migration

2015-11-13 Thread Peter Krempa
On Thu, Nov 12, 2015 at 19:37:06 +0100, Jiri Denemark wrote: > Signed-off-by: Jiri Denemark > --- > src/qemu/qemu_command.c | 39 --- > src/qemu/qemu_command.h | 5 - > src/qemu/qemu_migration.c | 40 > src/qemu

Re: [libvirt] [PATCH 05/24] qemu: Introduce qemuProcessIncomingDef

2015-11-13 Thread Peter Krempa
On Thu, Nov 12, 2015 at 19:37:07 +0100, Jiri Denemark wrote: > Incoming migration may require quite a few parameters (URI, fd, path) to > be considered while starting QEMU and we will soon add another one. > Let's group all of them in a single struct. > > Signed-off-by: Jiri Denemark > --- > src

Re: [libvirt] [PATCH 06/24] qemu: Always set async job when starting a domain

2015-11-13 Thread Peter Krempa
On Thu, Nov 12, 2015 at 19:37:08 +0100, Jiri Denemark wrote: > We only started an async job for incoming migration from another host. > When we were starting a domain from scratch or restoring from a saved > state (migration from file) we didn't set any async job. Let's introduce > a new QEMU_ASYNC

Re: [libvirt] [PATCH 07/24] qemu: Add APIs for migrate-incoming QMP command

2015-11-13 Thread Peter Krempa
On Thu, Nov 12, 2015 at 19:37:09 +0100, Jiri Denemark wrote: > Signed-off-by: Jiri Denemark > --- > src/qemu/qemu_monitor.c | 12 > src/qemu/qemu_monitor.h | 3 +++ > src/qemu/qemu_monitor_json.c | 25 + > src/qemu/qemu_monitor_json.h | 5 + >

Re: [libvirt] [PATCH 08/24] qemu: Use -incoming defer for migrations

2015-11-13 Thread Peter Krempa
On Thu, Nov 12, 2015 at 19:37:10 +0100, Jiri Denemark wrote: > Traditionally, we pass incoming migration URI on QEMU command line, > which has some drawbacks. Depending on the URI QEMU may initialize its > migration state immediately without giving us a chance to set any > additional migration para

Re: [libvirt] [PATCH 09/24] qemu: Rename stdin_{fd, path} in qemuProcessStart

2015-11-13 Thread Peter Krempa
On Thu, Nov 12, 2015 at 19:37:11 +0100, Jiri Denemark wrote: > Signed-off-by: Jiri Denemark > --- > src/qemu/qemu_process.c | 22 +++--- > 1 file changed, 11 insertions(+), 11 deletions(-) ACK signature.asc Description: Digital signature -- libvir-list mailing list libvir-list@

Re: [libvirt] [PATCH 10/24] qemu: Separate hook handling code from qemuProcessStart

2015-11-13 Thread Peter Krempa
On Thu, Nov 12, 2015 at 19:37:12 +0100, Jiri Denemark wrote: > qemuProcessStart is so big that any nontrivial code should be moved to > dedicated functions to make the code easier to read and maintain. > > Signed-off-by: Jiri Denemark > --- > src/qemu/qemu_process.c | 80 > +

Re: [libvirt] [PATCH 11/24] qemu: Separate graphics handling code from qemuProcessStart

2015-11-13 Thread Peter Krempa
On Thu, Nov 12, 2015 at 19:37:13 +0100, Jiri Denemark wrote: > qemuProcessStart is so big that any nontrivial code should be moved to > dedicated functions to make the code easier to read and maintain. > > Signed-off-by: Jiri Denemark > --- > src/qemu/qemu_process.c | 147 >

Re: [libvirt] [PATCH 12/24] qemu: Separate raw IO code from qemuProcessStart

2015-11-13 Thread Peter Krempa
On Thu, Nov 12, 2015 at 19:37:14 +0100, Jiri Denemark wrote: > qemuProcessStart is so big that any nontrivial code should be moved to > dedicated functions to make the code easier to read and maintain. > > Signed-off-by: Jiri Denemark > --- > src/qemu/qemu_process.c | 105 >

Re: [libvirt] [PATCH 13/24] qemu: Enter monitor within qemuProcessSetLinkStates

2015-11-13 Thread Peter Krempa
On Thu, Nov 12, 2015 at 19:37:15 +0100, Jiri Denemark wrote: > Move {Enter,Exit}Monitor calls inside qemuProcessSetLinkStates to > simplify qemuProcessStart. > > Signed-off-by: Jiri Denemark > --- > src/qemu/qemu_process.c | 38 +++--- > 1 file changed, 23 inserti

Re: [libvirt] [PATCH 14/24] qemu: Separate balloon code from qemuProcessStart

2015-11-13 Thread Peter Krempa
On Thu, Nov 12, 2015 at 19:37:16 +0100, Jiri Denemark wrote: > qemuProcessStart is so big that any nontrivial code should be moved to > dedicated functions to make the code easier to read and maintain. > > Signed-off-by: Jiri Denemark > --- > src/qemu/qemu_process.c | 56 > +

Re: [libvirt] [PATCH 15/24] qemu: Introduce qemuProcessMakeDir

2015-11-13 Thread Peter Krempa
On Thu, Nov 12, 2015 at 19:37:17 +0100, Jiri Denemark wrote: > qemuProcessMakeDir is used for creating a per-domain directory in a > given parent directory. > > Signed-off-by: Jiri Denemark > --- > src/qemu/qemu_process.c | 59 > + > 1 file change

Re: [libvirt] [PATCH 16/24] qemu: Do not infer flags from other qemuProcessStart arguments

2015-11-13 Thread Peter Krempa
On Thu, Nov 12, 2015 at 19:37:18 +0100, Jiri Denemark wrote: > Every caller setting migrateFrom already sets > VIR_QEMU_PROCESS_START_PAUSED flag anyway. Indeed. > > Signed-off-by: Jiri Denemark > --- > src/qemu/qemu_process.c | 3 --- > 1 file changed, 3 deletions(-) ACK signature.asc Desc

Re: [libvirt] [PATCH 17/24] qemu: Close logfd when closing monitor

2015-11-13 Thread Peter Krempa
On Thu, Nov 12, 2015 at 19:37:19 +0100, Jiri Denemark wrote: > Remembering to call qemuMonitorSetDomainLog in the right paths before > calling qemuProcessStop is annoying and easy to forget. And I already > forget to do so in commit v1.2.8-52-g0389060: logfd may be leaked if forgot > QEMU process

Re: [libvirt] [PATCH 18/24] qemu: Introduce qemuProcessInit

2015-11-13 Thread Peter Krempa
On Thu, Nov 12, 2015 at 19:37:20 +0100, Jiri Denemark wrote: > qemuProcessStart is going to be split in three parts: qemuProcessInit, > qemuProcessLaunch, and qemuProcessFinish so that migration Prepare phase > can insert additional code in the process. qemuProcessStart will be a > small wrapper fo

Re: [libvirt] [PATCH 19/24] qemu: Introduce qemuProcessLaunch

2015-11-13 Thread Peter Krempa
On Thu, Nov 12, 2015 at 19:37:21 +0100, Jiri Denemark wrote: > Once qemuProcessInit was called, qemuProcessLaunch will launch a new > QEMU process with stopped virtual CPUs. > > Signed-off-by: Jiri Denemark > --- > src/qemu/qemu_process.c | 162 >

Re: [libvirt] [PATCH 20/24] qemu: Introduce qemuProcessFinish

2015-11-13 Thread Peter Krempa
On Thu, Nov 12, 2015 at 19:37:22 +0100, Jiri Denemark wrote: > Finishes starting a new domain launched by qemuProcessLaunch. > > Signed-off-by: Jiri Denemark > --- > src/qemu/qemu_process.c | 76 > + > src/qemu/qemu_process.h | 6 > 2 files

Re: [libvirt] [PATCH 21/24] qemu: Separate incoming URI generation from qemuMigrationPrepareAny

2015-11-13 Thread Peter Krempa
On Thu, Nov 12, 2015 at 19:37:23 +0100, Jiri Denemark wrote: > Signed-off-by: Jiri Denemark > --- > src/qemu/qemu_migration.c | 154 > +- > 1 file changed, 85 insertions(+), 69 deletions(-) > ACK signature.asc Description: Digital signature -- libv

<    4   5   6   7   8   9   10   11   12   13   >