Re: [libvirt] [PATCH v2 1/2] util: Check if kernel-provided info is consistent with itself

2018-02-05 Thread Peter Krempa
On Mon, Feb 05, 2018 at 10:37:25 +0100, Martin Kletzander wrote: > On Fri, Feb 02, 2018 at 06:02:22PM +0100, Peter Krempa wrote: > > On Fri, Feb 02, 2018 at 15:27:21 +0100, Martin Kletzander wrote: > > > Just in case someone re-mounted /sys/fs/resctrl with different mount > > > options (cdp), add

Re: [libvirt] [PATCH 2/2] qemu: Add and use qemuProcessEventFree for freeing qemuProcessEvents

2018-02-05 Thread Michal Privoznik
On 02/05/2018 11:17 AM, Marc Hartmayer wrote: > On Mon, Feb 05, 2018 at 10:35 AM +0100, Michal Privoznik > wrote: >> On 02/02/2018 01:13 PM, Marc Hartmayer wrote: >>> Add and use qemuProcessEventFree for freeing qemuProcessEvents. This >>> is less error-prone as the compiler

Re: [libvirt] [PATCH 2/2] qemu: Add and use qemuProcessEventFree for freeing qemuProcessEvents

2018-02-05 Thread Marc Hartmayer
On Mon, Feb 05, 2018 at 11:31 AM +0100, Michal Privoznik wrote: > On 02/05/2018 11:17 AM, Marc Hartmayer wrote: >> On Mon, Feb 05, 2018 at 10:35 AM +0100, Michal Privoznik >> wrote: >>> On 02/02/2018 01:13 PM, Marc Hartmayer wrote: Add and use

Re: [libvirt] [PATCH 0/2] Memory leak fix and some refactoring

2018-02-05 Thread Marc Hartmayer
On Mon, Feb 05, 2018 at 10:35 AM +0100, Michal Privoznik wrote: > On 02/02/2018 01:13 PM, Marc Hartmayer wrote: >> The second patch fixes the memory leak. >> >> Marc Hartmayer (2): >> qemu: Use the return value of virObjectRef directly >> qemu: Add and use

Re: [libvirt] [PATCH 2/2] qemu: Add and use qemuProcessEventFree for freeing qemuProcessEvents

2018-02-05 Thread Michal Privoznik
On 02/05/2018 12:32 PM, Marc Hartmayer wrote: > On Mon, Feb 05, 2018 at 11:31 AM +0100, Michal Privoznik > wrote: >> On 02/05/2018 11:17 AM, Marc Hartmayer wrote: >>> On Mon, Feb 05, 2018 at 10:35 AM +0100, Michal Privoznik >>> wrote: On

Re: [libvirt] [PATCH v2 2/2] qemu: Refresh capabilities when creating resctrl allocation

2018-02-05 Thread Peter Krempa
On Mon, Feb 05, 2018 at 10:40:58 +0100, Martin Kletzander wrote: > On Fri, Feb 02, 2018 at 06:05:56PM +0100, Peter Krempa wrote: > > On Fri, Feb 02, 2018 at 15:27:22 +0100, Martin Kletzander wrote: > > > Since one of the things in capabilities (info from resctrl updated with > > > data > > >

Re: [libvirt] [PATCH 2/2] qemu: Add and use qemuProcessEventFree for freeing qemuProcessEvents

2018-02-05 Thread Marc Hartmayer
On Mon, Feb 05, 2018 at 10:35 AM +0100, Michal Privoznik wrote: > On 02/02/2018 01:13 PM, Marc Hartmayer wrote: >> Add and use qemuProcessEventFree for freeing qemuProcessEvents. This >> is less error-prone as the compiler can help us make sure that for >> every new

Re: [libvirt] [RFC] cgroup settings and systemd daemon-reload conflict

2018-02-05 Thread Nikolay Shirokovskiy
ping On 30.01.2018 10:34, Nikolay Shirokovskiy wrote: > Hi, all. > > It turns out that systemd daemon-reload reset settings that are managable > thru 'systemctl set-property' interface. > >> virsh schedinfo tst3 | grep global_quota > global_quota : -1 >> virsh schedinfo tst3 --set

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

2018-02-05 Thread Michal Privoznik
On 02/01/2018 08:51 AM, Nikolay Shirokovskiy wrote: > > > On 29.01.2018 09:09, Michal Privoznik wrote: >> On 12/20/2017 07:35 AM, Nikolay Shirokovskiy wrote: >>> Host tcp4/tcp6 ports is a global resource thus we need to make >>> port accounting also global or we have issues described in [1] when

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

2018-02-05 Thread Daniel P . Berrangé
On Mon, Feb 05, 2018 at 01:39:56PM +0100, Michal Privoznik wrote: > On 02/01/2018 08:51 AM, Nikolay Shirokovskiy wrote: > > > > > > On 29.01.2018 09:09, Michal Privoznik wrote: > >> On 12/20/2017 07:35 AM, Nikolay Shirokovskiy wrote: > >>> Host tcp4/tcp6 ports is a global resource thus we need

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

2018-02-05 Thread Daniel P . Berrangé
On Mon, Feb 05, 2018 at 02:11:24PM +0100, Peter Krempa wrote: > On Mon, Feb 05, 2018 at 12:55:11 +, Daniel Berrange wrote: > > On Mon, Feb 05, 2018 at 01:39:56PM +0100, Michal Privoznik wrote: > > > On 02/01/2018 08:51 AM, Nikolay Shirokovskiy wrote: > > > > > > > > > > > > On 29.01.2018

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

2018-02-05 Thread Michal Privoznik
On 02/05/2018 02:21 PM, Daniel P. Berrangé wrote: > On Mon, Feb 05, 2018 at 02:11:24PM +0100, Peter Krempa wrote: >> On Mon, Feb 05, 2018 at 12:55:11 +, Daniel Berrange wrote: >>> On Mon, Feb 05, 2018 at 01:39:56PM +0100, Michal Privoznik wrote: On 02/01/2018 08:51 AM, Nikolay

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

2018-02-05 Thread Nikolay Shirokovskiy
On 05.02.2018 16:27, Michal Privoznik wrote: > On 02/05/2018 02:21 PM, Daniel P. Berrangé wrote: >> On Mon, Feb 05, 2018 at 02:11:24PM +0100, Peter Krempa wrote: >>> On Mon, Feb 05, 2018 at 12:55:11 +, Daniel Berrange wrote: On Mon, Feb 05, 2018 at 01:39:56PM +0100, Michal Privoznik

Re: [libvirt] [PATCH 0/6] util: bitmap: Various fixes and improvements

2018-02-05 Thread Martin Kletzander
On Mon, Feb 05, 2018 at 02:17:41PM +0100, Peter Krempa wrote: Peter Krempa (6): util: bitmap: Rename 'max_bit' to 'nbits' util: bitmap: Fix function formatting and spacing util: bitmap: Add comments for functions which don't have them util: bitmap: Fix value of 'map_alloc' when shrinking

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

2018-02-05 Thread Peter Krempa
On Mon, Feb 05, 2018 at 12:55:11 +, Daniel Berrange wrote: > On Mon, Feb 05, 2018 at 01:39:56PM +0100, Michal Privoznik wrote: > > On 02/01/2018 08:51 AM, Nikolay Shirokovskiy wrote: > > > > > > > > > On 29.01.2018 09:09, Michal Privoznik wrote: > > >> On 12/20/2017 07:35 AM, Nikolay

Re: [libvirt] [RFC] kvm: x86: export vCPU halted state to sysfs

2018-02-05 Thread Viktor Mihajlovski
On 02.02.2018 21:41, Eduardo Habkost wrote: > On Fri, Feb 02, 2018 at 03:19:45PM -0500, Luiz Capitulino wrote: >> On Fri, 2 Feb 2018 18:09:12 -0200 >> Eduardo Habkost wrote: > [...] >>> Your plan above covers what will happen when using newer QEMU >>> versions, but libvirt

[libvirt] [PATCH 2/6] util: bitmap: Fix function formatting and spacing

2018-02-05 Thread Peter Krempa
--- src/util/virbitmap.c | 107 +++ 1 file changed, 83 insertions(+), 24 deletions(-) diff --git a/src/util/virbitmap.c b/src/util/virbitmap.c index c1b97d90fb..4229aa286e 100644 --- a/src/util/virbitmap.c +++ b/src/util/virbitmap.c @@ -136,7

Re: [libvirt] [PATCH v3] virt-aa-helper: Skip feature support checks while parsing

2018-02-05 Thread Peter Krempa
On Mon, Feb 05, 2018 at 08:11:02 -0500, Shivaprasad G Bhat wrote: > virt-aa-helper need not verify the feature support as > libvirt does it during domain creation anyway. > > Signed-off-by: Shivaprasad G Bhat > --- > src/conf/domain_conf.c|3 +++ >

[libvirt] [PATCH v3] virt-aa-helper: Skip feature support checks while parsing

2018-02-05 Thread Shivaprasad G Bhat
virt-aa-helper need not verify the feature support as libvirt does it during domain creation anyway. Signed-off-by: Shivaprasad G Bhat --- src/conf/domain_conf.c|3 +++ src/conf/domain_conf.h|1 + src/security/virt-aa-helper.c |6 +- 3

Re: [libvirt] [PATCH v2] virt-aa-helper: Set the supported features

2018-02-05 Thread Shivaprasad bhat
Thanks for the reply Peter, Christian On Fri, Feb 2, 2018 at 3:21 PM, Peter Krempa wrote: > On Fri, Feb 02, 2018 at 08:14:29 +0100, Christian Ehrhardt wrote: > > On Fri, Jan 19, 2018 at 3:55 PM, Shivaprasad G Bhat > > wrote: > > > The

[libvirt] [PATCH 6/6] util: bitmap: Note that shrinking the bitmap requires clearing of unused bits

2018-02-05 Thread Peter Krempa
Note the fact that the unused portion of the last element in the bitmap needs to be cleared, since we use functions which process only full-size elements and don't really deal with individual bits. --- src/util/virbitmap.c | 4 1 file changed, 4 insertions(+) diff --git

[libvirt] [PATCH 5/6] util: bitmap: Use VIR_SHRINK_N in virBitmapShrink

2018-02-05 Thread Peter Krempa
The function only reduces the size of the bitmap thus we can use the appropriate shrinking function which also does not have any return value. Since virBitmapShrink now does not return any value callers need to be fixed as well. --- src/conf/domain_conf.c | 3 +-- src/util/virbitmap.c | 20

[libvirt] [PATCH 4/6] util: bitmap: Fix value of 'map_alloc' when shrinking bitmap

2018-02-05 Thread Peter Krempa
The virBitmap code uses VIR_RESIZE_N to do quadratic scaling, which means that along with the number of requested map elements we also need to keep the number of actually allocated elements for the scaling algorithm to work properly. The shrinking code did not fix 'map_alloc' thus virResizeN

Re: [libvirt] [PATCH v2] virt-aa-helper: Set the supported features

2018-02-05 Thread Peter Krempa
On Mon, Feb 05, 2018 at 18:39:24 +0530, Shivaprasad bhat wrote: > Thanks for the reply Peter, Christian > > On Fri, Feb 2, 2018 at 3:21 PM, Peter Krempa wrote: > > > On Fri, Feb 02, 2018 at 08:14:29 +0100, Christian Ehrhardt wrote: > > > On Fri, Jan 19, 2018 at 3:55 PM,

[libvirt] [PATCH 0/6] util: bitmap: Various fixes and improvements

2018-02-05 Thread Peter Krempa
Peter Krempa (6): util: bitmap: Rename 'max_bit' to 'nbits' util: bitmap: Fix function formatting and spacing util: bitmap: Add comments for functions which don't have them util: bitmap: Fix value of 'map_alloc' when shrinking bitmap util: bitmap: Use VIR_SHRINK_N in virBitmapShrink

[libvirt] [PATCH 1/6] util: bitmap: Rename 'max_bit' to 'nbits'

2018-02-05 Thread Peter Krempa
'max_bit' is misleading as the value is set to the first invalid bit as it's used as the number of bits in the bitmap. Rename it to a more descriptive name. --- src/util/virbitmap.c | 54 ++-- 1 file changed, 27 insertions(+), 27 deletions(-) diff

[libvirt] [PATCH 3/6] util: bitmap: Add comments for functions which don't have them

2018-02-05 Thread Peter Krempa
virBitmap code is thoroughly documented. Add docs for the few functions missing them. --- src/util/virbitmap.c | 29 - 1 file changed, 28 insertions(+), 1 deletion(-) diff --git a/src/util/virbitmap.c b/src/util/virbitmap.c index 4229aa286e..0973731e3a 100644 ---

Re: [libvirt] [RFC] kvm: x86: export vCPU halted state to sysfs

2018-02-05 Thread Daniel P . Berrangé
On Mon, Feb 05, 2018 at 02:43:15PM +0100, Viktor Mihajlovski wrote: > On 02.02.2018 21:41, Eduardo Habkost wrote: > > On Fri, Feb 02, 2018 at 03:19:45PM -0500, Luiz Capitulino wrote: > >> On Fri, 2 Feb 2018 18:09:12 -0200 > >> Eduardo Habkost wrote: > > [...] > >>> Your plan

Re: [libvirt] [PATCH v5 02/10] qemu: Introduce QEMU_DOMAIN_JOB_STATS_TYPE_SAVEDUMP

2018-02-05 Thread Jiri Denemark
On Fri, Feb 02, 2018 at 17:40:10 -0500, John Ferlan wrote: > Add a TYPE_SAVEDUMP so that when coalescing stats for a save or > dump we don't needlessly try to get the mirror stats for a migration. > Other conditions can still use MIGRATION and SAVEDUMP interchangably > including usage of the

[libvirt] [PATCH v3 14/15] build: passing the "-z defs" linker flag to prevent undefined symbols

2018-02-05 Thread Daniel P . Berrangé
Undefined symbols are a bad thing in general because they can get resolved in unexpected ways at runtime if multiple sources provide the same symbol name. For example both glibc and libtirpc may provide XDR symbols and we want to ensure that we resolve to libtirpc if that's what we originally

[libvirt] [PATCH v3 05/15] conf: introduce callback registration for domain net device allocation

2018-02-05 Thread Daniel P . Berrangé
Currently virt drivers will call directly into the network driver impl to allocate domain interface devices where type=network. This introduces a callback system to allow us to decouple the virt drivers from the network driver. Signed-off-by: Daniel P. Berrangé ---

[libvirt] [PATCH v3 15/15] cfg: forbid includes of headers in network and storage drivers again

2018-02-05 Thread Daniel P . Berrangé
Loadable drivers must never depend on each other. Over time some usage mistakenly crept in for the storage and network drivers, but now this is eliminated the syntax-check rules can enforce this separation once more. Signed-off-by: Daniel P. Berrangé --- cfg.mk

[libvirt] [PATCH v3 11/15] storage: export virStoragePoolLookupByTargetPath as a public API

2018-02-05 Thread Daniel P . Berrangé
The storagePoolLookupByTargetPath() method in the storage driver is used by the QEMU driver during block migration. If there's a valid use case for this in the QEMU driver, then external apps likely have similar needs. Exposing it in the public API removes the direct dependancy from the QEMU

[libvirt] [PATCH v3 00/15] Misc build refactoring / isolation work

2018-02-05 Thread Daniel P . Berrangé
This was triggered by the recent Fedora change to add '-z defs' to RPM builds by default which breaks libvirt. Various make rule changes can fix much of the problem, but it also requires source refactoring to get rid of places where virt drivers directly call into the storage/network drivers.

[libvirt] [PATCH v3 06/15] conf: expand network device callbacks to cover bandwidth updates

2018-02-05 Thread Daniel P . Berrangé
Currently the QEMU driver will call directly into the network driver impl to modify network device bandwidth for interfaces with type=network. This introduces a callback system to allow us to decouple the QEMU driver from the network driver. Signed-off-by: Daniel P. Berrangé

[libvirt] [PATCH v3 12/15] build: explicitly link all modules with libvirt.so

2018-02-05 Thread Daniel P . Berrangé
The dlopened modules we currently build all use various symbols from libvirt.so, but don't actually link to it. They rely on the libvirtd daemon re-exporting the libvirt.so symbols. This means that at the time the modules are linked, they contain a huge number of undefined symbols. It also means

[libvirt] [PATCH] virlog: determine the hostname on startup CVE-2018-XXX

2018-02-05 Thread Daniel P . Berrangé
From: Lubomir Rintel At later point it might not be possible or even safe to use getaddrinfo(). It can in turn result in a load of NSS module. Notably, on a LXC container startup we may find ourselves with the guest filesystem already having replaced the host one. Loading a NSS

Re: [libvirt] [PATCH v5 01/10] qemu: Convert jobInfo stats into a union

2018-02-05 Thread Jiri Denemark
On Fri, Feb 02, 2018 at 17:40:09 -0500, John Ferlan wrote: > Convert the stats field in _qemuDomainJobInfo to be a union. This > will allow for the collection of various different types of stats > in the same field. > > When starting the async job that will end up being used for stats, > set the

[libvirt] [PATCH v3 08/15] conf: expand network device callbacks to cover resolving NIC type

2018-02-05 Thread Daniel P . Berrangé
Currently the QEMU driver will call directly into the network driver impl to modify resolve the atual type of NICs with type=network. It has todo this before it has allocated the actual NIC. This introduces a callback system to allow us to decouple the QEMU driver from the network driver. This is

[libvirt] [PATCH v3 01/15] storage: extract storage file backend from main storage driver backend

2018-02-05 Thread Daniel P . Berrangé
The storage driver backends are serving the public storage pools API, while the storage file backends are serving the internal QEMU driver and / or libvirt utility code. To prep for moving this storage file backend framework into the utility code, split out the backend definitions.

[libvirt] [PATCH v3 02/15] storage: move storage file backend framework into util directory

2018-02-05 Thread Daniel P . Berrangé
The QEMU driver loadable module needs to be able to resolve all ELF symbols it references against libvirt.so. Some of its symbols can only be resolved against the storage_driver.so loadable module which creates a hard dependancy between them. By moving the storage file backend framework into the

[libvirt] [PATCH v3 03/15] rpc: don't link in second copy of RPC code to libvirtd & lockd plugin

2018-02-05 Thread Daniel P . Berrangé
The libvirt_driver_remote.la static library is linked into the libvirt.so dynamic library, providing both the generic RPC layer code and the remote protocol client driver. The libvirtd daemon the itself links to libvirt_driver_remote.la, in order to get access to the generic RPC layer code and the

[libvirt] [PATCH v3 10/15] conf: move virStorageTranslateDiskSourcePool into domain conf

2018-02-05 Thread Daniel P . Berrangé
The virStorageTranslateDiskSourcePool method modifies a virDomainDiskDef to resolve any storage pool reference. For some reason this was added into the storage driver code, despite working entirely in terms of the public APIs. Move it into the domain conf file and rename it to match the object it

[libvirt] [PATCH v3 07/15] qemu: replace networkGetNetworkAddress with public API calls

2018-02-05 Thread Daniel P . Berrangé
The QEMU driver calls into the network driver to get the first IP address of the network. This information is readily available via the formal public API by fetching the XML doc and then parsing it. Signed-off-by: Daniel P. Berrangé --- src/network/bridge_driver.c | 98

[libvirt] [PATCH v3 13/15] build: provide a AM_FLAGS_MOD for loadable modules

2018-02-05 Thread Daniel P . Berrangé
Dynamic loadable modules all need a common set of linker flags -module -avoid-version $(AM_LDFLAGS) Bundle those up into a $(AM_LDFLAGS_MOD) to avoid repetition. Signed-off-by: Daniel P. Berrangé --- src/Makefile.am | 69

[libvirt] [PATCH v3 09/15] network: remove conditional declarations

2018-02-05 Thread Daniel P . Berrangé
The networkDnsmasqConfContents() method is only used by the test suite and that's only built with WITH_NETWORK is set. So there is no longer any reason to conditionalize the declaration of this method. Signed-off-by: Daniel P. Berrangé --- src/network/bridge_driver.h | 9

[libvirt] [PATCH v3 04/15] build: link libvirt_lxc against libvirt.so

2018-02-05 Thread Daniel P . Berrangé
Rather than static linking in various of the helper libraries to libvirt_lxc, just link against the main libvirt.so. This is more memory and time efficient because it will already be cached in memory and sharable between processes. CAPNG flags need adding because the LXC code directly calls

Re: [libvirt] [RFC] kvm: x86: export vCPU halted state to sysfs

2018-02-05 Thread Luiz Capitulino
On Mon, 5 Feb 2018 13:47:27 + Daniel P. Berrangé wrote: > On Mon, Feb 05, 2018 at 02:43:15PM +0100, Viktor Mihajlovski wrote: > > On 02.02.2018 21:41, Eduardo Habkost wrote: > > > On Fri, Feb 02, 2018 at 03:19:45PM -0500, Luiz Capitulino wrote: > > >> On Fri, 2 Feb

Re: [libvirt] [PATCH v5 03/10] qemu: Introduce QEMU_DOMAIN_JOB_STATS_TYPE_MEMDUMP

2018-02-05 Thread Jiri Denemark
On Fri, Feb 02, 2018 at 17:40:11 -0500, John Ferlan wrote: > Define the qemuMonitorDumpStats as a new job JobStatsType to handle > being able to get memory dump statistics. For now do nothing with > the new TYPE_MEMDUMP. > > Reviewed-by: Jiri Denemark > Signed-off-by: John

Re: [libvirt] [PATCH v5 07/10] qemu: Introduce qemuDomainGetJobInfoDumpStats

2018-02-05 Thread Jiri Denemark
On Fri, Feb 02, 2018 at 17:40:15 -0500, John Ferlan wrote: > Add an API to allow fetching the memory only dump statistics > for a job via the qemuDomainGetJobInfo API. > > Signed-off-by: John Ferlan > --- > src/qemu/qemu_domain.c | 50

[libvirt] [PATCH REBASE 0/2] qemu: Clean up PCI controller options

2018-02-05 Thread Andrea Bolognani
Rebase of https://www.redhat.com/archives/libvir-list/2017-December/msg00154.html on top of master, now that patch 1/3 has been merged as part of John's work to move controller checks from command line generation to guest validation. Andrea Bolognani (2): tests: Add some tests for PCI

Re: [libvirt] [RFC] kvm: x86: export vCPU halted state to sysfs

2018-02-05 Thread Viktor Mihajlovski
On 05.02.2018 16:37, Luiz Capitulino wrote: > On Mon, 5 Feb 2018 13:47:27 + > Daniel P. Berrangé wrote: > >> On Mon, Feb 05, 2018 at 02:43:15PM +0100, Viktor Mihajlovski wrote: >>> On 02.02.2018 21:41, Eduardo Habkost wrote: On Fri, Feb 02, 2018 at 03:19:45PM

Re: [libvirt] [PATCH v5 09/10] qemu: Allow showing the dump progress for memory only dump

2018-02-05 Thread Jiri Denemark
On Fri, Feb 02, 2018 at 17:40:17 -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

[libvirt] [PATCH REBASE 1/2] tests: Add some tests for PCI controller options

2018-02-05 Thread Andrea Bolognani
The input configurations set all existing options for all PCI controllers, to see what ends up showing up in the output. Signed-off-by: Andrea Bolognani --- .../i440fx-controllers-pciopts.args| 24 +++ .../i440fx-controllers-pciopts.xml |

[libvirt] [PATCH REBASE 2/2] qemu: Clean up PCI controller options

2018-02-05 Thread Andrea Bolognani
Most of the options are only applicable to one or two controller types, so they should be filtered out everywhere else. This will reduce user confusion and, in at least one corner case, prevent guests from disappearing on daemon restart. Resolves:

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

2018-02-05 Thread Christoffer Dall
Hi Dave, On Fri, Jan 26, 2018 at 05:28:49PM +, Dave Martin wrote: > New feature KVM_ARM_VCPU_SVE: > > * enables exposure of SVE to the guest > > * enables visibility of / access to KVM_REG_ARM_SVE_*() via KVM reg >ioctls. The main purposes of this are a) is to allow userspace to hide

Re: [libvirt] [PATCH v5 03/10] qemu: Introduce QEMU_DOMAIN_JOB_STATS_TYPE_MEMDUMP

2018-02-05 Thread John Ferlan
On 02/05/2018 10:41 AM, Jiri Denemark wrote: > On Fri, Feb 02, 2018 at 17:40:11 -0500, John Ferlan wrote: >> Define the qemuMonitorDumpStats as a new job JobStatsType to handle >> being able to get memory dump statistics. For now do nothing with >> the new TYPE_MEMDUMP. >> >> Reviewed-by: Jiri

Re: [libvirt] [RFC] kvm: x86: export vCPU halted state to sysfs

2018-02-05 Thread Luiz Capitulino
On Mon, 5 Feb 2018 17:10:18 +0100 Viktor Mihajlovski wrote: > On 05.02.2018 16:37, Luiz Capitulino wrote: > > On Mon, 5 Feb 2018 13:47:27 + > > Daniel P. Berrangé wrote: > > > >> On Mon, Feb 05, 2018 at 02:43:15PM +0100, Viktor

[libvirt] [PATCH 0/3] lock manager plugin dlm-corosync implementation

2018-02-05 Thread river
This is the implementation of the RFC from https://www.redhat.com/archives/libvir-list/2017-December/msg00689.html The following is the design of this iplementation. Environmental requirements: DLM is a symmetric general-purpose distributed lock manager, consisting of a kernel modules

[libvirt] [PATCH 1/3] Add a plugin dlm for lock manager

2018-02-05 Thread river
dlm is implemented by linux kernel, provides userspace API by 'libdlm' to lock/unlock resource, cooperated with cluster communication software, such as corosync, could satisfy the demands of libvirt lock manager. Signed-off-by: river --- configure.ac |6 +

[libvirt] [PATCH 2/3] Fix release of locks with dlm plugin

2018-02-05 Thread river
The dlm lock plugin couldn't release locks when the vm instance was destroyed, kill manually because that we can't use file descriptor which couldn't adopt after libvirtd reboot to be aware of the process dead, we need to proactively to release the lock just like unlink the .xml and .pid files.

[libvirt] [PATCH 3/3] Add configuration files for dlm plugin

2018-02-05 Thread river
Signed-off-by: river --- .gitignore | 2 ++ src/Makefile.am | 40 +++- src/libxl/libxl.conf| 8 +++--- src/locking/dlm.conf| 52 +

Re: [libvirt] [PATCH 1/2] qemu: Use the return value of virObjectRef directly

2018-02-05 Thread Michal Privoznik
On 02/02/2018 01:13 PM, Marc Hartmayer wrote: > Use the return value of virObjectRef directly. This way, it's easier > for another reader to identify the reason why the additional reference > is required. > > Signed-off-by: Marc Hartmayer > Reviewed-by: Boris

Re: [libvirt] [PATCH v2 2/2] qemu: Refresh capabilities when creating resctrl allocation

2018-02-05 Thread Martin Kletzander
On Fri, Feb 02, 2018 at 06:05:56PM +0100, Peter Krempa wrote: On Fri, Feb 02, 2018 at 15:27:22 +0100, Martin Kletzander wrote: Since one of the things in capabilities (info from resctrl updated with data about caches) can be change on the system by remounting the /sys/fs/resctrl with different

Re: [libvirt] [PATCH 2/2] qemu: Add and use qemuProcessEventFree for freeing qemuProcessEvents

2018-02-05 Thread Michal Privoznik
On 02/02/2018 01:13 PM, Marc Hartmayer wrote: > Add and use qemuProcessEventFree for freeing qemuProcessEvents. This > is less error-prone as the compiler can help us make sure that for > every new enumeration value of qemuProcessEventType the > qemuProcessEventFree function has to be adapted. >

Re: [libvirt] [PATCH 0/2] Memory leak fix and some refactoring

2018-02-05 Thread Michal Privoznik
On 02/02/2018 01:13 PM, Marc Hartmayer wrote: > The second patch fixes the memory leak. > > Marc Hartmayer (2): > qemu: Use the return value of virObjectRef directly > qemu: Add and use qemuProcessEventFree for freeing qemuProcessEvents > > src/qemu/qemu_domain.c | 23

Re: [libvirt] [PATCH v2 1/2] util: Check if kernel-provided info is consistent with itself

2018-02-05 Thread Martin Kletzander
On Fri, Feb 02, 2018 at 06:02:22PM +0100, Peter Krempa wrote: On Fri, Feb 02, 2018 at 15:27:21 +0100, Martin Kletzander wrote: Just in case someone re-mounted /sys/fs/resctrl with different mount options (cdp), add a check here. Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1540780

Re: [libvirt] [PATCH v4 3/4] nwfilter: Convert _virNWFilterObjList to use virObjectRWLockable

2018-02-05 Thread John Ferlan
[...] >>> >>> @@ -391,8 +449,11 @@ virNWFilterObjListAssignDef(virNWFilterObjListPtr >>> nwfilters, >>>   { >>>   virNWFilterObjPtr obj; >>>   virNWFilterDefPtr objdef; >>> +    char uuidstr[VIR_UUID_STRING_BUFLEN]; >>> >>> -    if ((obj = virNWFilterObjListFindByUUID(nwfilters,

Re: [libvirt] [RFC] kvm: x86: export vCPU halted state to sysfs

2018-02-05 Thread Luiz Capitulino
On Mon, 5 Feb 2018 20:50:20 -0200 Eduardo Habkost wrote: > On Mon, Feb 05, 2018 at 10:37:01AM -0500, Luiz Capitulino wrote: > [...] > > However, IMHO, what we really want is to add an API to the guest agent > > to export the CPU online bit from the guest userspace sysfs.

Re: [libvirt] [RFC] kvm: x86: export vCPU halted state to sysfs

2018-02-05 Thread Eduardo Habkost
On Mon, Feb 05, 2018 at 10:37:01AM -0500, Luiz Capitulino wrote: [...] > However, IMHO, what we really want is to add an API to the guest agent > to export the CPU online bit from the guest userspace sysfs. This will > give the ultimate semantics and move us away from this halted mess. Can't this

Re: [libvirt] [PATCH 01/14] virstoragefile: Introduce virStoragePRDef

2018-02-05 Thread Paolo Bonzini
On 29/01/2018 14:03, Michal Privoznik wrote: > On 01/26/2018 04:07 AM, John Ferlan wrote: >> >> >> On 01/18/2018 11:04 AM, Michal Privoznik wrote: >>> This is a definition that holds information on SCSI persistent >>> reservation settings. The XML part looks like this: >>> >>> >>> >>>