[libvirt] [PATCH] docs: Add notes for VIR_DOMAIN_SNAPSHOT_LIST_NO_METADATA

2018-11-13 Thread Han Han
When listing snapshot with VIR_DOMAIN_SNAPSHOT_LIST_NO_METADATA, it always returns 0 or no snapshot. Because we never implement funtions to list no-metadata snapshot in virDomainSnapshotObjListGetNames(): if ((data.flags & VIR_DOMAIN_SNAPSHOT_FILTERS_METADATA) ==

Re: [libvirt] [PATCHv2] libvirt: add daemon itself as shutdown reason

2018-11-13 Thread Erik Skultety
On Tue, Nov 13, 2018 at 03:36:59PM -0500, John Ferlan wrote: > From: Nikolay Shirokovskiy > > This patch introduces a new shutdown reason "daemon" in order > to indicate that the daemon needed to force shutdown the domain > as the best course of action to take at the moment. > > This action would

Re: [libvirt] [PATCHv2] libvirt: add daemon itself as shutdown reason

2018-11-13 Thread Nikolay Shirokovskiy
On 13.11.2018 23:36, John Ferlan wrote: > From: Nikolay Shirokovskiy > > This patch introduces a new shutdown reason "daemon" in order > to indicate that the daemon needed to force shutdown the domain > as the best course of action to take at the moment. > > This action would occur during

[libvirt] [PATCHv8 2/2] tools: Add help docs explaining 'domstats' cache monitor result

2018-11-13 Thread Wang Huaqiang
Add help document in explaining the cache monitor related 'domstats' result. This patch is written to address John's review comment regarding patch16-v7 and expected to be merged with previous patch and using that patch's committing message. Signed-off-by: Wang Huaqiang ---

[libvirt] [PATCHv8 1/2] qemu: Report cache occupancy (CMT) with domstats

2018-11-13 Thread Wang Huaqiang
Adding the interface in qemu to report CMT statistic information through command 'virsh domstats --cpu-total'. Below is a typical output: # virsh domstats 1 --cpu-total Domain: 'ubuntu16.04-base' ... cpu.cache.monitor.count=2

Re: [libvirt] [PATCHv8 16/17] qemu: Report cache occupancy (CMT) with domstats

2018-11-13 Thread Wang, Huaqiang
> -Original Message- > From: John Ferlan [mailto:jfer...@redhat.com] > Sent: Wednesday, November 14, 2018 7:57 AM > To: Wang, Huaqiang ; libvir-list@redhat.com > Cc: Feng, Shaohe ; Ding, Jian-feng feng.d...@intel.com>; Zang, Rui > Subject: Re: [PATCHv8 16/17] qemu: Report cache

Re: [libvirt] [PATCH v8 00/14] PCI passthrough support on s390

2018-11-13 Thread Yi Min Zhao
在 2018/11/13 下午10:35, Andrea Bolognani 写道: On Thu, 2018-11-08 at 19:00 +0800, Yi Min Zhao wrote: Abstract The PCI representation in QEMU has been extended for S390 allowing configuration of zPCI attributes like uid (user-defined identifier) and fid (PCI function identifier). The

Re: [libvirt] [PATCH v8 10/14] conf: Allocate/release 'uid' and 'fid' in PCI address

2018-11-13 Thread Yi Min Zhao
在 2018/11/13 下午10:29, Andrea Bolognani 写道: On Thu, 2018-11-08 at 19:00 +0800, Yi Min Zhao wrote: This patch adds new functions for reservation, assignment and release to handle the uid/fid. If the uid/fid is defined in the domain XML, they will be reserved directly in the collecting phase. If

Re: [libvirt] [PATCHv8 16/17] qemu: Report cache occupancy (CMT) with domstats

2018-11-13 Thread John Ferlan
On 11/12/18 8:31 AM, Wang Huaqiang wrote: > Adding the interface in qemu to report CMT statistic information > through command 'virsh domstats --cpu-total'. I believe virsh.pod needs an update to list this type of data in the domstats --cpu-total output. In any case, I need to drop off for

Re: [libvirt] [PATCHv8 15/17] qemu: Refactor qemuDomainGetStatsCpu

2018-11-13 Thread John Ferlan
On 11/12/18 8:31 AM, Wang Huaqiang wrote: > Refactoring qemuDomainGetStatsCpu, make it possible to add > more CPU statistics. > > Signed-off-by: Wang Huaqiang > --- > src/qemu/qemu_driver.c | 21 - > 1 file changed, 16 insertions(+), 5 deletions(-) > > diff --git

Re: [libvirt] [PATCHv8 14/17] qemu: enable resctrl monitor in qemu

2018-11-13 Thread John Ferlan
On 11/12/18 8:31 AM, Wang Huaqiang wrote: > Add functions for creating, destroying, reconnecting resctrl > monitor in qemu according to the configuration in domain XML. > > Signed-off-by: Wang Huaqiang > --- > src/qemu/qemu_process.c | 49 > -

Re: [libvirt] [PATCHv8 11/17] util: Add more interfaces for resctrl monitor

2018-11-13 Thread John Ferlan
On 11/12/18 8:31 AM, Wang Huaqiang wrote: > Add interfaces monitor group to support operations such > as add PID, get ID, remove group ... etc. virResctrlMonitorGetStats is perhaps a bit more than just basic stuff! So I can add: Implement the virResctrlMonitorGetStats to fetch all the

Re: [libvirt] [PATCHv8 10/17] util: Add interface for setting monitor ID.

2018-11-13 Thread John Ferlan
On 11/12/18 8:31 AM, Wang Huaqiang wrote: > Add virResctrlMonitorSetID by leveraging previous refactored patch. > > Signed-off-by: Wang Huaqiang > --- > src/util/virresctrl.c | 9 + > 1 file changed, 9 insertions(+) > This one won't compile alone - it's missing the virresctrl.h and

Re: [libvirt] [PATCHv8 09/17] util: Refactor virResctrlAllocSetID to set allocation ID

2018-11-13 Thread John Ferlan
On 11/12/18 8:31 AM, Wang Huaqiang wrote: > Refactor virResctrlAllocSetID. > In new code the error of id overwriting is reported promptly. > > Signed-off-by: Wang Huaqiang > --- > src/util/virresctrl.c | 25 - > 1 file changed, 20 insertions(+), 5 deletions(-) >

Re: [libvirt] [PATCHv8 12/17] conf: Remove virDomainResctrlAppend and introduce virDomainResctrlNew

2018-11-13 Thread John Ferlan
On 11/12/18 8:31 AM, Wang Huaqiang wrote: > Introduced virDomainResctrlNew to do the most part of virDomainResctrlAppend > and move the operation of appending resctrl to @def->resctrls out of > function. > > Rather than rely on virDomainResctrlAppend to perform the allocation, move > the onus

Re: [libvirt] [PATCHv8 01/17] docs, util: Refactor schemas and virresctrl to support optional cache

2018-11-13 Thread John Ferlan
On 11/12/18 8:31 AM, Wang Huaqiang wrote: > Refactor schemas and virresctrl to support optional element > in . > > Later, the monitor entry will be introduced and to be placed > under . Either cache entry or monitor entry is > an optional element of . > > An cachetune has no element is

Re: [libvirt] [PATCHv8 04/17] util: Add interface to determine monitor path

2018-11-13 Thread John Ferlan
On 11/12/18 8:31 AM, Wang Huaqiang wrote: > Add interface for resctrl monitor to determine the path. > > Signed-off-by: Wang Huaqiang > > Reviewed-by: John Ferlan > --- > src/libvirt_private.syms | 1 + > src/util/virresctrl.c| 55 > >

Re: [libvirt] [PATCHv8 03/17] util: Refactor code for determining allocation path

2018-11-13 Thread John Ferlan
On 11/12/18 8:31 AM, Wang Huaqiang wrote: > The code for determining resctrl allocation path could be reused > for monitor. Refactor it for reuse. > > Signed-off-by: Wang Huaqiang > --- > src/util/virresctrl.c | 38 ++ > 1 file changed, 30 insertions(+), 8

Re: [libvirt] [PATCHv8 05/17] util: Refactor code for adding PID to the resource group

2018-11-13 Thread John Ferlan
On 11/12/18 8:31 AM, Wang Huaqiang wrote: > The code of adding PID to the allocation could be reused, refactor it > for later reuse. > > Signed-off-by: Wang Huaqiang > --- > src/util/virresctrl.c | 30 +++--- > 1 file changed, 19 insertions(+), 11 deletions(-)

Re: [libvirt] [PATCHv8 02/17] util: Introduce resctrl monitor for CMT

2018-11-13 Thread John Ferlan
On 11/12/18 8:31 AM, Wang Huaqiang wrote: > Cache Monitoring Technology (aka CMT) provides the capability > to report cache utilization information of system task. > > This patch introduces the concept of resctrl monitor through > data structure virResctrlMonitor. > > Signed-off-by: Wang

Re: [libvirt] [PATCH v3 03/13] security: Always spawn process for transactions

2018-11-13 Thread John Ferlan
[...] >> >> I understand (generically) why we need the lock. I'm OK with it being >> enabled by default. That's not the question/ask. Building in a way to >> allow disabling usage of virFork and/or metadata lock knowing the >> "penalty" or downside to doing so goes beyond bug free or performance,

[libvirt] [PATCHv2] libvirt: add daemon itself as shutdown reason

2018-11-13 Thread John Ferlan
From: Nikolay Shirokovskiy This patch introduces a new shutdown reason "daemon" in order to indicate that the daemon needed to force shutdown the domain as the best course of action to take at the moment. This action would occur during reconnection when processing encounters an error once the

[libvirt] [PATCH RFC 3/3] qemu: Add ability to invalidate the capabilities cache

2018-11-13 Thread John Ferlan
Provide a mechanism via the QEMU driver reload functionality to invalidate all the capabilities cache and force a reread of the capabilities rather than requiring an admin to "know" they need to remove all the capability cache files and restart libvirtd. This still requires usage of the reload

[libvirt] [PATCH RFC 0/3] Add mechanisms to force QEMU capabilities refetches

2018-11-13 Thread John Ferlan
Sending as an RFC primarily because I'm looking for whether either or both mechanisms in the series is more or less desired. Likewise, if it's felt that the current process of telling customers to just delete the cache is acceptible, then so be it. If there's other ideas I'm willing to give them a

[libvirt] [PATCH RFC 2/3] util: Introduce virFileCacheForEach

2018-11-13 Thread John Ferlan
Add an API to allow traversing each of the file cache elements and invoking a virHashIterator callback function for each element. Signed-off-by: John Ferlan --- src/libvirt_private.syms | 1 + src/util/virfilecache.c | 24 src/util/virfilecache.h | 5 + 3 files

[libvirt] [PATCH RFC 1/3] qemu: Add check for whether nesting was enabled

2018-11-13 Thread John Ferlan
Support for nested kvm is handled via a kernel module configuration adjustment which if done after libvirtd is started and/or the last QEMU capabilities adjustment can result in the inability to start a guest and use nested kvm until the capabilities cache is invalidated. Thus, let's fetch and

Re: [libvirt] [PATCH 2/2] tests: Augment vcgrouptest to add virCgroupGetMemoryStat

2018-11-13 Thread John Ferlan
On 11/13/18 8:01 AM, Pavel Hrdina wrote: > On Wed, Nov 07, 2018 at 06:57:40PM -0500, John Ferlan wrote: >> Add a test to fetch the GetMemoryStat output. This only gets >> data for v1 only right now since the v2 data from commit 61ff6021 >> is rather useless returning all 0's. >> >>

Re: [libvirt] [PATCH] build: Fix uninstall when WITH_APPARMOR_PROFILES is defined

2018-11-13 Thread Jim Fehlig
On 11/13/18 10:14 AM, Andrea Bolognani wrote: On Wed, 2018-11-07 at 17:44 -0700, Jim Fehlig wrote: [...] @@ -96,6 +96,10 @@ install-apparmor-local: 'usr.lib.libvirt.virt-aa-helper'" \ >$(APPARMOR_LOCAL_DIR)/usr.lib.libvirt.virt-aa-helper Pre-existing lack of

[libvirt] [PATCH 1/2] conf: qemu: add support for Hyper-V PV IPIs

2018-11-13 Thread Vitaly Kuznetsov
Qemu-3.1 supports Hyper-V-style PV IPIs making it cheaper for Windows guests to send an IPI, especially when it targets many CPUs. Signed-off-by: Vitaly Kuznetsov --- docs/formatdomain.html.in | 7 +++ docs/schemas/domaincommon.rng | 5 + src/conf/domain_conf.c

[libvirt] [PATCH 0/2] conf: qemu: support new Hyper-V enlightenments in Qemu-3.1

2018-11-13 Thread Vitaly Kuznetsov
The upcoming Qemu-3.1 release will bring us two new Hyper-V enlightenments: hv_ipi and hv_evmcs. Support these in libvirt. Vitaly Kuznetsov (2): conf: qemu: add support for Hyper-V PV IPIs conf: qemu: add support for Hyper-V Enlightened VMCS docs/formatdomain.html.in | 14

[libvirt] [PATCH 2/2] conf: qemu: add support for Hyper-V Enlightened VMCS

2018-11-13 Thread Vitaly Kuznetsov
Qemu-3.1 supports Hyper-V Enlightened VMCS feature which significantly speeds up nested Hyper-V on KVM environments. Signed-off-by: Vitaly Kuznetsov --- docs/formatdomain.html.in | 7 +++ docs/schemas/domaincommon.rng | 5 + src/conf/domain_conf.c

Re: [libvirt] [PATCH] virSecuritySELinuxTransactionCommit: Return -1 if no transaction is set

2018-11-13 Thread Michal Privoznik
On 11/13/2018 05:32 PM, Marc Hartmayer wrote: > Return -1 and report an error message if no transaction is set and > virSecuritySELinuxTransactionCommit is called. > > The function description of virSecuritySELinuxTransactionCommit says: > > "Also it is considered as error if there's no

Re: [libvirt] [PATCH] build: Fix uninstall when WITH_APPARMOR_PROFILES is defined

2018-11-13 Thread Andrea Bolognani
On Wed, 2018-11-07 at 17:44 -0700, Jim Fehlig wrote: [...] > @@ -96,6 +96,10 @@ install-apparmor-local: > 'usr.lib.libvirt.virt-aa-helper'" \ > >$(APPARMOR_LOCAL_DIR)/usr.lib.libvirt.virt-aa-helper Pre-existing lack of quoting... I've fixed it with a trivial patch

Re: [libvirt] [PATCH] virSecuritySELinuxTransactionCommit: Don't mask error

2018-11-13 Thread Marc Hartmayer
On Tue, Nov 13, 2018 at 04:55 PM +0100, Michal Privoznik wrote: > In 4674fc6afd6 I've implemented transactions for selinux driver. > Well, now that I am working in this area I've notice a subtle > bug: @ret is initialized to 0 instead of -1. Facepalm. > > Signed-off-by: Michal Privoznik > --- >

[libvirt] [PATCH] virSecuritySELinuxTransactionCommit: Return -1 if no transaction is set

2018-11-13 Thread Marc Hartmayer
Return -1 and report an error message if no transaction is set and virSecuritySELinuxTransactionCommit is called. The function description of virSecuritySELinuxTransactionCommit says: "Also it is considered as error if there's no transaction set and this function is called." Signed-off-by:

[libvirt] [PATCH] virSecuritySELinuxTransactionCommit: Don't mask error

2018-11-13 Thread Michal Privoznik
In 4674fc6afd6 I've implemented transactions for selinux driver. Well, now that I am working in this area I've notice a subtle bug: @ret is initialized to 0 instead of -1. Facepalm. Signed-off-by: Michal Privoznik --- I wonder how this could survive this long (~2y) not being noticed.

Re: [libvirt] [PATCH v8 00/14] PCI passthrough support on s390

2018-11-13 Thread Andrea Bolognani
On Thu, 2018-11-08 at 19:00 +0800, Yi Min Zhao wrote: > Abstract > > The PCI representation in QEMU has been extended for S390 > allowing configuration of zPCI attributes like uid (user-defined > identifier) and fid (PCI function identifier). > The details can be found here: >

Re: [libvirt] [PATCH v8 10/14] conf: Allocate/release 'uid' and 'fid' in PCI address

2018-11-13 Thread Andrea Bolognani
On Thu, 2018-11-08 at 19:00 +0800, Yi Min Zhao wrote: > This patch adds new functions for reservation, assignment and release > to handle the uid/fid. If the uid/fid is defined in the domain XML, > they will be reserved directly in the collecting phase. If any of them > is not defined, we will

Re: [libvirt] [PATCH 2/2] tests: Augment vcgrouptest to add virCgroupGetMemoryStat

2018-11-13 Thread Pavel Hrdina
On Wed, Nov 07, 2018 at 06:57:40PM -0500, John Ferlan wrote: > Add a test to fetch the GetMemoryStat output. This only gets > data for v1 only right now since the v2 data from commit 61ff6021 > is rather useless returning all 0's. > > Signed-off-by: John Ferlan > --- > tests/vircgrouptest.c |

Re: [libvirt] [PATCH 1/2] util: Fix virCgroupGetMemoryStat

2018-11-13 Thread Pavel Hrdina
On Wed, Nov 07, 2018 at 06:57:39PM -0500, John Ferlan wrote: > From: Peter Chubb > > Commit 901d2b9c introduced virCgroupGetMemoryStat and replaced > the LXC virLXCCgroupGetMemStat logic in commit e634c7cd0. However, > in doing so the replacement wasn't exact as the LXC logic used > getline() to

Re: [libvirt] [PATCH] travis: Switch from Docker Hub to quay.io

2018-11-13 Thread Daniel P . Berrangé
On Tue, Nov 13, 2018 at 01:24:20PM +0100, Andrea Bolognani wrote: > As it's currently impossible for us to create new automated > builds on Docker Hub (see [1]), and quay.io doesn't suffer > from the same problem while still having all the feature we > need, switch to the latter. > > [1]

[libvirt] [PATCH] travis: Switch from Docker Hub to quay.io

2018-11-13 Thread Andrea Bolognani
As it's currently impossible for us to create new automated builds on Docker Hub (see [1]), and quay.io doesn't suffer from the same problem while still having all the feature we need, switch to the latter. [1] https://github.com/docker/hub-feedback/issues/1676 Signed-off-by: Andrea Bolognani

[libvirt] [dockerfiles PATCH 2/2] Drop Fedora 27

2018-11-13 Thread Andrea Bolognani
The corresponding libvirt-jenkins-ci commit is d3e9f386968a. Signed-off-by: Andrea Bolognani --- buildenv-fedora-27.Dockerfile | 80 --- 1 file changed, 80 deletions(-) delete mode 100644 buildenv-fedora-27.Dockerfile diff --git a/buildenv-fedora-27.Dockerfile

[libvirt] [dockerfiles PATCH 1/2] Add Fedora 29

2018-11-13 Thread Andrea Bolognani
The corresponding libvirt-jenkins-ci commit is 6777ccab6670. Signed-off-by: Andrea Bolognani --- buildenv-fedora-29.Dockerfile | 80 +++ 1 file changed, 80 insertions(+) create mode 100644 buildenv-fedora-29.Dockerfile diff --git a/buildenv-fedora-29.Dockerfile

[libvirt] [dockerfiles PATCH 0/2] Add Fedora 29, drop Fedora 27

2018-11-13 Thread Andrea Bolognani
Same as https://www.redhat.com/archives/libvir-list/2018-November/msg00073.html Pushed under the "trivial Dockerfiles update" rule. Andrea Bolognani (2): Add Fedora 29 Drop Fedora 27 ...denv-fedora-27.Dockerfile => buildenv-fedora-29.Dockerfile | 4 ++-- 1 file changed, 2 insertions(+),

Re: [libvirt] [PATCH] util: fix handling of unspecified port in URI

2018-11-13 Thread Erik Skultety
On Tue, Nov 13, 2018 at 11:36:57AM +, Daniel P. Berrangé wrote: > When no server name is provided in the URI, modern versions of libxml2 > will set the port to '-1'. This is a change from behaviour with earlier > versions which set it to 0. > > Libvirt expects the port to be 0 in these cases

Re: [libvirt] [PATCH 2/2] conf: Move VFIO AP validation from post parse to QEMU validation code

2018-11-13 Thread Erik Skultety
On Tue, Nov 13, 2018 at 10:02:43AM +0100, Boris Fiuczynski wrote: > On 11/13/18 9:22 AM, Erik Skultety wrote: > > On Mon, Nov 12, 2018 at 05:39:38PM +0100, Boris Fiuczynski wrote: > > > On 11/12/18 1:14 PM, Erik Skultety wrote: > > > > Even though commit 11708641 claims that a domain is allowed

[libvirt] [PATCH] util: fix handling of unspecified port in URI

2018-11-13 Thread Daniel P . Berrangé
When no server name is provided in the URI, modern versions of libxml2 will set the port to '-1'. This is a change from behaviour with earlier versions which set it to 0. Libvirt expects the port to be 0 in these cases and as a result we get a bug when connecting to URIs which lack a server name:

Re: [libvirt] [RFC PATCH] Add new migration flag VIR_MIGRATE_DRY_RUN

2018-11-13 Thread Daniel P . Berrangé
On Mon, Nov 12, 2018 at 11:33:04AM -0700, Jim Fehlig wrote: > On 11/12/18 4:26 AM, Daniel P. Berrangé wrote: > > On Fri, Nov 02, 2018 at 04:34:02PM -0600, Jim Fehlig wrote: > > > A dry run can be used as a best-effort check that a migration command > > > will succeed. The destination host will be

[libvirt] [PATCH] Add armv6l Support as guest

2018-11-13 Thread infos
From: Stefan Schallenberg Support for armv6l qemu guests has been added. Tested with arm1176 CPU on x86. Signed-off-by Stefan Schallenberg --- docs/news.xml| 9 + docs/schemas/basictypes.rng | 1 + src/qemu/qemu_capabilities.c

Re: [libvirt] Parsing of memory.stat in libvirt

2018-11-13 Thread Peter.Chubb
> "John" == John Ferlan writes: On 11/6/18 3:25 AM, peter.ch...@data61.csiro.au wrote: >> >> Hi Folks, libvirt currently spams the logs with >> >> error : virCgroupGetMemoryStat:2490 : internal error: Cannot parse >> 'memory.stat' cgroup file >> >> whenever someone does ps in a container.

Re: [libvirt] [PATCH 1/2] util: Fix virCgroupGetMemoryStat

2018-11-13 Thread Peter.Chubb
> "John" == John Ferlan writes: John> Signed-off-by: John Ferlan --- Signed-off-by: Peter Chubb -- Dr Peter Chubb Tel: +61 2 9490 5852 http://ts.data61.csiro.au/ Trustworthy Systems Group Data61, CSIRO (formerly NICTA) -- libvir-list mailing list

Re: [libvirt] [PATCH 1/2] qemu: Extract MDEV VFIO PCI validation code into a separate helper

2018-11-13 Thread Boris Fiuczynski
On 11/13/18 9:27 AM, Erik Skultety wrote: On Mon, Nov 12, 2018 at 04:28:09PM +0100, Boris Fiuczynski wrote: On 11/12/18 1:14 PM, Erik Skultety wrote: Since we'll need to validate other models apart from VFIO PCI too, having a helper for each model should keep the code base cleaner.

Re: [libvirt] [PATCH 2/2] conf: Move VFIO AP validation from post parse to QEMU validation code

2018-11-13 Thread Boris Fiuczynski
On 11/13/18 9:22 AM, Erik Skultety wrote: On Mon, Nov 12, 2018 at 05:39:38PM +0100, Boris Fiuczynski wrote: On 11/12/18 1:14 PM, Erik Skultety wrote: Even though commit 11708641 claims that a domain is allowed have a single VFIO AP hostdev only, this is a limitation posed by the platform

Re: [libvirt] [PATCH 1/2] qemu: Extract MDEV VFIO PCI validation code into a separate helper

2018-11-13 Thread Erik Skultety
On Mon, Nov 12, 2018 at 04:28:09PM +0100, Boris Fiuczynski wrote: > On 11/12/18 1:14 PM, Erik Skultety wrote: > > Since we'll need to validate other models apart from VFIO PCI too, > > having a helper for each model should keep the code base cleaner. > > > > Signed-off-by: Erik Skultety > > --- >

Re: [libvirt] [PATCH 2/2] conf: Move VFIO AP validation from post parse to QEMU validation code

2018-11-13 Thread Erik Skultety
On Mon, Nov 12, 2018 at 05:39:38PM +0100, Boris Fiuczynski wrote: > On 11/12/18 1:14 PM, Erik Skultety wrote: > > Even though commit 11708641 claims that a domain is allowed have a > > single VFIO AP hostdev only, this is a limitation posed by the platform > > vendor on purely virtual devices.