]> xenbits.xensource.com Git - libvirt.git/log
libvirt.git
7 years agoconf: use a separate buffer for the subelements of <controller>
Ján Tomko [Fri, 26 May 2017 15:53:54 +0000 (17:53 +0200)]
conf: use a separate buffer for the subelements of <controller>

We need to decide whether to format <controller> as a single tag
or if it has any subelements.

Rewrite the function to use a separate buffer for subelements,
to make adding new options easier.

7 years agoconf: introduce virDomainControllerDriverFormat
Ján Tomko [Fri, 26 May 2017 15:47:50 +0000 (17:47 +0200)]
conf: introduce virDomainControllerDriverFormat

Split out formatting the <driver> subelement of <controller>
to make adding new options easier.

7 years agoaudit: Fix the output message for shmem
Martin Kletzander [Thu, 11 May 2017 08:10:54 +0000 (10:10 +0200)]
audit: Fix the output message for shmem

After some discussion on and off the linux-audit mailing list, we
should use different fields for the audit messages.

Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1218603

Signed-off-by: Martin Kletzander <mkletzan@redhat.com>
7 years agoremote: Consolidate remoteStream{Abort,Finish} functions
Martin Kletzander [Wed, 31 May 2017 14:58:49 +0000 (16:58 +0200)]
remote: Consolidate remoteStream{Abort,Finish} functions

They do the same thing with only one difference.  Let's put them
together (like we already do with virFDStreamCloseInt) so that future
changes don't miss one of the implementations.  Also to clean up the
code.

Signed-off-by: Martin Kletzander <mkletzan@redhat.com>
7 years agobhyveargv2xmltest: Fix call of virDomainDefCheckABIStability
Michal Privoznik [Mon, 5 Jun 2017 09:46:02 +0000 (11:46 +0200)]
bhyveargv2xmltest: Fix call of virDomainDefCheckABIStability

In 4f0aeed I've expanded the list of arguments for
virDomainDefCheckABIStability() but I forgot to fix
bhyveargv2xmltest.

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
7 years agoReset the whole stack in testutils
Martin Kletzander [Mon, 5 Jun 2017 07:38:31 +0000 (09:38 +0200)]
Reset the whole stack in testutils

The memset() was resetting only 30 bytes in the array (size of the
array), but it is array of pointers.  Since it is a static array,
let's just reset it by its size.

Found by gcc-7.1:

  testutils.c: In function 'virTestRun':
  testutils.c:243:13: error: 'memset' used with length equal to number
  of elements without multiplication by element size [-Werror=memset-elt-size]
    memset(testAllocStack, 0, ARRAY_CARDINALITY(testAllocStack));
    ^~~~~~

Signed-off-by: Martin Kletzander <mkletzan@redhat.com>
7 years agoExpose resource control capabilities for caches
Eli Qiao [Wed, 17 May 2017 09:08:33 +0000 (17:08 +0800)]
Expose resource control capabilities for caches

Add cache resource control into capabilities for CAT without CDP:

  <cache>
    <bank id='0' level='3' type='unified' size='15360' unit='KiB' cpus='0-5'>
      <control min='768' unit='KiB' scope='both' max_allocation='4'/>
    </bank>
  </cache>

and with CDP:

  <cache>
    <bank id='0' level='3' type='unified' size='15360' unit='KiB' cpus='0-5'>
      <control min='768' unit='KiB' scope='code' max_allocation='4'/>
      <control min='768' unit='KiB' scope='data' max_allocation='4'/>
    </bank>
  </cache>

Also add new test cases for vircaps2xmltest.

Signed-off-by: Eli Qiao <liyong.qiao@intel.com>
7 years agovirQEMUDriverDomainABIStability: Check for memoryBacking
Michal Privoznik [Fri, 19 May 2017 14:46:27 +0000 (16:46 +0200)]
virQEMUDriverDomainABIStability: Check for memoryBacking

https://bugzilla.redhat.com/show_bug.cgi?id=1450349

Problem is, qemu fails to load guest memory image if these
attribute change on migration/restore from an image.

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
7 years agovirDomainXMLOption: Introduce virDomainABIStabilityDomain
Michal Privoznik [Fri, 19 May 2017 13:07:15 +0000 (15:07 +0200)]
virDomainXMLOption: Introduce virDomainABIStabilityDomain

While checking for ABI stability, drivers might pose additional
checks that are not valid for general case. For instance, qemu
driver might check some memory backing attributes because of how
qemu works. But those attributes may work well in other drivers.

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
7 years agonodedev: Remove privateData from virNodeDeviceObj
John Ferlan [Fri, 12 May 2017 17:07:43 +0000 (13:07 -0400)]
nodedev: Remove privateData from virNodeDeviceObj

It was only ever used in node_device_hal.c which really never used it
anyway since the NODE_DEV_UDI was never referenced.  Remove free_udi()
and @privData as well as the references to obj->privateData & obj->privateFree.

Signed-off-by: John Ferlan <jferlan@redhat.com>
7 years agonodedev: Introduce virNodeDeviceObjGetDef
John Ferlan [Sat, 3 Jun 2017 11:36:01 +0000 (07:36 -0400)]
nodedev: Introduce virNodeDeviceObjGetDef

In preparation for privatizing the virNodeDeviceObj - create an accessor
for the @def field and then use it for various callers.

Signed-off-by: John Ferlan <jferlan@redhat.com>
7 years agonodedev: Create helper for finding by name in driver
John Ferlan [Fri, 12 May 2017 16:24:56 +0000 (12:24 -0400)]
nodedev: Create helper for finding by name in driver

Create nodeDeviceObjFindByName which will perform the corresponding
virNodeDeviceObjFindByName call for various node_device_driver callers
rather than having the same repetitive code.

Signed-off-by: John Ferlan <jferlan@redhat.com>
7 years agonodedev: Alter param to nodeDeviceUpdateCaps
John Ferlan [Fri, 12 May 2017 20:06:47 +0000 (16:06 -0400)]
nodedev: Alter param to nodeDeviceUpdateCaps

Rather than taking an virNodeDeviceObjPtr and dereffing the obj->def,
just pass the def.

Signed-off-by: John Ferlan <jferlan@redhat.com>
7 years agonodedev: Alter param to nodeDeviceUpdateDriverName
John Ferlan [Fri, 12 May 2017 20:04:19 +0000 (16:04 -0400)]
nodedev: Alter param to nodeDeviceUpdateDriverName

Rather than taking an virNodeDeviceObjPtr and dereffing the obj->def,
just pass the def.

Also check for an error in the function to have the calling function goto
cleanup on error.

Signed-off-by: John Ferlan <jferlan@redhat.com>
7 years agonodedev: Cleanup driver code and prototypes
John Ferlan [Fri, 12 May 2017 15:49:18 +0000 (11:49 -0400)]
nodedev: Cleanup driver code and prototypes

Alter the node_device_driver source and prototypes to follow more
recent code style guidelines w/r/t spacing between functions, format
of the function, and the prototype definitions.

While the new names for nodeDeviceUpdateCaps, nodeDeviceUpdateDriverName,
and nodeDeviceGetTime don't follow exactly w/r/t a "vir" prefix, they
do follow other driver nomenclature style.

Signed-off-by: John Ferlan <jferlan@redhat.com>
7 years agonodedev: Use switch for virNodeDeviceObjHasCap and virNodeDeviceCapMatch
John Ferlan [Thu, 25 May 2017 19:43:45 +0000 (15:43 -0400)]
nodedev: Use switch for virNodeDeviceObjHasCap and virNodeDeviceCapMatch

In order to ensure that whenever something is added to virNodeDevCapType
that both functions are considered for processing of a new capability,
change the if-then-else construct into a switch statement.

Signed-off-by: John Ferlan <jferlan@redhat.com>
7 years agonodedev: Need to check for vport capable scsi_host for vHBA searches
John Ferlan [Tue, 16 May 2017 17:21:32 +0000 (13:21 -0400)]
nodedev: Need to check for vport capable scsi_host for vHBA searches

When searching for an NPIV capable fc_host, not only does there need to
be an "fc_host" capability with the specified wwnn/wwpn or fabric_wwn,
but that scsi_host must be vport capable; otherwise, one could end up
picking an exising vHBA/NPIV which wouldn't be good.

Currently not a problem since scsi_hosts are in an as found forward linked
list and the vport capable scsi_hosts will always appear before a vHBA by
definition. However, in the near term future a hash table will be used to
lookup the devices and that could cause problems for these algorithms.

Signed-off-by: John Ferlan <jferlan@redhat.com>
7 years agointerface: Clean up virInterfaceObjListFindByMACString
John Ferlan [Sat, 15 Apr 2017 11:08:01 +0000 (07:08 -0400)]
interface: Clean up virInterfaceObjListFindByMACString

Alter the algorithm to return a list of matching names rather than a
list of match virInterfaceObjPtr which are then just dereferenced
extracting the def->name and def->mac. Since the def->mac would be
the same as the passed @mac, just return a list of names and as long
as there's only one, extract the [0] entry from the passed list.
Also alter the error message on failure to include the mac that wasn't
found.

Signed-off-by: John Ferlan <jferlan@redhat.com>
7 years agointerface: Rename some virInterfaceObj* API's
John Ferlan [Fri, 14 Apr 2017 20:49:48 +0000 (16:49 -0400)]
interface: Rename some virInterfaceObj* API's

Prefix should have been virInterfaceObjList since the API is operating
on the list of interfaces.

Signed-off-by: John Ferlan <jferlan@redhat.com>
7 years agointerface: Make _virInterfaceObjList struct private
John Ferlan [Fri, 14 Apr 2017 19:45:27 +0000 (15:45 -0400)]
interface: Make _virInterfaceObjList struct private

Move the structs into virinterfaceobj.c, create necessary accessors, and
initializers.

This also includes reworking virInterfaceObjListClone to handle receiving
a source interfaces list pointer, creating the destination interfaces object,
and copying everything from source into dest.

Signed-off-by: John Ferlan <jferlan@redhat.com>
7 years agointerface: Make _virInterfaceObj struct private
John Ferlan [Tue, 25 Apr 2017 21:45:02 +0000 (17:45 -0400)]
interface: Make _virInterfaceObj struct private

Move the struct into virinterfaceobj.c, create necessary accessors, and
initializers.

Signed-off-by: John Ferlan <jferlan@redhat.com>
7 years agointerface: Use virInterfaceDefPtr rather than deref from virInterfaceObjPtr
John Ferlan [Wed, 19 Apr 2017 02:32:17 +0000 (22:32 -0400)]
interface: Use virInterfaceDefPtr rather than deref from virInterfaceObjPtr

We're about to make the obj much more private, so make it easier to
see future changes which will require accessors for the obj->def

This also includes modifying some interfaces->objs[i]->X references to be
obj = interfaces->objs[i]; and then def = obj->def

Signed-off-by: John Ferlan <jferlan@redhat.com>
7 years agointerface: Remove some unnecessary goto's for Interface tests
John Ferlan [Fri, 14 Apr 2017 13:05:21 +0000 (09:05 -0400)]
interface: Remove some unnecessary goto's for Interface tests

Rather than using goto cleanup on object find failure and having cleanup
need to check if the obj was present before unlocking, just return immediately.

Signed-off-by: John Ferlan <jferlan@redhat.com>
7 years agointerface: Consistently use 'obj' for a virInterfaceObjPtr
John Ferlan [Wed, 19 Apr 2017 02:29:44 +0000 (22:29 -0400)]
interface: Consistently use 'obj' for a virInterfaceObjPtr

Alter variable names to be obj rather than 'iface' and/or 'obj'.

Signed-off-by: John Ferlan <jferlan@redhat.com>
7 years agodaemon: Don't initialize SASL context if not necessary
Peter Krempa [Wed, 31 May 2017 07:12:09 +0000 (09:12 +0200)]
daemon: Don't initialize SASL context if not necessary

SASL context would be initialized even if the corresponding TCP or TLS
sockets are not enabled.

fe772f24a68 attempted to fix the symptom by commenting out the settings,
but that did not fix the root cause. 3c647ee4bbb later reverted those
changes so that the more secure algorithm is used.

Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1450095

7 years agoqemu: Don't error out if allocation info can't be queried
Peter Krempa [Mon, 22 May 2017 15:44:00 +0000 (17:44 +0200)]
qemu: Don't error out if allocation info can't be queried

qemuDomainGetBlockInfo would error out if qemu did not report
'wr_highest_offset'. This usually does not happen, but can happen
briefly during active layer block commit. There's no need to report the
error, we can simply report that the disk is fully alocated at that
point.

Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1452045

7 years agoutil: remove dead code inside virstoragefile
Julio Faracco [Fri, 2 Jun 2017 01:56:09 +0000 (22:56 -0300)]
util: remove dead code inside virstoragefile

The host address or the socket path have already been checked at the
begining of the function virStorageSourceParseNBDColonString(). So,
when the parameter is not a unix socket, there is no reason to check
the address again because if it does not exists, the logic will fail
in the first IF conditional.

Signed-off-by: Julio Faracco <jcfaracco@gmail.com>
7 years agoutil: fix wrong comparison inside virStoragePermsCopy()
Julio Faracco [Fri, 2 Jun 2017 01:58:06 +0000 (22:58 -0300)]
util: fix wrong comparison inside virStoragePermsCopy()

VIR_STRDUP returns -1 if the string copy was not successful. So, the
current comparison/logic is throwing an error when VIR_STRDUP() returns
1. Only when source is NULL, it is considering as a success which is
not right.

Signed-off-by: Julio Faracco <jcfaracco@gmail.com>
7 years agoPost-release version bump to 3.5.0
Peter Krempa [Fri, 2 Jun 2017 07:27:34 +0000 (09:27 +0200)]
Post-release version bump to 3.5.0

7 years agoRelease of libvirt-3.4.0
Daniel Veillard [Fri, 2 Jun 2017 07:06:20 +0000 (09:06 +0200)]
Release of libvirt-3.4.0

* docs/news.xml: updated for the release
* po/*.po*: regenerated

7 years agoFix closing XML element in news file
Daniel P. Berrange [Thu, 1 Jun 2017 09:34:21 +0000 (10:34 +0100)]
Fix closing XML element in news file

Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
7 years agonews: Minor cleanups
Martin Kletzander [Thu, 1 Jun 2017 08:36:24 +0000 (10:36 +0200)]
news: Minor cleanups

Signed-off-by: Martin Kletzander <mkletzan@redhat.com>
7 years agoAdd some news items for the 3.4.0 release
Martin Kletzander [Wed, 31 May 2017 14:02:23 +0000 (16:02 +0200)]
Add some news items for the 3.4.0 release

Signed-off-by: Martin Kletzander <mkletzan@redhat.com>
7 years agoqemu: mkdir memory_backing_dir on startup
Michal Privoznik [Sat, 27 May 2017 10:24:30 +0000 (12:24 +0200)]
qemu: mkdir memory_backing_dir on startup

In 48d9e6cdcc and friends we've allowed users to back guest
memory by a file inside the host. And in order to keep things
manageable the memory_backing_dir variable was introduced to
qemu.conf to specify the directory where the files are kept.
However, libvirt's policy is that directories are created on
domain startup if they don't exist. We've missed this one.

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
7 years agoudev: Fix build on older platforms
Erik Skultety [Wed, 31 May 2017 09:31:29 +0000 (11:31 +0200)]
udev: Fix build on older platforms

Caused by commit @d1eea6c1 due to the missing symbol on older platforms.

Signed-off-by: Erik Skultety <eskultet@redhat.com>
7 years agoqemu: json: Fix daemon crash on handling domain shutdown event
Erik Skultety [Tue, 30 May 2017 08:28:18 +0000 (10:28 +0200)]
qemu: json: Fix daemon crash on handling domain shutdown event

commit a8eba5036 added further checking of the guest shutdown cause, but
this enhancement is available since qemu 2.10, causing a crash because
of a NULL pointer dereference on older qemus.

Thread 1 "libvirtd" received signal SIGSEGV, Segmentation fault.
0x00007ffff72441af in virJSONValueObjectGet (object=0x0,
                                             key=0x7fffd5ef11bf "guest")
    at util/virjson.c:769
769     if (object->type != VIR_JSON_TYPE_OBJECT)
(gdb) bt
0  in virJSONValueObjectGet
1  in virJSONValueObjectGetBoolean
2  in qemuMonitorJSONHandleShutdown
3  in qemuMonitorJSONIOProcessEvent
4  in qemuMonitorJSONIOProcessLine
5  in qemuMonitorJSONIOProcess
6  in qemuMonitorIOProcess

Signed-off-by: Erik Skultety <eskultet@redhat.com>
7 years agoutil: hostcpu: Correctly report total number of vcpus in virHostCPUGetMap
Nitesh Konkar [Thu, 25 May 2017 10:17:43 +0000 (15:47 +0530)]
util: hostcpu: Correctly report total number of vcpus in virHostCPUGetMap

Callers expect the return value to be the total number of vcpus in the
host (including offline vcpus). The refactor in c67e04e25fa58104e0fae41
broke this assumption by using virHostCPUGetOnlineBitmap which only
creates a bitmap long enough to hold the last online vcpu.

Report the full number of host vcpus by returning value from
virHostCPUGetCount().

Signed-off-by: Nitesh Konkar <nitkon12@linux.vnet.ibm.com>
Signed-off-by: Peter Krempa <pkrempa@redhat.com>
7 years agonodedev: Increase the netlink socket buffer size to the one used by udev
ning.bo [Tue, 9 May 2017 02:09:07 +0000 (10:09 +0800)]
nodedev: Increase the netlink socket buffer size to the one used by udev

When a number of SRIOV VFs (up to 128 on Intel XL710) is created:
for i in `seq 0 1`; do
  echo 63 > /sys/class/net/<interface>/device/sriov_numvfs
done

libvirtd will then report "udev_monitor_receive_device returned NULL"
error because the netlink socket buffer is not big enough (using GDB on
libudev confirmed this with ENOBUFFS) and thus some udev events were
dropped. This results in some devices being missing in the nodedev-list
output. This patch overrides the system's rmem_max limit but for that,
we need to make sure we've got root privileges.

https://bugzilla.redhat.com/show_bug.cgi?id=1450960

Signed-off-by: ning.bo <ning.bo9@zte.com.cn>
Signed-off-by: Erik Skultety <eskultet@redhat.com>
7 years agovirCapabilitiesInitCaches: Don't leak @cpus
Michal Privoznik [Mon, 29 May 2017 08:04:36 +0000 (10:04 +0200)]
virCapabilitiesInitCaches: Don't leak @cpus

The @cpus is allocated by virFileReadValueBitmap() but never
freed:

==21274== 40 (32 direct, 8 indirect) bytes in 1 blocks are definitely lost in loss record 808 of 1,004
==21274==    at 0x4C2E080: calloc (vg_replace_malloc.c:711)
==21274==    by 0x54BA561: virAlloc (viralloc.c:144)
==21274==    by 0x54BC604: virBitmapNewEmpty (virbitmap.c:126)
==21274==    by 0x54BD059: virBitmapParseUnlimited (virbitmap.c:570)
==21274==    by 0x54EECE9: virFileReadValueBitmap (virfile.c:4113)
==21274==    by 0x5563132: virCapabilitiesInitCaches (capabilities.c:1548)
==21274==    by 0x2BB86E59: virQEMUCapsInit (qemu_capabilities.c:1132)
==21274==    by 0x2BBEC067: virQEMUDriverCreateCapabilities (qemu_conf.c:928)
==21274==    by 0x2BC3DEAA: qemuStateInitialize (qemu_driver.c:845)
==21274==    by 0x5625AAC: virStateInitialize (libvirt.c:770)
==21274==    by 0x124519: daemonRunStateInit (libvirtd.c:881)
==21274==    by 0x554C927: virThreadHelper (virthread.c:206)

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
7 years agoutil: fix virfcp build on non-Linux
Roman Bogorodskiy [Fri, 26 May 2017 16:00:51 +0000 (20:00 +0400)]
util: fix virfcp build on non-Linux

 - Include virerror.h for virReportSystemError
 - Rename stub functions to match original function names

7 years agodocs: update news.xml
Bjoern Walk [Mon, 22 May 2017 06:38:26 +0000 (08:38 +0200)]
docs: update news.xml

Mention CCW and fc_remote_port capablities in the news.xml file.

Reviewed-by: Boris Fiuczynski <fiuczy@linux.vnet.ibm.com>
Signed-off-by: Bjoern Walk <bwalk@linux.vnet.ibm.com>
7 years agonode_device: introduce new capability FC_RPORT
Bjoern Walk [Mon, 22 May 2017 06:38:25 +0000 (08:38 +0200)]
node_device: introduce new capability FC_RPORT

Similar to scsi_host and fc_host, there is a relation between a
scsi_target and its transport specific fc_remote_port. Let's expose this
relation and relevant information behind it.

An example for a virsh nodedev-dumpxml:

    virsh # nodedev-dumpxml scsi_target0_0_0
    <device>
      <name>scsi_target0_0_0</name>
      <path>/sys/devices/[...]/host0/rport-0:0-0/target0:0:0</path>
      <parent>scsi_host0</parent>
      <capability type='scsi_target'>
        <target>target0:0:0</target>
        <capability type='fc_remote_port'>
          <rport>rport-0:0-0</rport>
          <wwpn>0x9d73bc45f0e21a86</wwpn>
        </capability>
      </capability>
    </device>

Reviewed-by: Boris Fiuczynski <fiuczy@linux.vnet.ibm.com>
Signed-off-by: Bjoern Walk <bwalk@linux.vnet.ibm.com>
7 years agoutil: helper functions for fibre channel devices
Bjoern Walk [Mon, 22 May 2017 06:38:24 +0000 (08:38 +0200)]
util: helper functions for fibre channel devices

We will need some convenient helper functions for managing sysfs-entries
for fibre channel-backed devices. Let's implement them and make them
available in the private API.

Signed-off-by: Bjoern Walk <bwalk@linux.vnet.ibm.com>
7 years agovirsh: nodedev: ability to filter CCW capabilities
Bjoern Walk [Mon, 22 May 2017 06:38:23 +0000 (08:38 +0200)]
virsh: nodedev: ability to filter CCW capabilities

Now that the node_device driver is aware of CCW devices, let's hook up
virsh so that we can filter them properly.

Reviewed-by: Boris Fiuczynski <fiuczy@linux.vnet.ibm.com>
Reviewed-by: Marc Hartmayer <mhartmay@linux.vnet.ibm.com>
Signed-off-by: Bjoern Walk <bwalk@linux.vnet.ibm.com>
7 years agonode_device: detect CCW devices
Bjoern Walk [Mon, 22 May 2017 06:38:22 +0000 (08:38 +0200)]
node_device: detect CCW devices

Make CCW devices available to the node_device driver. The devices are
already seen by udev so let's implement necessary code for detecting
them properly.

Topologically, CCW devices are similar to PCI devices, e.g.:

    +- ccw_0_0_1a2b
        |
        +- scsi_host0
            |
            +- scsi_target0_0_0
                |
                +- scsi_0_0_0_0

Reviewed-by: Boris Fiuczynski <fiuczy@linux.vnet.ibm.com>
Signed-off-by: Bjoern Walk <bwalk@linux.vnet.ibm.com>
7 years agonode_device: Unlock obj in case of an error too
Marc Hartmayer [Mon, 22 May 2017 06:38:21 +0000 (08:38 +0200)]
node_device: Unlock obj in case of an error too

Unlock @obj in case of an error too.

Reviewed-by: Bjoern Walk <bwalk@linux.vnet.ibm.com>
Reviewed-by: Boris Fiuczynski <fiuczy@linux.vnet.ibm.com>
Signed-off-by: Marc Hartmayer <mhartmay@linux.vnet.ibm.com>
7 years agonode_device: Use the @cap iterator variable
Marc Hartmayer [Mon, 22 May 2017 06:38:20 +0000 (08:38 +0200)]
node_device: Use the @cap iterator variable

Since the switch statement is already using the deref'd @cap variable
and the VIR_NODE_DEV_CAP_NET case uses it, the SCSI_HOST and PCI_DEV
cases may as well use it too.

Suggested-by: Bjoern Walk <bwalk@linux.vnet.ibm.com>
Signed-off-by: Marc Hartmayer <mhartmay@linux.vnet.ibm.com>
7 years agoqemu: Report shutdown event details
Martin Kletzander [Wed, 12 Apr 2017 10:00:37 +0000 (12:00 +0200)]
qemu: Report shutdown event details

QEMU will likely report the details of it shutting down, particularly
whether the shutdown was initiated by the guest or host.  We should
forward that information along, at least for shutdown events.  Reset
has that as well, however that is not a lifecycle event and would add
extra constants that might not be used.  It can be added later on.

Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1384007

Signed-off-by: Martin Kletzander <mkletzan@redhat.com>
7 years agorpc: Allow up to 256K records to be returned per domain from virConnectGetAllDomainStats.
Richard W.M. Jones [Fri, 26 May 2017 12:24:49 +0000 (13:24 +0100)]
rpc: Allow up to 256K records to be returned per domain from virConnectGetAllDomainStats.

The number of records that virConnectGetAllDomainStats can return per
domain is currently limited to 4096.  This is quite low -- for
example, a single guest with ~320 disks will hit this limit.  This
increases the limit to make it much larger.  Note that
VIR_NET_MESSAGE_MAX still protects the total message size in the case
where there are many domains and many disks per domain.

I tested this using a guest with 500 disks with no issues.

Signed-off-by: Richard W.M. Jones <rjones@redhat.com>
Bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=1440683

7 years agorpc: Double buffer size instead of quadrupling buffer size.
Richard W.M. Jones [Fri, 26 May 2017 11:23:42 +0000 (12:23 +0100)]
rpc: Double buffer size instead of quadrupling buffer size.

When increasing the buffer size up to VIR_NET_MESSAGE_MAX, we
currently quadruple it each time.  This unfortunately means that we
cannot allow certain buffer sizes -- for example the current
VIR_NET_MESSAGE_MAX == 33554432 can never be "hit" since ‘newlen’
jumps from 16MB to 64MB.

Instead of quadrupling, double it each time.

Thanks: Daniel Berrange.
Signed-off-by: Richard W.M. Jones <rjones@redhat.com>
7 years agonode: Don't return invalid pointers
Peter Krempa [Fri, 26 May 2017 10:57:43 +0000 (12:57 +0200)]
node: Don't return invalid pointers

Commit 4337bc57be introduced code that would in certain error paths
unref the last reference of a pointer, but return it.

Clear the pointers before returning them.

7 years agonode_device: fix memory leak in nodeDeviceSysfsGetSCSIHostCaps
Yi Wang [Fri, 26 May 2017 02:39:48 +0000 (22:39 -0400)]
node_device: fix memory leak in nodeDeviceSysfsGetSCSIHostCaps

@tmp is leaked after the second call to virVHBAGetConfig within
virVHBAIsVportCapable code block because it wasn't freed after making the
first call to the function.

Signed-off-by: Yi Wang <wang.yi59@zte.com.cn>
Signed-off-by: Erik Skultety <eskultet@redhat.com>
7 years agoutil: fix memory leak in virSocketAddrFormatFull
Yi Wang [Fri, 26 May 2017 02:12:45 +0000 (22:12 -0400)]
util: fix memory leak in virSocketAddrFormatFull

The @ipv6_host allocated in virAsprintf may be lost when virAsprintf
addrstr failed.

Signed-off-by: Yi Wang <wang.yi59@zte.com.cn>
Signed-off-by: Erik Skultety <eskultet@redhat.com>
7 years agolxc: Fix wrong VIR_FREE after a return statement
Julio Faracco [Thu, 25 May 2017 22:28:14 +0000 (19:28 -0300)]
lxc: Fix wrong VIR_FREE after a return statement

There is a VIR_FREE after a return statement. That code section is never
executed and for this reason the "tty" variable is not being freed. This
commit rearranges the logic.

Signed-off-by: Julio Faracco <jcfaracco@gmail.com>
7 years agom4: Fix missing with_acl variable
Julio Faracco [Thu, 25 May 2017 22:27:25 +0000 (19:27 -0300)]
m4: Fix missing with_acl variable

This commit fixes an acl missing variable. The virt-acl.m4 inside the
macro directory does not contain the variable 'with_acl'. So, it is
being set as an empty string "with_acl=''". This is causing a missing
option during the configuration, even if you have acl libs installed.

Signed-off-by: Julio Faracco <jcfaracco@gmail.com>
7 years agoqemu: format eim on intel-iommu command line
Ján Tomko [Thu, 18 May 2017 08:48:03 +0000 (10:48 +0200)]
qemu: format eim on intel-iommu command line

This option turns on extended interrupt mode,
which allows more than 255 vCPUs.

https://bugzilla.redhat.com/show_bug.cgi?id=1451282

Reviewed-by: Andrea Bolognani <abologna@redhat.com>
7 years agoconf: add eim attribute to <iommu><driver>
Ján Tomko [Wed, 17 May 2017 15:22:30 +0000 (17:22 +0200)]
conf: add eim attribute to <iommu><driver>

Add an attribute to control extended interrupt mode.

https://bugzilla.redhat.com/show_bug.cgi?id=1451282

Reviewed-by: Andrea Bolognani <abologna@redhat.com>
7 years agovirsh: Track when create pkttyagent
John Ferlan [Thu, 11 May 2017 13:17:09 +0000 (09:17 -0400)]
virsh: Track when create pkttyagent

https://bugzilla.redhat.com/show_bug.cgi?id=1374126

Due to how the processing for authentication using polkit works, the
virshConnect code must first "attempt" an virConnectOpenAuth and then
check for a "special" return error code VIR_ERR_AUTH_UNAVAILABLE in
order to attempt to "retry" the authentication after performing a creation
of a pkttyagent to handle the challenge/response for the client.

However, if pkttyagent creation is not possible for the authentication
being attempted (such as perhaps a "qemu+ssh://someuser@localhost/system"),
then the same failure pattern would be returned and another attempt to
create a pkttyagent would be done. This would continue "forever" until
someone forced quit (e.g. ctrl-c) from virsh as the 'authfail' was not
incremented when creating the pkttyagent.

So add a 'agentCreated' boolean to track if we've attempted to create the
agent at least once and force a failure if that creation returned the same
error pattern.

This resolves a possible never ending loop and will generate an error:

error: failed to connect to the hypervisor
error: authentication unavailable: no polkit agent available to authenticate action 'org.libvirt.unix.manage'

NB: If the authentication was for a sufficiently privileged client, such as
qemu+ssh://root@localhost/system, then the remoteDispatchAuthList "allows"
the authentication to use libvirt since @callerUid would be 0.

7 years agoqemu: Use correct variable in qemuDomainSetBlockIoTune
Peter Krempa [Thu, 25 May 2017 11:09:36 +0000 (13:09 +0200)]
qemu: Use correct variable in qemuDomainSetBlockIoTune

'param' contains the correct element from 'params'.

If the group name would not be the first parameter libvirtd would crash.

Introduced in c53bd25b13.

Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1455510

7 years agoCI: show the log in case of failure
Claudio André [Thu, 25 May 2017 05:19:45 +0000 (02:19 -0300)]
CI: show the log in case of failure

Disclose the content of the 'test-suite.log' file (if available) in
case of failures inside Travis-CI. This is needed to understand what
happened and to provide hints about the proper fix (if applicable).

7 years agovirDomainDefCheckABIStabilityFlags: move memtune checks into a separate function
Michal Privoznik [Thu, 18 May 2017 07:58:32 +0000 (09:58 +0200)]
virDomainDefCheckABIStabilityFlags: move memtune checks into a separate function

The checks are scattered all over the place. Move them into a
single function.

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
7 years agoutil: display leading zeros of USB vendor/product id's in log messages
Chen Hanxiao [Fri, 19 May 2017 07:17:32 +0000 (15:17 +0800)]
util: display leading zeros of USB vendor/product id's in log messages

Many vendor id's and product id's have leading zeros.  We should show
them in the logs.

Signed-off-by: Chen Hanxiao <chenhanxiao@gmail.com>
Reviewed-by: Laine Stump <laine@laine.org>
7 years agoqemu: Fix memory leak in qemuDomainUpdateMemoryDeviceInfo
Yi Wang [Thu, 25 May 2017 02:20:16 +0000 (22:20 -0400)]
qemu: Fix memory leak in qemuDomainUpdateMemoryDeviceInfo

The @meminfo allocated in qemuMonitorGetMemoryDeviceInfo() may be
lost when qemuDomainObjExitMonitor() failed.

Signed-off-by: Yi Wang <wang.yi59@zte.com.cn>
Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
7 years agoconf: Resolve corner case on fc_host deletion
John Ferlan [Sat, 29 Apr 2017 15:29:27 +0000 (11:29 -0400)]
conf: Resolve corner case on fc_host deletion

https://bugzilla.redhat.com/show_bug.cgi?id=1420740

Testing found an inventive way to cause an error at shutdown by providing the
parent name for the fc host creation using the "same name" as the HBA. Since
the code thus assumed the parent host name provided was the parent HBA and
just extracted out the host number and sent that along to the vport_destroy
this avoided checks made for equality.

So just add the equality check to that path to resolve.

7 years agoconf: fix build issue caused by shadowing global declaration
Pavel Hrdina [Wed, 24 May 2017 12:31:26 +0000 (14:31 +0200)]
conf: fix build issue caused by shadowing global declaration

Signed-off-by: Pavel Hrdina <phrdina@redhat.com>
7 years agorpc: Bump maximum message size to 32M
Peter Krempa [Mon, 22 May 2017 15:48:09 +0000 (17:48 +0200)]
rpc: Bump maximum message size to 32M

While most of the APIs are okay with 16M messages, the bulk stats API
can run into the limit in big configurations. Before we devise a new
plan for this, bump this limit slightly to accomodate some more configs.

7 years agoconf: don't iterate over backcompat console in virDomainChrDefForeach
Pavel Hrdina [Mon, 15 May 2017 13:28:15 +0000 (15:28 +0200)]
conf: don't iterate over backcompat console in virDomainChrDefForeach

If the first console is just a copy of the first serial device we
don't need to iterate over the same device twice in order to perform
actions like security labeling, cgroup configuring, etc.

Currently only security SELinux manager was aware of this fact.

Signed-off-by: Pavel Hrdina <phrdina@redhat.com>
7 years agovz: minor cleanup in prlsdkDomainSetUserPassword
Konstantin Neumoin [Wed, 3 May 2017 10:44:52 +0000 (13:44 +0300)]
vz: minor cleanup in prlsdkDomainSetUserPassword

No need begin job for asynchronous operation.

Signed-off-by: Konstantin Neumoin <kneumoin@virtuozzo.com>
7 years agovz: fix raise in vzDomainBlock
Konstantin Neumoin [Wed, 3 May 2017 10:44:51 +0000 (13:44 +0300)]
vz: fix raise in vzDomainBlock

Put domain access after acquiring job condition, otherwise
another job can change it meanwhile.

Signed-off-by: Konstantin Neumoin <kneumoin@virtuozzo.com>
Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
7 years agovz: unlock dom until resize operation
Konstantin Neumoin [Wed, 3 May 2017 11:23:35 +0000 (14:23 +0300)]
vz: unlock dom until resize operation

We have to use waitDomainJob instead of waitJob, because of it
unlock the domain until job has finished, so domain will be available
for other clients.

Signed-off-by: Konstantin Neumoin <kneumoin@virtuozzo.com>
7 years agoqemu: Properly check return value of VIR_STRDUP in qemuDomainGetBlockIoTune
Peter Krempa [Tue, 23 May 2017 15:21:56 +0000 (17:21 +0200)]
qemu: Properly check return value of VIR_STRDUP in qemuDomainGetBlockIoTune

Setting the 'group_name' for a disk would falsely trigger a error path
as in commit 4b57f76502 we did not properly check the return value of
VIR_STRDUP.

7 years agolibxl: add default controllers for USB devices
Jim Fehlig [Tue, 28 Mar 2017 23:34:16 +0000 (17:34 -0600)]
libxl: add default controllers for USB devices

Attempting to start a domain with USB hostdevs but no USB controllers
fails with the rather cryptic error

libxl: error: libxl_qmp.c:287:qmp_handle_error_response: received an
error message from QMP server: Bus 'xenusb-0.0' not found

This can be fixed by creating default USB controllers. When no USB
controllers are defined, create the number of 8 port controllers
necessary to accommodate the number of defined USB devices.

Note that USB controllers are already created as needed in the
domainAttachDevice code path. E.g. a USB controller will be created,
if necessary, when attaching a USB device with
'virsh attach-device dom usbdev.xml'.

7 years agoqemu: process: Clear priv->namespaces on VM shutdown
Peter Krempa [Mon, 22 May 2017 11:36:55 +0000 (13:36 +0200)]
qemu: process: Clear priv->namespaces on VM shutdown

Otherwise the private data entry would be kept across instances of the
same VM even if it's not configured to do so.

Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1453142

7 years agoqemu: Remove unused variables in qemuDomainUpdateDeviceConfig
Kothapally Madhu Pavan [Tue, 16 May 2017 07:45:09 +0000 (03:45 -0400)]
qemu: Remove unused variables in qemuDomainUpdateDeviceConfig

priv and qemuCaps variables are not used anymore.

Signed-off-by: Kothapally Madhu Pavan <kmp@linux.vnet.ibm.com>
7 years agoRevert "qemu: propagate bridge MTU into qemu "host_mtu" option"
Laine Stump [Thu, 18 May 2017 18:16:27 +0000 (14:16 -0400)]
Revert "qemu: propagate bridge MTU into qemu "host_mtu" option"

This reverts commit 2841e675.

It turns out that adding the host_mtu field to the PCI capabilities in
the guest bumps the length of PCI capabilities beyond the 32 byte
boundary, so the virtio-net device gets 64 bytes of ioport space
instead of 32, which offsets the address of all the other following
devices. Migration doesn't work very well when the location and length
of PCI capabilities of devices is changed between source and
destination.

This means that we need to make sure that the absence/presence of
host_mtu on the qemu commandline always matches between source and
destination, which means that we need to make setting of host_mtu an
opt-in thing (it can't happen automatically when the bridge being used
has a non-default MTU, which is what commit 2841e675 implemented).

I do want to re-implement this feature with an <mtu auto='on'/>
setting, but probably won't backport that to any stable branches, so
I'm first reverting the original commit, and that revert can be pushed
to the few releases that have been made since the original (3.1.0 -
3.3.0)

Resolves: https://bugzilla.redhat.com/1449346

7 years agolibxl: add default listen address for VNC and spice
Jim Fehlig [Fri, 19 May 2017 21:52:04 +0000 (15:52 -0600)]
libxl: add default listen address for VNC and spice

If a VNC listen address is not specified in domXML, libxl
will default to 127.0.0.1, but this is never reflected in the domXML.
In the case of spice, a missing listen address resulted in listening
on all interfaces, i.e. '0.0.0.0'. If not specified, set the listen
address in virDomainGraphicsDef struct to the libxl default when
creating the frame buffer device. Additionally, set default spice
listen address to 127.0.0.1.

7 years agomaint: define a macro for IPv4 loopback address
Jim Fehlig [Fri, 19 May 2017 21:31:48 +0000 (15:31 -0600)]
maint: define a macro for IPv4 loopback address

Use a macro instead of hardcoding "127.0.0.1" throughout the
sources.

7 years agoProvide a useful README file
Daniel P. Berrange [Tue, 16 May 2017 10:48:17 +0000 (11:48 +0100)]
Provide a useful README file

The current README file contents has almost no useful info, and that
which does exist is very outdated.

Reviewed-by: Andrea Bolognani <abologna@redhat.com>
Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
7 years agovirStreamSparseSendAll: Reset @want in each iteration
Michal Privoznik [Mon, 22 May 2017 09:44:26 +0000 (11:44 +0200)]
virStreamSparseSendAll: Reset @want in each iteration

There's a slight problem with the current function. Assume we are
currently in a data section and we have say 42 bytes until next
section. Therefore, just before (handler) is called to fill up
the buffer with data, @want is changed to 42 to match the amount
of data left in the current section. However, after hole is
processed, we are back in data section but with incredibly small
@want size. Nobody will ever reset it back. This results in
incredible data fragmentation.

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
7 years agodocs: Update pointer to networking information
Andrea Bolognani [Mon, 15 May 2017 12:16:54 +0000 (14:16 +0200)]
docs: Update pointer to networking information

Commit 6fb5dd4fd804 removed docs/archnetwork.html.in, but
left behind a pointer to it in docs/formatnetwork.html.in.

Update it so that it points to the wiki, which contains
more detailed and recent information anyway.

7 years agovirCapabilitiesInitCaches: Don't leak cache dir
Michal Privoznik [Mon, 22 May 2017 10:07:19 +0000 (12:07 +0200)]
virCapabilitiesInitCaches: Don't leak cache dir

To every virDirOpen we must have VIR_DIR_CLOSE otherwise FD is
leaked.

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Pavel Hrdina <phrdina@redhat.com>
7 years agoDo not release unreserved address in qemuDomainAttachRNGDevice
Ján Tomko [Fri, 19 May 2017 12:14:32 +0000 (14:14 +0200)]
Do not release unreserved address in qemuDomainAttachRNGDevice

Only set releaseaddr to true after the address has been
reserved successfully.

https://bugzilla.redhat.com/show_bug.cgi?id=1452581

Reviewed-by: John Ferlan <jferlan@redhat.com>
7 years agoqemu: hotplug: print correct vcpu when validating hot(un)plug config
Peter Krempa [Fri, 12 May 2017 15:46:31 +0000 (17:46 +0200)]
qemu: hotplug: print correct vcpu when validating hot(un)plug config

The error message would contain first vcpu id after the list of vcpus
selected for modification. To print the proper vcpu id remember the
first vcpu selected to be modified.

7 years agoutil: Don't leak @reply in virSystemdGetMachineNameByPID
Wang King [Sat, 20 May 2017 01:31:57 +0000 (09:31 +0800)]
util: Don't leak @reply in virSystemdGetMachineNameByPID

@reply is a DBusMessage object returned by virDBusCallMethod in
get machine object call path, dereference it before calling
virDBusCallMethod again to get machine name.

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
7 years agotest: fixing variable names for test suite inside configure.ac.
Julio Faracco [Sat, 20 May 2017 14:53:54 +0000 (11:53 -0300)]
test: fixing variable names for test suite inside configure.ac.

Both variables for gcov and oom have wrong names inside configure.ac.
For this reason, the Test Suite configuration is not showing the current
configuration.

Before patching:
configure:    windres: no
configure:
configure: Test suite
configure:
configure:          Coverage:
configure:         Alloc OOM:
configure:
configure: Miscellaneous

After patching (using --enable-test-coverage and --enable-test-oom):
configure:    windres: no
configure:
configure: Test suite
configure:
configure:          Coverage: yes
configure:         Alloc OOM: yes
configure:
configure: Miscellaneous

Signed-off-by: Julio Faracco <jcfaracco@gmail.com>
7 years agoxenconfig: fix handling of NULL disk source
Wim ten Have [Fri, 19 May 2017 14:38:43 +0000 (16:38 +0200)]
xenconfig: fix handling of NULL disk source

It is possible to crash libvirtd when converting xl native config to
domXML when the xl config contains an empty disk source, e.g. an empty
CDROM. Fix by checking that the disk source is non-NULL before parsing it.

Signed-off-by: Wim ten Have <wim.ten.have@oracle.com>
7 years agovirfiletest: include linux/falloc.h
Michal Privoznik [Thu, 18 May 2017 13:38:04 +0000 (15:38 +0200)]
virfiletest: include linux/falloc.h

On systems with older glibc including fcntl.h for getting
FALLOC_FL_PUNCH_HOLE defined is not enough. We must also include
linux/falloc.h.

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
7 years agovirfiletest: Test virFileInData iff SEEK_HOLE is defined
Michal Privoznik [Thu, 18 May 2017 12:36:41 +0000 (14:36 +0200)]
virfiletest: Test virFileInData iff SEEK_HOLE is defined

Yet another place where we need to wrap code in
HAVE_DECL_SEEK_HOLE block.

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
7 years agovirfile: Provide stub for virFileInData
Michal Privoznik [Thu, 18 May 2017 09:55:12 +0000 (11:55 +0200)]
virfile: Provide stub for virFileInData

Some older systems (such as RHEL6) lack SEEK_HOLE and SEEK_DATA
which virFileInData relies on. Provide a stub for these systems.

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
7 years agoconf: Don't assign value from ..TypeFromString directly to enum
Peter Krempa [Fri, 19 May 2017 08:25:00 +0000 (10:25 +0200)]
conf: Don't assign value from ..TypeFromString directly to enum

Enums are unsigned, so it's impossible to check whether the helper
returned -1 for invalid conversions.

Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1452454

7 years agoapparmor, virt-aa-helper: Explicit denies for host devices
Felix Geyer [Thu, 18 May 2017 08:53:43 +0000 (10:53 +0200)]
apparmor, virt-aa-helper: Explicit denies for host devices

Add explicit denies for disk devices to avoid cluttering dmesg with
(acceptable) denials.

Signed-off-by: Christian Ehrhardt <christian.ehrhardt@canonical.com>
Signed-off-by: Stefan Bader <stefan.bader@canonical.com>
Acked-by: Guido Günther <agx@sigxcpu.org>
7 years agoapparmor, virt-aa-helper: Allow access to libnl-3 config files
Felix Geyer [Thu, 18 May 2017 08:53:42 +0000 (10:53 +0200)]
apparmor, virt-aa-helper: Allow access to libnl-3 config files

Allow access to libnl-3 config files

Signed-off-by: Christian Ehrhardt <christian.ehrhardt@canonical.com>
Signed-off-by: Stefan Bader <stefan.bader@canonical.com>
Acked-by: Guido Günther <agx@sigxcpu.org>
7 years agoqemu: monitor: Don't bother extracting vCPU halted state in text monitor
Peter Krempa [Thu, 18 May 2017 11:27:24 +0000 (13:27 +0200)]
qemu: monitor: Don't bother extracting vCPU halted state in text monitor

The code causes the 'offset' variable to be overwritten (possibly with
NULL if neither of the vCPUs is halted) which causes a crash since the
variable is still used after that part.

Additionally there's a bug, since strstr() would look up the '(halted)'
string in the whole string rather than just the currently processed line
the returned data is completely bogus.

Rather than switching to single line parsing let's remove the code
altogether since it has a commonly used JSON monitor alternative and
the data itself is not very useful to report.

The code was introduced in commit cc5e695bde

Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1452106

7 years agodatatypes: removing unnecessary return statement.
Julio Faracco [Thu, 18 May 2017 01:53:23 +0000 (22:53 -0300)]
datatypes: removing unnecessary return statement.

There is a wrong 'return' statement after a 'goto' statement inside the
function virConnectCloseCallbackDataRegister(). This commit only removes
the 'return'.

Signed-off-by: Julio Faracco <jcfaracco@gmail.com>
7 years agovirStream: Forbid negative seeks
Michal Privoznik [Thu, 18 May 2017 06:27:27 +0000 (08:27 +0200)]
virStream: Forbid negative seeks

Currently, we don't assign any meaning to that. Our current view
on virStream is that it's merely a pipe. And pipes don't support
seeking.

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
7 years agonews: Document sparse streams
Michal Privoznik [Thu, 18 May 2017 06:17:52 +0000 (08:17 +0200)]
news: Document sparse streams

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
7 years agonodedev: mdev: Fix build caused by symbol shadowing
Erik Skultety [Thu, 18 May 2017 12:43:05 +0000 (14:43 +0200)]
nodedev: mdev: Fix build caused by symbol shadowing

GCC 4.6 complains about a local declaration shadowing a global symbol.

Signed-off-by: Erik Skultety <eskultet@redhat.com>
7 years agoutil: Do not leak @handles in stop netlink event service
Wang King [Thu, 18 May 2017 04:06:42 +0000 (12:06 +0800)]
util: Do not leak @handles in stop netlink event service

Commit e3ba4025 introduced srv->handles and VIR_RESIZE_N to allocate
@handles as necessary, but did not free the handles during when calling
virNetlinkEventServiceStop.

7 years agoutil: Deduplicate code in virNetlinkEventServiceStopAll
Wang King [Thu, 18 May 2017 04:06:41 +0000 (12:06 +0800)]
util: Deduplicate code in virNetlinkEventServiceStopAll

Commit 15a71e60 introduced the virNetlinkEventServiceStopAll function, and
the code in virNetlinkEventServiceStop is copied to this function, so just
call virNetlinkEventServiceStop instead.

7 years agodocs: Document the mediated devices within the nodedev driver
Erik Skultety [Wed, 29 Mar 2017 10:36:31 +0000 (12:36 +0200)]
docs: Document the mediated devices within the nodedev driver

https://bugzilla.redhat.com/show_bug.cgi?id=1452072

Signed-off-by: Erik Skultety <eskultet@redhat.com>