[libvirt] mdevctl: A shoestring mediated device management and persistence utility

2019-05-23 Thread Alex Williamson
Hi, Currently mediated device management, much like SR-IOV VF management, is largely left as an exercise for the user. This is an attempt to provide something and see where it goes. I doubt we'll solve everyone's needs on the first pass, but maybe we'll solve enough and provide helpers for the r

Re: [libvirt] Increasing TasksMax when creating machines via systemd

2019-05-23 Thread Jim Fehlig
On 5/23/19 9:22 AM, Daniel P. Berrangé wrote: On Wed, May 22, 2019 at 05:16:38PM -0600, Jim Fehlig wrote: Hi All, I recently received an internal bug report of VM "crashing" due to hitting thread limits. Seems there was an assert in pthread_create within the VM when hitting the limit enforced b

Re: [libvirt] [PATCH v6 16/23] remote: add support for new network port APIs

2019-05-23 Thread Laine Stump
On 5/23/19 11:32 AM, Daniel P. Berrangé wrote: Define the wire protocol for the virNetworkPort APIs and enable the client/server RPC dispatch. Signed-off-by: Daniel P. Berrangé ...and so much more boilerplate! :-P Reviewed-by: Laine Stump (Truthfully, I didn't try to visually verify eve

Re: [libvirt] [PATCH v6 15/23] access: add permissions for network port objects

2019-05-23 Thread Laine Stump
On 5/23/19 11:32 AM, Daniel P. Berrangé wrote: Signed-off-by: Daniel P. Berrangé Similar to patch 13 - ACK carries over from v5 Reviewed-by: Laine Stump -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list

Re: [libvirt] [PATCH v5 14/24] network: add public APIs for network port object

2019-05-23 Thread Daniel P . Berrangé
On Thu, May 23, 2019 at 11:59:59AM -0400, Laine Stump wrote: > On 5/14/19 11:48 AM, Daniel P. Berrangé wrote: > > Introduce a new virNetworPort object that will present an attachment to > > a virtual network from a VM. > > > > Signed-off-by: Daniel P. Berrangé > > --- > > include/libvirt/libvir

Re: [libvirt] [PATCH v6 14/23] network: add public APIs for network port object

2019-05-23 Thread Laine Stump
On 5/23/19 11:32 AM, Daniel P. Berrangé wrote: Introduce a new virNetworPort object that will present an attachment to a virtual network from a VM. Signed-off-by: Daniel P. Berrangé I just ACKed this in the v5 series (didn't yet see the new version), but I'll redo it here for simplicity:

Re: [libvirt] [PATCH v5 15/24] access: add permissions for network port objects

2019-05-23 Thread Laine Stump
On 5/14/19 11:48 AM, Daniel P. Berrangé wrote: Signed-off-by: Daniel P. Berrangé --- src/access/genpolkit.pl| 2 +- src/access/viraccessdriver.h | 6 src/access/viraccessdrivernop.c| 11 src/access/viraccessdriverpolkit.c | 26 ++ src/a

Re: [libvirt] [PATCH v5 14/24] network: add public APIs for network port object

2019-05-23 Thread Laine Stump
On 5/14/19 11:48 AM, Daniel P. Berrangé wrote: Introduce a new virNetworPort object that will present an attachment to a virtual network from a VM. Signed-off-by: Daniel P. Berrangé --- include/libvirt/libvirt-network.h | 122 include/libvirt/virterror.h | 3 + src/datatype

[libvirt] [PATCH v6 23/23] conf: switch over to use network port APIs for virt drivers

2019-05-23 Thread Daniel P . Berrangé
Change the domain conf so invoke the new network port public APIs instead of the network callbacks. Signed-off-by: Daniel P. Berrangé --- src/conf/domain_conf.c | 211 ++-- src/conf/domain_conf.h | 26 - src/libvirt_private.syms| 1 - src/netw

[libvirt] [PATCH] nodesuspend: report unsupported if systemd & pm-utils aren't available

2019-05-23 Thread Daniel P . Berrangé
When libvirtd is run inside a container it is normal that neither systemd nor pm-utils will be available. In this case there is no way to suspend the host, so libvirt should just report the feature unsupported instead of raising an error. Signed-off-by: Daniel P. Berrangé --- src/util/virnodesus

[libvirt] [PATCH v6 22/23] conf: record a portid against the domain conf

2019-05-23 Thread Daniel P . Berrangé
The portid will be the UUID of the virNetworkPort object associated with the network interface when a guest is running. Signed-off-by: Daniel P. Berrangé --- docs/formatdomain.html.in | 8 +++ docs/schemas/domaincommon.rng | 5 + src/conf/domain_conf

[libvirt] [PATCH v6 21/23] lxc, libxl: save domain status after reconnect

2019-05-23 Thread Daniel P . Berrangé
The various steps involved in reconnecting to a domain may cause updates to the virDomainObj struct that need to be reflected in the saved status file. Signed-off-by: Daniel P. Berrangé --- src/libxl/libxl_driver.c | 3 +++ src/lxc/lxc_process.c| 5 + 2 files changed, 8 insertions(+) di

[libvirt] [PATCH v6 15/23] access: add permissions for network port objects

2019-05-23 Thread Daniel P . Berrangé
Signed-off-by: Daniel P. Berrangé --- src/access/genpolkit.pl| 2 +- src/access/viraccessdriver.h | 6 src/access/viraccessdrivernop.c| 11 src/access/viraccessdriverpolkit.c | 26 ++ src/access/viraccessdriverstack.c | 25 +

[libvirt] [PATCH v6 06/23] network: convert networkNotifyActualDevice to virNetworkPortDef

2019-05-23 Thread Daniel P . Berrangé
Convert the virDomainNetDef object into a virNetworkPortDef object at the start of networkNotifyActualDevice. This largely decouples the method impl from the domain object type. Reviewed-by: Laine Stump Signed-off-by: Daniel P. Berrangé --- src/network/bridge_driver.c | 92 ++---

[libvirt] [PATCH v6 05/23] network: convert networkAllocateActualDevice to virNetworkPortDef

2019-05-23 Thread Daniel P . Berrangé
Convert the virDomainNetDef object into a virNetworkPortDef object at the start of networkAllocateActualDevice. This largely decouples the method impl from the domain object type. Reviewed-by: Laine Stump Signed-off-by: Daniel P. Berrangé --- src/network/bridge_driver.c | 222 +++---

[libvirt] [PATCH v6 08/23] network: convert hook script to take a network port XML

2019-05-23 Thread Daniel P . Berrangé
When (un)plugging an interface into a network, the 'plugged' and 'unplugged' operations are invoked in the hook script. The data provided to the script contains the network XML, the domain XML and the domain interface XML. When we strictly split the drivers up this will no longer be possible and t

[libvirt] [PATCH v6 07/23] network: convert networkReleaseActualDevice to virNetworkPortDef

2019-05-23 Thread Daniel P . Berrangé
Convert the virDomainNetDef object into a virNetworkPortDef object at the start of networkReleaseActualDevice. This largely decouples the method impl from the domain object type. Reviewed-by: Laine Stump Signed-off-by: Daniel P. Berrangé --- src/network/bridge_driver.c | 140 +++

[libvirt] [PATCH v6 03/23] network: make networkLogAllocation independent of domain conf

2019-05-23 Thread Daniel P . Berrangé
Stop passing a virDomainNetDefPtr parameter to networkLogAllocation, instead just pass in the MAC address. The actual device type is also not required, since virNetworkForwardIfDefPtr has a type field that can be used instead. Reviewed-by: Laine Stump Signed-off-by: Daniel P. Berrangé --- src/n

[libvirt] [PATCH v6 02/23] conf: introduce virNetworkPortDefPtr struct and XML support

2019-05-23 Thread Daniel P . Berrangé
Introduce a virNetworkPortDefPtr struct to represent the data associated with a virtual network port. Add APIs for parsing/formatting XML docs with the data. Signed-off-by: Daniel P. Berrangé --- docs/docs.html.in | 1 + docs/formatnetworkport.html.in

[libvirt] [PATCH v6 20/23] lxc, libxl: notify network driver of NICs during reconnect

2019-05-23 Thread Daniel P . Berrangé
When starting up it is important to notify the network driver of any NICs which are used by running guests so that it can account for any resources they are using. Signed-off-by: Daniel P. Berrangé --- src/libxl/libxl_driver.c | 30 ++ src/lxc/lxc_process.c| 30 ++

[libvirt] [PATCH v6 17/23] virsh: add support for network port APIs

2019-05-23 Thread Daniel P . Berrangé
Signed-off-by: Daniel P. Berrangé --- tools/virsh-completer.c | 50 + tools/virsh-completer.h | 4 + tools/virsh-network.c | 399 +++- tools/virsh-network.h | 5 + 4 files changed, 457 insertions(+), 1 deletion(-) diff --git a/tools/virsh-complete

[libvirt] [PATCH v6 16/23] remote: add support for new network port APIs

2019-05-23 Thread Daniel P . Berrangé
Define the wire protocol for the virNetworkPort APIs and enable the client/server RPC dispatch. Signed-off-by: Daniel P. Berrangé --- src/remote/remote_daemon_dispatch.c | 73 src/remote/remote_driver.c | 69 src/remote/remote_protocol.x| 124

[libvirt] [PATCH v6 11/23] network: introduce networkNotifyPort

2019-05-23 Thread Daniel P . Berrangé
Separate network port notification code from the domain driver network callback implementation. Reviewed-by: Laine Stump Signed-off-by: Daniel P. Berrangé --- src/network/bridge_driver.c | 106 +--- 1 file changed, 63 insertions(+), 43 deletions(-) diff --git a/

[libvirt] [PATCH v6 19/23] network: add implementation of network port APIs

2019-05-23 Thread Daniel P . Berrangé
This initial implementation just wires up the APIs and does tracking of the port XML definitions. It is not yet integrated into the resource allocation logic. Signed-off-by: Daniel P. Berrangé --- src/network/bridge_driver.c | 400 1 file changed, 400 inserti

[libvirt] [PATCH v6 18/23] conf: support recording ports against virNetworkObjPtr

2019-05-23 Thread Daniel P . Berrangé
The virNetworkObjPtr state will need to maintain a record of all virNetworkPortDefPtr objects associated with the network. Record these in a hash and add APIs for manipulating them. Signed-off-by: Daniel P. Berrangé --- src/conf/virnetworkobj.c | 303 +++ src/

[libvirt] [PATCH v6 13/23] network: introduce networkUpdatePortBandwidth

2019-05-23 Thread Daniel P . Berrangé
Separate network port bandwidth update code from the domain driver network callback implementation. Reviewed-by: Laine Stump Signed-off-by: Daniel P. Berrangé --- src/network/bridge_driver.c | 117 1 file changed, 66 insertions(+), 51 deletions(-) diff --gi

[libvirt] [PATCH v6 09/23] network: remove the virDomainNetBandwidthChangeAllowed callback

2019-05-23 Thread Daniel P . Berrangé
The current qemu driver code for changing bandwidth on a NIC first asks the network driver if the change is supported, then changes the bandwidth on the VIF, and then tells the network driver to update the bandwidth on the bridge. This is potentially racing if a parallel API call causes the networ

[libvirt] [PATCH v6 14/23] network: add public APIs for network port object

2019-05-23 Thread Daniel P . Berrangé
Introduce a new virNetworPort object that will present an attachment to a virtual network from a VM. Signed-off-by: Daniel P. Berrangé --- include/libvirt/libvirt-network.h | 122 include/libvirt/virterror.h | 3 + src/datatypes.c | 60 src/datatypes.h

[libvirt] [PATCH v6 12/23] network: introduce networkReleasePort

2019-05-23 Thread Daniel P . Berrangé
Separate network port deletion code from the domain driver network callback implementation. Reivewed-by: Laine Stump Signed-off-by: Daniel P. Berrangé --- src/network/bridge_driver.c | 90 - 1 file changed, 59 insertions(+), 31 deletions(-) diff --git a/src/

[libvirt] [PATCH v6 04/23] conf: add APIs to convert virDomainNetDef to virNetworkPortDef

2019-05-23 Thread Daniel P . Berrangé
Helper APIs are needed to - Populate basic virNetworkPortDef from virDomainNetDef - Set a virDomainActualNetDef from virNetworkPortDef - Populate a full virNetworkPortDef from virDomainActualNetDef Signed-off-by: Daniel P. Berrangé --- src/conf/domain_conf.c | 290 +

[libvirt] [PATCH v6 10/23] network: introduce networkAllocatePort

2019-05-23 Thread Daniel P . Berrangé
Separate network port allocation code from the domain driver network callback implementation. Reviewed-by: Laine Stump Signed-off-by: Daniel P. Berrangé --- src/network/bridge_driver.c | 143 +++- 1 file changed, 77 insertions(+), 66 deletions(-) diff --git a/sr

[libvirt] [PATCH v6 00/23] network: refactor to decouple virt drivers from network driver

2019-05-23 Thread Daniel P . Berrangé
An update to v1: https://www.redhat.com/archives/libvir-list/2018-December/msg00681.html v2: https://www.redhat.com/archives/libvir-list/2019-February/msg01581.html v3: https://www.redhat.com/archives/libvir-list/2019-March/msg01259.html v4: https://www.redhat.com/archives/libvir-list/2019

[libvirt] [PATCH v6 01/23] conf: allow bandwidth parsing / formatting to include class ID

2019-05-23 Thread Daniel P . Berrangé
The domain conf actual network def stores a element separately from the . The class ID should really just be an attribute on the element. We can't change existing XML, and this isn't visible to users since it is internal XML only. When we expose the new network port XML to users though, we should

Re: [libvirt] Increasing TasksMax when creating machines via systemd

2019-05-23 Thread Daniel P . Berrangé
On Wed, May 22, 2019 at 05:16:38PM -0600, Jim Fehlig wrote: > Hi All, > > I recently received an internal bug report of VM "crashing" due to hitting > thread limits. Seems there was an assert in pthread_create within the VM > when hitting the limit enforced by pids controller on the host > > Apr

Re: [libvirt] [PATCH] spec: Fix permissions of nwfilter XMLs

2019-05-23 Thread Jiri Denemark
On Thu, May 23, 2019 at 16:12:27 +0200, Andrea Bolognani wrote: > On Thu, 2019-05-23 at 14:56 +0200, Jiri Denemark wrote: > [...] > > %post daemon-config-nwfilter > > cp %{_datadir}/libvirt/nwfilter/*.xml %{_sysconfdir}/libvirt/nwfilter/ > > +# libvirt saves these files with mode 600 > > +chmod 6

Re: [libvirt] [PATCH] spec: Fix permissions of nwfilter XMLs

2019-05-23 Thread Andrea Bolognani
On Thu, 2019-05-23 at 14:56 +0200, Jiri Denemark wrote: [...] > %post daemon-config-nwfilter > cp %{_datadir}/libvirt/nwfilter/*.xml %{_sysconfdir}/libvirt/nwfilter/ > +# libvirt saves these files with mode 600 > +chmod 600 %{_sysconfdir}/libvirt/nwfilter/*.xml > # Make sure libvirt picks up the

Re: [libvirt] [PATCH] virDomainDefPostParse: use DOMAIN_DEVICE_ITERATE_MISSING_INFO

2019-05-23 Thread Andrea Bolognani
On Thu, 2019-05-23 at 14:43 +0200, Ján Tomko wrote: > Apart from virDomainDefValidate, virDomainDefPostParse is another > place where operating on info-less devices makes sense. > > Signed-off-by: Ján Tomko > --- > src/conf/domain_conf.c | 3 ++- > 1 file changed, 2 insertions(+), 1 deletion(-)

Re: [libvirt] [PATCH] spec: Fix permissions of nwfilter XMLs

2019-05-23 Thread Jiri Denemark
On Thu, May 23, 2019 at 14:56:33 +0200, Jiri Denemark wrote: > The nwfilter XML files stored in /etc/libvirt/nwfilter are copied in a > %post scriptlet from /usr/share/libvirt/nwfilter/*.xml. While the files > in /usr/share are created with mode 0644, libvirt creates the files in > /etc/libvirt/nwf

[libvirt] [PATCH] spec: Fix permissions of /var/run/libvirt/qemu

2019-05-23 Thread Jiri Denemark
While libvirtd creates this directory with the default 0755 mode, the spec file stores 0700 in the RPM database. Thus RPM verification always complains about this directory. Let's fix the spec file to match reality. Signed-off-by: Jiri Denemark --- Notes: Alternatively, we could change libvi

[libvirt] [PATCH] spec: Fix permissions of nwfilter XMLs

2019-05-23 Thread Jiri Denemark
The nwfilter XML files stored in /etc/libvirt/nwfilter are copied in a %post scriptlet from /usr/share/libvirt/nwfilter/*.xml. While the files in /usr/share are created with mode 0644, libvirt creates the files in /etc/libvirt/nwfilter with mode 0600. Since 0600 is also stored in the RPM database,

[libvirt] [PATCH v2 0/2] test_driver: add a guest inf and implement virDomainInterfaceAddresses

2019-05-23 Thread Ilias Stamatis
Ilias Stamatis (2): test_driver: implement virDomainInterfaceAddresses test_driver: add a guest interface in the default config src/test/test_driver.c | 73 ++ 1 file changed, 73 insertions(+) -- 2.21.0 -- libvir-list mailing list libvir-list@redhat.c

[libvirt] [PATCH v2 2/2] test_driver: add a guest interface in the default config

2019-05-23 Thread Ilias Stamatis
Signed-off-by: Ilias Stamatis --- src/test/test_driver.c | 7 +++ 1 file changed, 7 insertions(+) diff --git a/src/test/test_driver.c b/src/test/test_driver.c index ac3b3d1e89..b29fd12903 100644 --- a/src/test/test_driver.c +++ b/src/test/test_driver.c @@ -436,6 +436,13 @@ static const char

[libvirt] [PATCH v2 1/2] test_driver: implement virDomainInterfaceAddresses

2019-05-23 Thread Ilias Stamatis
Ignore @source in the case of the test driver and return fixed private IPv4 addresses for all the interfaces defined in the domain. Signed-off-by: Ilias Stamatis --- src/test/test_driver.c | 66 ++ 1 file changed, 66 insertions(+) diff --git a/src/test/te

Re: [libvirt] [PATCH 2/2] Introduce DOMAIN_DEVICE_ITERATE_MISSING_INFO

2019-05-23 Thread Ján Tomko
On Wed, May 22, 2019 at 05:22:42PM +0200, Andrea Bolognani wrote: On Tue, 2019-05-21 at 16:26 +0200, Ján Tomko wrote: Rename the DOMAIN_DEVICE_ITERATE_GRAPHICS flag. It was introduced by commit dd45c2710f6fd2d4f8a47f97960532d0e0091e7d with the intention to run the Validate callback even on the g

[libvirt] [PATCH] virDomainDefPostParse: use DOMAIN_DEVICE_ITERATE_MISSING_INFO

2019-05-23 Thread Ján Tomko
Apart from virDomainDefValidate, virDomainDefPostParse is another place where operating on info-less devices makes sense. Signed-off-by: Ján Tomko --- src/conf/domain_conf.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c inde

Re: [libvirt] [PATCH] docs: Change the 'Launch Security' section id to "launchSecurity"

2019-05-23 Thread Erik Skultety
On Thu, May 23, 2019 at 02:29:37PM +0200, Erik Skultety wrote: > Although there's currently only support for SEV, it's likely other > solutions will appear, so we should not refer to the documentation > section simply with 'sev'. > > Signed-off-by: Erik Skultety > --- Pushed as trivial. Erik --

[libvirt] [PATCH] docs: Change the 'Launch Security' section id to "launchSecurity"

2019-05-23 Thread Erik Skultety
Although there's currently only support for SEV, it's likely other solutions will appear, so we should not refer to the documentation section simply with 'sev'. Signed-off-by: Erik Skultety --- docs/formatdomain.html.in | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/for

Re: [libvirt] [PATCH] misc: Drop useless checks from *Dispose() functions

2019-05-23 Thread Erik Skultety
On Thu, May 23, 2019 at 12:16:02PM +0200, Michal Privoznik wrote: > Due to the way that our virObjectUnref() is written it's not > possible that a NULL is passed into *Dispose() function. However, > some functions check for that regardless. > > Signed-off-by: Michal Privoznik > --- Reviewed-by: E

[libvirt] [PATCH] test_driver: implement virDomainMemoryPeek

2019-05-23 Thread Ilias Stamatis
Begins by writing a @start byte in the first position of @buffer and then for every next byte it stores the value of its previous one incremented by one. Behaves the same for both supported flags. Signed-off-by: Ilias Stamatis --- Initially I thought about checking whether start+size exceeds th

[libvirt] [PATCH] misc: Drop useless checks from *Dispose() functions

2019-05-23 Thread Michal Privoznik
Due to the way that our virObjectUnref() is written it's not possible that a NULL is passed into *Dispose() function. However, some functions check for that regardless. Signed-off-by: Michal Privoznik --- src/conf/domain_conf.c | 3 --- src/conf/virstorageobj.c | 9 - src/rpc/virne

Re: [libvirt] [PATCH] test_driver: implement virDomainInterfaceAddresses

2019-05-23 Thread Erik Skultety
On Thu, May 23, 2019 at 11:36:31AM +0200, Ilias Stamatis wrote: > On Thu, May 23, 2019 at 9:46 AM Erik Skultety wrote: > > > > On Wed, May 22, 2019 at 10:10:34PM +0200, Ilias Stamatis wrote: > > > Ignore @source in the case of the test driver and return fixed private > > > IPv4 addresses for all t

[libvirt] [PATCH 7/9] util: Refactor 'virResctrlMonitorStats'

2019-05-23 Thread Wang Huaqiang
Refactor 'virResctrlMonitorStats' to track multiple statistical records. Signed-off-by: Wang Huaqiang --- src/qemu/qemu_driver.c | 2 +- src/util/virresctrl.c | 17 ++--- src/util/virresctrl.h | 12 ++-- 3 files changed, 25 insertions(+), 6 deletions(-) diff --git a/src/q

Re: [libvirt] [PATCH] test_driver: implement virDomainInterfaceAddresses

2019-05-23 Thread Ilias Stamatis
On Thu, May 23, 2019 at 9:46 AM Erik Skultety wrote: > > On Wed, May 22, 2019 at 10:10:34PM +0200, Ilias Stamatis wrote: > > Ignore @source in the case of the test driver and return fixed private > > IPv4 addresses for all the interfaces defined in the domain. > > > > Signed-off-by: Ilias Stamatis

[libvirt] [PATCH 1/9] conf: code cleanup, remove empty line and one space

2019-05-23 Thread Wang Huaqiang
Remove some redundant space and line. Signed-off-by: Wang Huaqiang --- src/conf/domain_conf.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c index a3a5141..e3c8aa0 100644 --- a/src/conf/domain_conf.c +++ b/src/conf/domain_con

[libvirt] [PATCH 0/9] util/resctrl cleanups and refactors

2019-05-23 Thread Wang Huaqiang
Plan to support Resctrl Control Monitors, which is a feature introduced by kernel 'resctrl' sub-model. Submit some cleanup and refactoring patches for upcoming memory bandwidth resource monitoring (MBM) monitors. Related MBM RFC is https://www.redhat.com/archives/libvir-list/2019-April/msg01409.ht

[libvirt] [PATCH 3/9] conf: check if vcpus matches with any 'existing' allocaiton

2019-05-23 Thread Wang Huaqiang
In checking if vcpus matches with any exisitng resctrl allocation it should consider if the allocation exists or not. '@resctrl->alloc != NULL' means an allocation exists. Signed-off-by: Wang Huaqiang --- src/conf/domain_conf.c | 9 - 1 file changed, 4 insertions(+), 5 deletions(-) diff

[libvirt] [PATCH 5/9] conf: refactor 'virDomainResctrlVcpuMatch'

2019-05-23 Thread Wang Huaqiang
Let 'virDomainResctrlVcpuMatch' return a pointer of @virDomainResctrlDefPtr in its third parameter. Signed-off-by: Wang Huaqiang --- src/conf/domain_conf.c | 33 ++--- 1 file changed, 18 insertions(+), 15 deletions(-) diff --git a/src/conf/domain_conf.c b/src/conf/do

[libvirt] [PATCH 8/9] util: Extend virresctl API to retrieve multiple monitor statistics

2019-05-23 Thread Wang Huaqiang
Export virResctrlMonitorGetStats and make virResctrlMonitorGetCacheOccupancy obsoleted. Signed-off-by: Wang Huaqiang --- src/libvirt_private.syms | 1 + src/qemu/qemu_driver.c | 33 + src/util/virresctrl.c| 46 +++---

[libvirt] [PATCH 6/9] util: Refactor 'virResctrlMonitorFreeStats'

2019-05-23 Thread Wang Huaqiang
Refactor 'virResctrlMonitorFreeStats' to let it available to free the 'virResctrlMonitorStatsPtr' variable. Signed-off-by: Wang Huaqiang --- src/qemu/qemu_driver.c | 1 + src/util/virresctrl.c | 4 +--- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/src/qemu/qemu_driver.c b/src/

[libvirt] [PATCH 9/9] util: Remove unused virResctrlMonitorGetCacheOccupancy

2019-05-23 Thread Wang Huaqiang
Signed-off-by: Wang Huaqiang --- src/libvirt_private.syms | 1 - src/util/virresctrl.c| 29 - src/util/virresctrl.h| 5 - 3 files changed, 35 deletions(-) diff --git a/src/libvirt_private.syms b/src/libvirt_private.syms index 2e3d48c..41733cc 100644 ---

[libvirt] [PATCH 4/9] conf: Replace 'virResctrlAllocIsEmpty' with @n==0 for indicating no resctrl allocation in configuration file

2019-05-23 Thread Wang Huaqiang
@n denotes the number of element under element in function 'virDomainCachetuneDefParse' or the number of element under element in function virDomainMemorytuneDefParse'. Originally it is using 'virResctrlAllocIsEmpty' function to judge if no resctrl allocation defined in or element, this role

[libvirt] [PATCH 2/9] conf: code cleanup for return error code directly

2019-05-23 Thread Wang Huaqiang
code cleanup for 'virDomainCachetuneDefParse' and 'virDomainMemorytuneDefParse'. Signed-off-by: Wang Huaqiang --- src/conf/domain_conf.c | 46 +- 1 file changed, 21 insertions(+), 25 deletions(-) diff --git a/src/conf/domain_conf.c b/src/conf/domain_c

[libvirt] [PATCH] qemuProcessLaunch: Return earlier if spawning qemu failed

2019-05-23 Thread Michal Privoznik
If spawning qemu fails then we report an error and proceed to writing status XML onto the disk. This is unnecessary as we are sure that the domain is not running. At the same time, if virPidFileReadPath() fails it returns -errno. Use it in the error message. It may explain what went wrong. Signed

Re: [libvirt] [PATCH] test_driver: implement virDomainInterfaceAddresses

2019-05-23 Thread Erik Skultety
On Wed, May 22, 2019 at 10:10:34PM +0200, Ilias Stamatis wrote: > Ignore @source in the case of the test driver and return fixed private > IPv4 addresses for all the interfaces defined in the domain. > > Signed-off-by: Ilias Stamatis > --- > > The default config of the test driver has no guest int