]> git.ipfire.org Git - thirdparty/libvirt.git/log
thirdparty/libvirt.git
8 years agodisk: Force usage of parted when checking disk format for "bsd"
John Ferlan [Fri, 7 Apr 2017 13:38:44 +0000 (09:38 -0400)] 
disk: Force usage of parted when checking disk format for "bsd"

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

Add "bsd" to the list of format types to not checked during blkid
processing even though it supposedly knows the format - for some
(now unknown) reason it's returning partition table not found. So
let's just let PARTED handle "bsd" too.

Signed-off-by: John Ferlan <jferlan@redhat.com>
(cherry picked from commit 98f424d5038b362d1b62549930d0b9253106bdca)

8 years agodisk: Resolve issues with disk partition build/start checks
John Ferlan [Fri, 7 Apr 2017 11:02:40 +0000 (07:02 -0400)] 
disk: Resolve issues with disk partition build/start checks

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

Commit id 'a48c674fb' added a check for format types "dvh" and "pc98"
to use the parted print processing instead of using blkid processing
in order to validate the label on the disk was what is expected for
disk pool startup. However, commit id 'a4cb4a74f' really messed things
up by missing an else condition causing PARTEDFindLabel to always
return DIFFERENT.

Signed-off-by: John Ferlan <jferlan@redhat.com>
(cherry picked from commit f2a123203105b4fe010aea866e87f8bcf5f31193)

8 years agoconf: create new RemovalFailed event using correct class
Pavel Hrdina [Fri, 7 Apr 2017 12:00:22 +0000 (14:00 +0200)] 
conf: create new RemovalFailed event using correct class

Signed-off-by: Pavel Hrdina <phrdina@redhat.com>
(cherry picked from commit be193c4dc6f2837a4abb279ee62b039448e0aa5e)

8 years agoqemu: fix memory leak and check mdevPath
Pavel Hrdina [Fri, 7 Apr 2017 11:43:25 +0000 (13:43 +0200)] 
qemu: fix memory leak and check mdevPath

Signed-off-by: Pavel Hrdina <phrdina@redhat.com>
(cherry picked from commit d58c146a4f083c2d86ac5a4dd450f63751a36913)

8 years agoqemu: Properly reset TLS in qemuProcessRecoverMigrationIn
Jiri Denemark [Tue, 4 Apr 2017 17:43:13 +0000 (19:43 +0200)] 
qemu: Properly reset TLS in qemuProcessRecoverMigrationIn

There is no async job running when a freshly started libvirtd is trying
to recover from an interrupted incoming migration. While at it, let's
call qemuMigrationResetTLS every time we don't kill the domain. This is
not strictly necessary since TLS is not supported when v2 migration
protocol is used, but doing so makes more sense.

Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
(cherry picked from commit 59b28ecab845adb6fefe3280675f95d1f2135e3b)

8 years agoProperly ignore files in build-aux directory
Jiri Denemark [Fri, 7 Apr 2017 06:50:21 +0000 (08:50 +0200)] 
Properly ignore files in build-aux directory

We want to ignore all files except *.pl in build-aux directory, however
the unignore pattern "!/build-aux/*.pl" doesn't have any effect because
a previous "/build-aux/" pattern ignores the directory itself rather
than individual files in it.

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

Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
(cherry picked from commit f0ad8e7ee083c4bf196af42c615aac803be08460)

8 years agoconf: Fix possible memleak in capabilities
Martin Kletzander [Wed, 29 Mar 2017 11:36:15 +0000 (13:36 +0200)] 
conf: Fix possible memleak in capabilities

If formatting NUMA topology fails, the function returns immediatelly,
but the buffer structure allocated on the stack references lot of
heap-allocated memory and that would get lost in such case.

Signed-off-by: Martin Kletzander <mkletzan@redhat.com>
(cherry picked from commit 6369ee0483b99ec4d2e624e9a32e35b7bdd9ab8a)

8 years agoSplit out -Wframe-larger-than warning from WARN_CLFAGS
Ján Tomko [Wed, 29 Jun 2016 13:19:18 +0000 (15:19 +0200)] 
Split out -Wframe-larger-than warning from WARN_CLFAGS

Introduce STRICT_FRAME_LIMIT_CFLAGS that will be used for
production code and RELAXED_FRAME_LIMIT_CFLAGS for tests.

Raising the limit for tests allows building them with clang
with optimizations disabled.

(cherry picked from commit e73889b6311f5b43d859caa4bae84bfdb299967a)

8 years agovirISCSIGetSession: Don't leak memory
Michal Privoznik [Wed, 5 Apr 2017 08:48:10 +0000 (10:48 +0200)] 
virISCSIGetSession: Don't leak memory

This function runs an iscsi command and parses its output.
However, due to the nature of things, virISCSIExtractSession()
callback can be called multiple times. In each run it would
allocate new memory and overwrite the variable where we keep
pointer to it and thus leaking old allocations.

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
(cherry picked from commit 9c037c6caea6155bad82eb3a204af68dcdaf7409)

8 years agovirStorageSourceClear: Don't leave dangling pointers behind
Michal Privoznik [Wed, 5 Apr 2017 07:59:25 +0000 (09:59 +0200)] 
virStorageSourceClear: Don't leave dangling pointers behind

Imagine that this function is called twice over the same disk
source. While in the first run all allocated memory is freed, not
all pointers are set to NULL (e.g. def->srcpool). So when called
again, these poitners are freed again resulting in double free.

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
(cherry picked from commit 349badbffd50f86580884b29fdfa7ad6ea082c2e)

8 years agoqemu: Break endless loop if qemuMigrationResetTLS fails
Jiri Denemark [Tue, 4 Apr 2017 10:46:37 +0000 (12:46 +0200)] 
qemu: Break endless loop if qemuMigrationResetTLS fails

Jumping to "endjob" label from a code after this label is not a very
good idea.

Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
(cherry picked from commit d658c8594e05d286de6af22ea88689d1d5e2a82b)

8 years agostorage: gluster: Implement 'checkPool' method so that state is restored
Peter Krempa [Thu, 30 Mar 2017 11:18:43 +0000 (13:18 +0200)] 
storage: gluster: Implement 'checkPool' method so that state is restored

After restart of libvirtd the 'checkPool' method is supposed to validate
that the pool is online. Since libvirt then refreshes the pool contents
anyways just return whether the pool was supposed to be online so that
the code can be reached. This is necessary since if a pool does not
implement the method it's automatically considered as inactive.

Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1436065
(cherry picked from commit a200ebbc6f2cc5835daf0ddda9a347b7311a7877)

8 years agodocs: Document limitation of maximum vcpu count used with <topology>
Peter Krempa [Tue, 4 Apr 2017 14:02:21 +0000 (16:02 +0200)] 
docs: Document limitation of maximum vcpu count used with <topology>

qemu requires that the topology equals to the maximum vcpu count.
Document this along with the API to set maximum vcpu count and the XML
element.

Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1426220
(cherry picked from commit 4661a1868bb4d918e43ed96c4ae14f5ecd37b3f7)

8 years agoqemu: Fix resource leak in qemuDomainAddChardevTLSObjects error path
John Ferlan [Mon, 3 Apr 2017 16:53:33 +0000 (12:53 -0400)] 
qemu: Fix resource leak in qemuDomainAddChardevTLSObjects error path

On any failure, call virJSONValueFree for the *Props.

Signed-off-by: John Ferlan <jferlan@redhat.com>
(cherry picked from commit 2e8c60958ac32624296eee263bf34bb21a32360c)

8 years agoqemu: Initialize 'data' argument
John Ferlan [Mon, 3 Apr 2017 16:53:32 +0000 (12:53 -0400)] 
qemu: Initialize 'data' argument

Initialize stack variable to {0}

Signed-off-by: John Ferlan <jferlan@redhat.com>
(cherry picked from commit 83c58ea39622d732097d377cae9e87650f5df960)

8 years agostorage: util: Pass pool type to virStorageBackendFindGlusterPoolSources
Peter Krempa [Thu, 30 Mar 2017 13:08:06 +0000 (15:08 +0200)] 
storage: util: Pass pool type to virStorageBackendFindGlusterPoolSources

The native gluster pool source list data differs from the data used for
attaching gluster volumes as netfs pools. Currently the only difference
was the format. Since native pools don't use it and later there will be
more differences add a more deterministic way to switch between the
types instead.

(cherry picked from commit a92160dbd5416b093c0d99991afe300b9b8572c4)

8 years agoutil: ignore -Wcast-align in virNetlinkDumpCommand
Ján Tomko [Tue, 4 Apr 2017 10:51:47 +0000 (12:51 +0200)] 
util: ignore -Wcast-align in virNetlinkDumpCommand

Similar to commit b202c39 ignore the warning that breaks the build
with clang:
util/virnetlink.c:365:52: error: cast from 'char *' to 'struct nlmsghdr *'
 increases required alignment from 1 to 4 [-Werror,-Wcast-align]
        for (msg = resp; NLMSG_OK(msg, len); msg = NLMSG_NEXT(msg, len)) {
                                                   ^~~~~~~~~~~~~~~~~~~~
/usr/include/linux/netlink.h:87:7: note: expanded from macro 'NLMSG_NEXT'
         (struct nlmsghdr*)(((char*)(nlh)) + NLMSG_ALIGN((nlh)->nlmsg_len)))
         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

(cherry picked from commit 04be4111d90193016a390ecdd144bc80fa5667ef)

8 years agoqemu: hotplug: Clear vcpu ordering for coldplug of vcpus
Peter Krempa [Fri, 31 Mar 2017 11:05:47 +0000 (13:05 +0200)] 
qemu: hotplug: Clear vcpu ordering for coldplug of vcpus

Vcpu order is required to stay sequential. Clear the order on cpu
coldplug to avoid issues with removing vcpus out of sequence.

(cherry picked from commit b416a33a6f49b7755a65d0de4ee09c770b79cc8d)

8 years agoqemu: hotplug: Fix formatting strings in qemuDomainFilterHotplugVcpuEntities
Peter Krempa [Fri, 31 Mar 2017 11:28:19 +0000 (13:28 +0200)] 
qemu: hotplug: Fix formatting strings in qemuDomainFilterHotplugVcpuEntities

'next' is declared as 'ssize_t' so use '%zd'

(cherry picked from commit 86d69c309181ed7782427261abd85a4b3fdc704f)

8 years agoqemu: hotplug: Iterate over vcpu 0 in individual vcpu hotplug code
Peter Krempa [Fri, 31 Mar 2017 11:02:14 +0000 (13:02 +0200)] 
qemu: hotplug: Iterate over vcpu 0 in individual vcpu hotplug code

Buggy condition meant that vcpu0 would not be iterated in the checks.
Since it's not hotpluggable anyways we would not be able to break the
configuration of a live VM.

Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1437013
(cherry picked from commit 315f443dbb9f821fb207c30585e01dfbaac01878)

8 years agoqemu: Add device id for mediated devices on qemu command line
Erik Skultety [Mon, 3 Apr 2017 14:10:00 +0000 (16:10 +0200)] 
qemu: Add device id for mediated devices on qemu command line

Like all devices, add the 'id' option for mdevs as well. Patch also
adjusts the test accordingly.

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

Signed-off-by: Erik Skultety <eskultet@redhat.com>
(cherry picked from commit c3272e5e12e0bfd43b8101b73ae13d264c13337f)

8 years agostorage: Fix capacity value for LUKS encrypted volumes
John Ferlan [Fri, 24 Mar 2017 13:26:17 +0000 (09:26 -0400)] 
storage: Fix capacity value for LUKS encrypted volumes

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

The 'capacity' value (e.g. guest logical size) for a LUKS volume is
smaller than the 'physical' value of the file in the file system, so
we need to account for that.

When peeking at the encryption information about the volume add a fetch
of the payload_offset which is described as the offset to the start of
the volume data (in 512 byte sectors) in QEMU's QCryptoBlockLUKSHeader.

Then adjust the ->capacity appropriately when we determine that the
volume target encryption has a payload_offset value.

(cherry picked from commit b7d44f450c06803df7df3ad380f7a5c97425c1e6)

8 years agovirNetDevIPCheckIPv6ForwardingCallback fixes
Cédric Bosdonnat [Tue, 28 Mar 2017 14:00:24 +0000 (16:00 +0200)] 
virNetDevIPCheckIPv6ForwardingCallback fixes

Add check for more than one RTA_OIF, even though this is rather
unlikely.

Get rid of the buggy switch / break as this code won't need to
handle more attributes.

Use VIR_WARNINGS_NO_CAST_ALIGN to fix impossible to fix
util/virnetdevip.c:560:17: error: cast increases required alignment of target type [-Werror=cast-align]

(cherry picked from commit b202c39adc5c512037bd38c195585a1b93fe136f)

8 years agostorage: driver: Remove unavailable transient pools after restart
Peter Krempa [Thu, 30 Mar 2017 11:47:45 +0000 (13:47 +0200)] 
storage: driver: Remove unavailable transient pools after restart

If a transient storage pool is deemed inactive after libvirtd restart it
would not be deleted from the list. Reuse virStoragePoolUpdateInactive
along with a refactor necessary to properly update the state.

Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1242801
(cherry picked from commit f3a8e80c130513c2b488df5a561c788133148685)

8 years agostorage: driver: Split out code fixing pool state after deactivation
Peter Krempa [Thu, 30 Mar 2017 11:45:45 +0000 (13:45 +0200)] 
storage: driver: Split out code fixing pool state after deactivation

After a pool is made inactive the definition objects need to be updated
(if a new definition is prepared) and transient pools need to be
completely removed. Split out the code doing these steps into a separate
function for later reuse.

(cherry picked from commit aced6b23560b7d697069b0d81cfab230e2b20c47)

8 years agostorage: backend: Use correct stringifier for pool type
Peter Krempa [Thu, 30 Mar 2017 08:13:36 +0000 (10:13 +0200)] 
storage: backend: Use correct stringifier for pool type

When registering a storage poll backend, the code would use
virStorageTypeToString instead of virStoragePoolTypeToString. The
following message would be logged:

virDriverLoadModuleFunc:71 : Lookup function 'virStorageBackendSCSIRegister'
virStorageBackendRegister:174 : Registering storage backend '(null)'
(cherry picked from commit 894133a3bd88fadb950042aec1e9edda0a640f83)

8 years agomdev: Fix daemon crash on domain shutdown after reconnect
Erik Skultety [Fri, 28 Apr 2017 07:24:31 +0000 (09:24 +0200)] 
mdev: Fix daemon crash on domain shutdown after reconnect

The problem resides in virHostdevUpdateActiveMediatedDevices which gets
called during qemuProcessReconnect. The issue here is that
virMediatedDeviceListAdd takes a pointer to the item to be added to the
list to which VIR_APPEND_ELEMENT is used, which also clears the pointer.
However, in this case only the local copy of the pointer got cleared,
leaving the original pointing to valid memory. To sum it up, during
cleanup phase, the original pointer is freed and the daemon crashes
basically any time it would access it.

Backtrace:
0x00007ffff3ccdeba in __strcmp_sse2_unaligned
0x00007ffff72a444a in virMediatedDeviceListFindIndex
0x00007ffff7241446 in virHostdevReAttachMediatedDevices
0x00007fffc60215d9 in qemuHostdevReAttachMediatedDevices
0x00007fffc60216dc in qemuHostdevReAttachDomainDevices
0x00007fffc6046e6f in qemuProcessStop
0x00007fffc6091596 in processMonitorEOFEvent
0x00007fffc6091793 in qemuProcessEventHandler
0x00007ffff7294bf5 in virThreadPoolWorker
0x00007ffff7294184 in virThreadHelper
0x00007ffff3fdc3c4 in start_thread () from /lib64/libpthread.so.0
0x00007ffff3d269cf in clone () from /lib64/libc.so.6

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

(cherry picked from commit 92e30a4dace54d06433f763e1acba0a81bb5c82e)
Signed-off-by: Erik Skultety <eskultet@redhat.com>
8 years agoutil: mdev: Use a local variable instead of a direct pointer access
Erik Skultety [Fri, 28 Apr 2017 05:52:52 +0000 (07:52 +0200)] 
util: mdev: Use a local variable instead of a direct pointer access

Use a local variable to hold data, rather than accessing the pointer
after calling virMediatedDeviceListAdd (therefore VIR_APPEND_ELEMENT).
Although not causing an issue at the moment, this change is a necessary
prerequisite for tweaking virMediatedDeviceListAdd in a separate patch,
which will take a reference for the source pointer (instead of pointer
value) and will clear it along the way.

(cherry picked from commit 2739a983f235f0d92d210800d61bd1a195f01850)
Signed-off-by: Erik Skultety <eskultet@redhat.com>
8 years agoqemu: Fix regression when hyperv/vendor_id feature is used
Jiri Denemark [Thu, 6 Apr 2017 11:52:30 +0000 (13:52 +0200)] 
qemu: Fix regression when hyperv/vendor_id feature is used

qemuProcessVerifyHypervFeatures is supposed to check whether all
requested hyperv features were actually honored by QEMU/KVM. This is
done by checking the corresponding CPUID bits reported by the virtual
CPU. In other words, it doesn't work for string properties, such as
VIR_DOMAIN_HYPERV_VENDOR_ID (there is no CPUID bit we could check). We
could theoretically check all 96 bits corresponding to the vendor
string, but luckily we don't have to check the feature at all. If QEMU
is too old to support hyperv features, the domain won't even start.
Otherwise, it is always supported.

Without this patch, libvirt refuses to start a domain which contains

  <features>
    <hyperv>
      <vendor_id state='on' value='...'/>
    </hyperv>
  </features>

reporting internal error: "unknown CPU feature __kvm_hv_vendor_id.

This regression was introduced by commit v3.1.0-186-ge9dbe7011, which
(by fixing the virCPUDataCheckFeature condition in
qemuProcessVerifyHypervFeatures) revealed an old bug in the feature
verification code. It's been there ever since the verification was
implemented by commit v1.3.3-rc1-5-g95bbe4bf5, which effectively did not
check VIR_DOMAIN_HYPERV_VENDOR_ID at all.

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

Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
(cherry picked from commit ae102b5d7bccd29bc6015a3e0acefeaa90d097ac)

8 years agovz: fix typo that breaks build
Nikolay Shirokovskiy [Tue, 4 Apr 2017 10:02:21 +0000 (13:02 +0300)] 
vz: fix typo that breaks build

(cherry picked from commit 609cc5a8807f321f5805ca41fc16b56637e2bc66)
Signed-off-by: Martin Kletzander <mkletzan@redhat.com>
8 years agoRelease of libvirt-3.2.0 v3.2.0
Daniel Veillard [Sun, 2 Apr 2017 14:59:37 +0000 (16:59 +0200)] 
Release of libvirt-3.2.0

* docs/news.xml: update for release
* po/*.po*: regenerated

8 years agodocs: bhyve: fix typo
Roman Bogorodskiy [Sat, 1 Apr 2017 14:27:29 +0000 (18:27 +0400)] 
docs: bhyve: fix typo

USB tables -> USB tablet.

8 years agohyperv: fixed typo in function name
Dawid Zamirski [Thu, 30 Mar 2017 16:47:18 +0000 (12:47 -0400)] 
hyperv: fixed typo in function name

that is: s/hyperyVerifyResponse/hypervVerifyResponse/

8 years agoDocument virDomainAbortJob behavior for post-copy migration
Jiri Denemark [Fri, 31 Mar 2017 18:41:39 +0000 (20:41 +0200)] 
Document virDomainAbortJob behavior for post-copy migration

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

Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
8 years agoadmin: Throw a system error when 'open' fails on user-provided output
Erik Skultety [Fri, 31 Mar 2017 08:05:08 +0000 (10:05 +0200)] 
admin: Throw a system error when 'open' fails on user-provided output

There was an unhandled 'open' call which resulted in:

"error: Library function returned error but did not set virError"

Even if this happens during the daemon's start when we still don't have
any set of outputs defined yet, we can safely report an error, since we
automatically fallback to stderr which is fine even for both
running as a daemonized process, since this happens before the daemon
forks into the background, and running as a systemd service, since
systemd re-directs std outputs to journald by default.

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

Signed-off-by: Erik Skultety <eskultet@redhat.com>
8 years agonews: Add template for a <release> section
Peter Krempa [Fri, 31 Mar 2017 07:48:42 +0000 (09:48 +0200)] 
news: Add template for a <release> section

After the release it's necessary to add a new <release> section for the
upcoming release. Add a template so that it does not have to be
compiled over and over again.

8 years agoqemuDomainSnapshotPrepare: Don't always assume vm->def->os.loader
Michal Privoznik [Thu, 30 Mar 2017 12:03:45 +0000 (14:03 +0200)] 
qemuDomainSnapshotPrepare: Don't always assume vm->def->os.loader

In 9e2465834 a check that denies internal snapshots when pflash
based loader is configured for the domain. However, if there's
none and an user tries to do an internal snapshot they will
witness daemon crash as in that case vm->def->os.loader is NULL
and we dereference it unconditionally.

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
8 years agoqemu: Check non-migratable host CPU features v3.2.0-rc2
Jiri Denemark [Wed, 29 Mar 2017 09:00:32 +0000 (11:00 +0200)] 
qemu: Check non-migratable host CPU features

CPU features which change their value from disabled to enabled between
two calls to query-cpu-model-expansion (the first with no extra
properties set and the second with 'migratable' property set to false)
can be marked as enabled and non-migratable in qemuMonitorCPUModelInfo.

Since the code consuming qemuMonitorCPUModelInfo currently ignores the
migratable flag, this change is effectively changing the CPU model
advertised in domain capabilities to contain all features (even those
which block migration). And this matches what we do for QEMU older than
2.9.0, when we detect all CPUID bits ourselves without asking QEMU.

As a result of this change

    <cpu mode='host-model'>
      <feature name='invtsc' policy='require'/>
    </cpu>

will work with all QEMU versions. Such CPU definition would be forbidden
with QEMU >= 2.9.0 without this patch.

Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
8 years agoqemu: Check migratable host CPU features
Jiri Denemark [Wed, 29 Mar 2017 08:58:41 +0000 (10:58 +0200)] 
qemu: Check migratable host CPU features

If calling query-cpu-model-expansion on the 'host'/'max' CPU model with
'migratable' property set to false succeeds, we know QEMU is able to
tell us which features would disable migration. Thus we can mark all
enabled features as migratable.

Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
8 years agoqemuMonitorCPUModelInfo: Add support for non-migratable features
Jiri Denemark [Wed, 29 Mar 2017 08:33:08 +0000 (10:33 +0200)] 
qemuMonitorCPUModelInfo: Add support for non-migratable features

QEMU is able to tell us whether a CPU feature would block migration or
not. This patch adds support for storing such features in
qemuMonitorCPUModelInfo.

Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
8 years agodocs: document bhyve UEFI support
Roman Bogorodskiy [Mon, 20 Mar 2017 13:53:18 +0000 (17:53 +0400)] 
docs: document bhyve UEFI support

 - Add a news entry
 - Update the driver page with documentation of the new options
   and some examples

8 years agoqemu: domain: Properly lookup top of chain in qemuDomainGetStorageSourceByDevstr
Peter Krempa [Wed, 29 Mar 2017 14:56:05 +0000 (16:56 +0200)] 
qemu: domain: Properly lookup top of chain in qemuDomainGetStorageSourceByDevstr

When idx is 0 virStorageFileChainLookup returns the base (bottom) of the
backing chain rather than the top. This is expected by the callers of
qemuDomainGetStorageSourceByDevstr.

Add a special case for idx == 0

8 years agoconf: do not steal pointers from the pool source
Ján Tomko [Tue, 28 Mar 2017 13:11:52 +0000 (15:11 +0200)] 
conf: do not steal pointers from the pool source

Since commit fcbbb28 we steal the pointer to the storage pool
source name if there was no pool name specified.

Properly duplicate the string to avoid freeing it twice.

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

8 years agoschema: do not require name for certain pool types
Ján Tomko [Tue, 28 Mar 2017 13:07:50 +0000 (15:07 +0200)] 
schema: do not require name for certain pool types

Pool types that have the VIR_STORAGE_POOL_SOURCE_NAME flag set
allow omitting the <name> element and instead fill out the pool name
from the <source><name> element.

Relax the schema to make <name> optional for these pools.
Expressing that at least one of these is required is out of scope
of the schema.

8 years agoqemuDomainGetStats: Copy domain ID too
Michal Privoznik [Tue, 28 Mar 2017 13:47:42 +0000 (15:47 +0200)] 
qemuDomainGetStats: Copy domain ID too

One of the problems with our virGetDomain function is that it
copies just domain name and domain UUID. Therefore it's very
easy to forget aboud domain ID. This can cause some bugs, like
virConnectGetAllDomainStats not reporting proper domain IDs.

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
8 years agonetwork: Don't crash on domain destroy
Michal Privoznik [Wed, 22 Mar 2017 12:07:14 +0000 (13:07 +0100)] 
network: Don't crash on domain destroy

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

Imagine the following scenario:

1) virsh net-start default
2) virsh start myFavouriteDomain
3) virsh net-destroy default
4) virsh destroy myFavouriteDomain

(assuming myFavouriteDomain has an interface from default
network)

Regardless of how unlikely this scenario looks like, we should
not crash. The problem is, on net-destroy in
networkShutdownNetworkVirtual() the virMacMap module is unrefed,
but the stale pointer is kept around. Thus when the domain
destroy procedure comes in, networkReleaseActualDevice() and
subsequently networkMacMgrDel() is called. This function sees the
stale pointer and starts calling the virMacMap module APIs which
work over freed memory.

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
8 years agonews: Update after recent commits
Peter Krempa [Mon, 27 Mar 2017 15:35:34 +0000 (17:35 +0200)] 
news: Update after recent commits

Mention the hyperv notifier and the new API to set block thresholds.

8 years agostorage: Better describe logical pool creation/definition parameters
John Ferlan [Sat, 25 Mar 2017 12:07:36 +0000 (08:07 -0400)] 
storage: Better describe logical pool creation/definition parameters

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

Clean up the virsh man page description for --pool-create-as in order
to better describe how the various arguments are used when creating
(or defining) a logical pool.

Signed-off-by: Ján Tomko <jtomko@redhat.com>
8 years agoRevert "storage: Better describe logical pool creation/definition parameters"
Ján Tomko [Tue, 28 Mar 2017 07:45:10 +0000 (09:45 +0200)] 
Revert "storage: Better describe logical pool creation/definition parameters"

This reverts commit ca4515d2639057020c749470f390fe1f5981e91e
which also included a functional change that broke logical storage pools
not named after their volume groups.

8 years agostorage: Fix build on i686
Jiri Denemark [Tue, 28 Mar 2017 10:48:31 +0000 (12:48 +0200)] 
storage: Fix build on i686

off_t is signed and it's size is the same as long only on 64b archs.
Thus it cannot be formatted as %lu.

Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
8 years agodocs: Improve documentation related to memory locking
Andrea Bolognani [Thu, 23 Mar 2017 17:22:15 +0000 (18:22 +0100)] 
docs: Improve documentation related to memory locking

8 years agotests: Introduce QEMU memory locking limit tests
Andrea Bolognani [Thu, 23 Mar 2017 13:06:57 +0000 (14:06 +0100)] 
tests: Introduce QEMU memory locking limit tests

These tests cover a number of scenarios where we care about
the memory locking limit being set correctly for the guest
to work properly.

8 years agotests: Introduce virTestCompareToULL()
Andrea Bolognani [Thu, 23 Mar 2017 13:29:43 +0000 (14:29 +0100)] 
tests: Introduce virTestCompareToULL()

This will be used later on in the test suite.

8 years agoprocess: Translate "unlimited" correctly
Andrea Bolognani [Wed, 22 Mar 2017 12:44:45 +0000 (13:44 +0100)] 
process: Translate "unlimited" correctly

The value we use internally to represent the lack of a memory
locking limit, VIR_DOMAIN_MEMORY_PARAM_UNLIMITED, doesn't
match the value setrlimit() and prlimit() use for the same
purpose, RLIM_INFINITY, so we have to handle the translation
ourselves.

Partially-resolves: https://bugzilla.redhat.com/1431793

8 years agoqemu: Fix memory locking limit calculation
Andrea Bolognani [Wed, 22 Mar 2017 12:44:13 +0000 (13:44 +0100)] 
qemu: Fix memory locking limit calculation

For guests that use <memoryBacking><locked>, our only option
is to remove the memory locking limit altogether.

Partially-resolves: https://bugzilla.redhat.com/1431793

8 years agoqemu: Remove qemuDomainRequiresMemLock()
Andrea Bolognani [Tue, 21 Mar 2017 18:52:50 +0000 (19:52 +0100)] 
qemu: Remove qemuDomainRequiresMemLock()

Instead of having a separate function, we can simply return
zero from the existing qemuDomainGetMemLockLimitBytes() to
signal the caller that the memory locking limit doesn't need
to be set for the guest.

Having a single function instead of two makes it less likely
that we will use the wrong value, which is exactly what
happened when we started applying the limit that was meant
for VFIO-using guests to <memoryBacking><locked>-using
guests.

8 years agoRevert "qemu: Forbid <memoryBacking><locked> without <memtune><hard_limit>"
Andrea Bolognani [Thu, 16 Mar 2017 17:23:56 +0000 (18:23 +0100)] 
Revert "qemu: Forbid <memoryBacking><locked> without <memtune><hard_limit>"

This reverts commit c2e60ad0e5124482942164e5fec088157f5e716a.

Turns out this check is excessively strict: there are ways
other than <memtune><hard_limit> to raise the memory locking
limit for QEMU processes, one prominent example being
tweaking /etc/security/limits.conf.

Partially-resolves: https://bugzilla.redhat.com/1431793

8 years agonews: Fix typo in element name
Jiri Denemark [Tue, 28 Mar 2017 08:12:22 +0000 (10:12 +0200)] 
news: Fix typo in element name

Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
8 years agonews: Move recent bug fixes into 3.2.0 release v3.2.0-rc1
Jiri Denemark [Mon, 27 Mar 2017 20:50:30 +0000 (22:50 +0200)] 
news: Move recent bug fixes into 3.2.0 release

Commits 29f7b5ea6a and 5edf9aaf54 pushed them incorrectly at the end of
the file in the bug fixes section for libvirt 2.5.0.

Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
8 years agonews: Make changes understandable for users
Martin Kletzander [Mon, 27 Mar 2017 20:25:39 +0000 (22:25 +0200)] 
news: Make changes understandable for users

When reading release notes, patch summary is not always the best
description of what users can expect in new version.  I propose
changing it slightly so that it describes what exactly happens and
when.

However, we do not have to add every single code change to the news
file, that would be ridiculous and unreadable for users.  If the patch
subject needs changes like this one, I'm rather tempted to say that
such changes should not be in the news file at all.  So that would be
the other way how to fix this.

Signed-off-by: Martin Kletzander <mkletzan@redhat.com>
8 years agoBuild vircaps2xmltest and requirements only on Linux
Martin Kletzander [Mon, 27 Mar 2017 20:08:45 +0000 (22:08 +0200)] 
Build vircaps2xmltest and requirements only on Linux

The mock, as well as the test, is only available on Linux.  So skip
building it everywhere else, especially when it fails on mingw.

Signed-off-by: Martin Kletzander <mkletzan@redhat.com>
8 years agoUse stub for virNetDevGetName on mingw
Martin Kletzander [Mon, 27 Mar 2017 19:49:06 +0000 (21:49 +0200)] 
Use stub for virNetDevGetName on mingw

If if_indextoname is not defined, the whole function using it should
not be defined either.  Add stub to fix build on mingw.

Caused by 5dd607059d8a98e04024305ae4afbd038aadbdcd

Signed-off-by: Martin Kletzander <mkletzan@redhat.com>
8 years agoqemu: Free persistent def inside qemuMigrationCookieFree
Jiri Denemark [Tue, 21 Mar 2017 10:04:16 +0000 (11:04 +0100)] 
qemu: Free persistent def inside qemuMigrationCookieFree

Creating a copy of the definition we want to add in a migration cookie
makes the code cleaner and less prone to memory leaks or double free
errors.

Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
8 years agoqemu: Typedef migration cookie enums
Jiri Denemark [Tue, 21 Mar 2017 09:36:53 +0000 (10:36 +0100)] 
qemu: Typedef migration cookie enums

Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
8 years agoqemu: Fix formatting in qemu_migration_cookie.c
Jiri Denemark [Tue, 21 Mar 2017 11:47:19 +0000 (12:47 +0100)] 
qemu: Fix formatting in qemu_migration_cookie.c

Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
8 years agoqemu: Move migration cookies to a separate file
Jiri Denemark [Mon, 27 Mar 2017 18:50:44 +0000 (20:50 +0200)] 
qemu: Move migration cookies to a separate file

Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
8 years agonews: Add support for setting TSC frequency
Jiri Denemark [Mon, 27 Mar 2017 18:31:10 +0000 (20:31 +0200)] 
news: Add support for setting TSC frequency

Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
8 years agodocs: Add news article for logical pool-create-as
John Ferlan [Mon, 27 Mar 2017 17:18:49 +0000 (13:18 -0400)] 
docs: Add news article for logical pool-create-as

8 years agostorage: Better describe logical pool creation/definition parameters
John Ferlan [Sat, 25 Mar 2017 12:07:36 +0000 (08:07 -0400)] 
storage: Better describe logical pool creation/definition parameters

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

Clean up the virsh man page description for --pool-create-as in order
to better describe how the various arguments are used when creating
(or defining) a logical pool.

Also modify the storage pool XML parsing algorithm to check for the
mismatched "name" and "source-name".

8 years agovirsh.pod: Move the positional --print-xml for pool-{define|create}-as
John Ferlan [Mon, 27 Mar 2017 17:14:55 +0000 (13:14 -0400)] 
virsh.pod: Move the positional --print-xml for pool-{define|create}-as

Move the --print-xml to the end of the qualifiers since it's not
properly positionally situated for both --pool-create-as and --pool-define-as
and could be miscontrued as being the 3rd positional argument.

8 years agoconf: Set defaultFormat if no storage source XML present
John Ferlan [Mon, 27 Mar 2017 17:01:56 +0000 (13:01 -0400)] 
conf: Set defaultFormat if no storage source XML present

While parsing if the storage source is not present, then a defaultFormat
was not set. This could lead to oddities such as seeing "unknown" format
in output for the "logical" pool even though the only format the pool could
support would be "lvm2".

This does "put a label" on other pool defaults as follows:

   File System: FS_AUTO
   Network File System: NETFS_AUTO
   Disk: UNKNOWN

Each of which is the "0" value for their respective pools and thus
would be no "real" change.

8 years agoqemu: Allow migration with invtsc if tsc frequency is set
Jiri Denemark [Fri, 24 Mar 2017 08:27:26 +0000 (09:27 +0100)] 
qemu: Allow migration with invtsc if tsc frequency is set

Migration with invtsc is allowed by QEMU as long as TSC frequency is
explicitly specified.

Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
8 years agoqemu: Use virCPUCheckFeature in qemuMigrationIsAllowed
Jiri Denemark [Fri, 24 Mar 2017 08:27:16 +0000 (09:27 +0100)] 
qemu: Use virCPUCheckFeature in qemuMigrationIsAllowed

Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
8 years agoqemu: Add support for setting TSC frequency
Jiri Denemark [Thu, 23 Mar 2017 14:54:38 +0000 (15:54 +0100)] 
qemu: Add support for setting TSC frequency

QEMU allows for TSC frequency to be explicitly set to enable migration
with invtsc (migration fails if the destination QEMU cannot set the
exact same frequency used when starting the domain on the source host).

Libvirt already supports setting the TSC frequency in the XML using

    <clock>
      <timer name='tsc' frequency='1234567890'/>
    </clock>

which will be transformed into

    -cpu Model,tsc-frequency=1234567890

QEMU command line.

Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
8 years agoconf: Fix XML parser for timer frequency
Jiri Denemark [Thu, 23 Mar 2017 14:53:50 +0000 (15:53 +0100)] 
conf: Fix XML parser for timer frequency

The frequency is documented and formatted as an attribute of the <timer>
element rather than a nested <frequency> element expected by the parser.
Luckily enough, timer frequency has not been used by any driver so far.
And users were not able to set it in the XML either.

Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
8 years agovirmdev: fix build on non-Linux
Roman Bogorodskiy [Mon, 27 Mar 2017 15:38:33 +0000 (19:38 +0400)] 
virmdev: fix build on non-Linux

 - Make virMediatedDeviceNew() stub args match its prototype
 - Fix typo: virRerportError -> virReportError
 - Move MDEV_SYSFS_DEVICES definition out of the #ifdef __linux__ block
   so we don't have to stub virMediatedDeviceGetSysfsPath()

8 years agonetdev: fix build on non-Linux
Roman Bogorodskiy [Mon, 27 Mar 2017 15:25:16 +0000 (19:25 +0400)] 
netdev: fix build on non-Linux

Fix typo: virNetDevVLanPtr -> virNetDevVlanPtr.

8 years agoutil: Fix build on FreeBSD
Jiri Denemark [Mon, 27 Mar 2017 17:43:31 +0000 (19:43 +0200)] 
util: Fix build on FreeBSD

Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
8 years agonews: Add logical overwrite
John Ferlan [Mon, 27 Mar 2017 16:52:32 +0000 (12:52 -0400)] 
news: Add logical overwrite

8 years agological: Need to overwrite/clear more than just first 512 bytes
John Ferlan [Fri, 24 Mar 2017 16:25:27 +0000 (12:25 -0400)] 
logical: Need to overwrite/clear more than just first 512 bytes

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

As it turns out some file headers (e.g. ext4) may be larger/longer than
the 512 bytes of zeros being written prior to a pvcreate, so let's write
out 2048 bytes similar to how the pvcreate sources would peek at the first
4 sectors of the device.

Make sure there is at enough bytes on the device to clear before doing
doing the clear - just to be sure.

8 years agoutil: Remove NONNULL from virHostdevReAttachMediatedDevices
John Ferlan [Mon, 27 Mar 2017 15:25:20 +0000 (11:25 -0400)] 
util: Remove NONNULL from virHostdevReAttachMediatedDevices

Causes build failure when enabling static analysis

8 years agonews: Add <change> lost in merge
John Ferlan [Mon, 27 Mar 2017 15:20:58 +0000 (11:20 -0400)] 
news: Add <change> lost in merge

Ensure to insert </change> <change> between items - lost during merge
resolution.

8 years agonetwork: better validation of devices in hostdev network pool
Laine Stump [Sat, 25 Mar 2017 18:00:13 +0000 (14:00 -0400)] 
network: better validation of devices in hostdev network pool

This adds a few validations to the devices listed for a hostdev network:

* devices must be listed by PCI address, not by netdev name

* listing a device by PCI address is valid only for hostdev networks, not
  for other types of network (e.g. macvtap passthrough).

* each device in a hostdev pool must be an SR-IOV VF

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

8 years agoExpose Linux symbols only on Linux
Martin Kletzander [Mon, 27 Mar 2017 15:11:49 +0000 (17:11 +0200)] 
Expose Linux symbols only on Linux

Signed-off-by: Martin Kletzander <mkletzan@redhat.com>
8 years agovirhostcpu: Make only defined symbols available
Martin Kletzander [Mon, 27 Mar 2017 14:15:45 +0000 (16:15 +0200)] 
virhostcpu: Make only defined symbols available

That way you get the error from the compiler before the linker.

Signed-off-by: Martin Kletzander <mkletzan@redhat.com>
8 years agovirhostcpu: Expose virHostCPUGetOnline on non-Linux
Martin Kletzander [Mon, 27 Mar 2017 14:16:43 +0000 (16:16 +0200)] 
virhostcpu: Expose virHostCPUGetOnline on non-Linux

Previously, this function must've been called only on Linux in order
to fail gracefully.  That lead to #ifdef mess in callers, so the
function was redesigned so it failed gracefully on non-existing
files.  However that commit forgot to define the function outside the
__linux__ ifdef, it broke non-Linux builds.

Caused by c67e04e25fa58104e0fae41f5b874a8067557073.

Signed-off-by: Martin Kletzander <mkletzan@redhat.com>
8 years agotests: Properly dereference cpus pointer in virnumamock.c
Martin Kletzander [Mon, 27 Mar 2017 13:47:58 +0000 (15:47 +0200)] 
tests: Properly dereference cpus pointer in virnumamock.c

Signed-off-by: Martin Kletzander <mkletzan@redhat.com>
8 years agovirsh: reject more negative numbers
Ján Tomko [Mon, 27 Mar 2017 12:17:42 +0000 (14:17 +0200)] 
virsh: reject more negative numbers

Be more positive and reject negative numbers where we don't
allow them by using the virStrToLong variants with 'p'.

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

8 years agostorage: reject negative capacity
Ján Tomko [Mon, 27 Mar 2017 12:33:16 +0000 (14:33 +0200)] 
storage: reject negative capacity

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

8 years agobuild: Fix syntax check in VPATH
Jiri Denemark [Mon, 27 Mar 2017 14:48:19 +0000 (16:48 +0200)] 
build: Fix syntax check in VPATH

Matching the beginning of a path in syntax check does not work because
each path is enriched with a prefix of the source tree.

Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
8 years agobuild: Fix sc_prohibit_exit_in_tests syntax check
Jiri Denemark [Mon, 27 Mar 2017 14:46:12 +0000 (16:46 +0200)] 
build: Fix sc_prohibit_exit_in_tests syntax check

This check makes sense only in *.c files.

Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
8 years agocputest: Add tests for virCPUUpdateLive API
Jiri Denemark [Thu, 16 Mar 2017 11:26:30 +0000 (12:26 +0100)] 
cputest: Add tests for virCPUUpdateLive API

The test takes

  x86-cpuid-Something-guest.xml CPU (the CPU libvirt would use for
    host-model on a CPU described by x86_64-cpuid-Something.xml without
    talking to QEMU about what it supports on the host)

and updates it according to CPUID data from QEMU:

  x86_64-cpuid-Something-enabled.xml (reported as "feature-words"
    property of the CPU device)

and

  x86_64-cpuid-Something-disabled.xml (reported as "filtered-features"
    property of the CPU device).

The result is compared to

  x86_64-cpuid-Something-json.xml (the CPU libvirt would use as
    host-model based on the reply from query-cpu-model-expansion).

The comparison is a bit tricky because the *-json.xml CPU contains fewer
disabled features. Only the features which are included in the base CPU
model, but listed as disabled in *.json will be disabled in *-json.xml.
The CPU computed by virCPUUpdateLive from the test data will list all
features present in the host's CPUID data and not enabled in *.json as
disabled. The cpuTestUpdateLiveCompare function checks that the computed
and expected sets of enabled features match.

Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
8 years agocputest: Disable "cmt" feature unknown to QEMU
Jiri Denemark [Fri, 17 Mar 2017 10:46:19 +0000 (11:46 +0100)] 
cputest: Disable "cmt" feature unknown to QEMU

All CPU features which QEMU does not know about but libvirt knows them
(currently "cmt" is the only one) are implicitly disabled by QEMU and
should be present in x86_64-cpuid-*-disabled.xml.

Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
8 years agocputest: Disable TSX on broken models
Jiri Denemark [Fri, 17 Mar 2017 10:29:02 +0000 (11:29 +0100)] 
cputest: Disable TSX on broken models

Commit v3.1.0-26-gd60012b4e started filtering hle and rtm features from
broken Intel Haswell CPUs. QEMU implemented similar functionality and
thus it doesn't report rtm and hle features as enabled for Core i5-4670T
CPU anymore.

Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
8 years agocputest: Generate data for virCPUUpdateLive
Jiri Denemark [Thu, 16 Mar 2017 11:26:05 +0000 (12:26 +0100)] 
cputest: Generate data for virCPUUpdateLive

Generated with

    (cd tests/cputestdata; ./cpu-cpuid.py diff x86_64-cpuid-*.json)

Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
8 years agocputest: Add "diff" command to cpu-cpuid.py
Jiri Denemark [Thu, 16 Mar 2017 11:25:30 +0000 (12:25 +0100)] 
cputest: Add "diff" command to cpu-cpuid.py

The new command can be used to generate test data for virCPUUpdateLive.

When "cpu-cpuid.py diff x86-cpuid-Something.json" is run, it reads raw
CPUID data stored in x86-cpuid-Something.xml and CPUID data from QEMU
stored in x86-cpuid-Something.json to produce two more CPUID files:
x86-cpuid-Something-enabled.xml and x86-cpuid-Something-disabled.xml.

- x86-cpuid-Something-enabled.xml will contain CPUID bits present in
    x86-cpuid-Something.json (i.e., enabled by QEMU for the "host" CPU)

- x86-cpuid-Something-disabled.xml will contain all CPUID bits from
    x86-cpuid-Something.xml which are not present in
    x86-cpuid-Something.json (i.e., CPUID bits which the host CPU
    supports, but QEMU does not enable them for the "host" CPU)

Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
8 years agocputest: Add cpuidLeaf helper to cpu-cpuid.py
Jiri Denemark [Wed, 15 Mar 2017 13:29:30 +0000 (14:29 +0100)] 
cputest: Add cpuidLeaf helper to cpu-cpuid.py

Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
8 years agocputest: Add cpuidIsSet helper to cpu-cpuid.py
Jiri Denemark [Wed, 15 Mar 2017 13:21:48 +0000 (14:21 +0100)] 
cputest: Add cpuidIsSet helper to cpu-cpuid.py

Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
8 years agocputest: Rename cpu-convert.py script as cpu-cpuid.py
Jiri Denemark [Wed, 15 Mar 2017 12:16:37 +0000 (13:16 +0100)] 
cputest: Rename cpu-convert.py script as cpu-cpuid.py

The new script is going to be more general and the original
functionality can be requested by "cpu-cpuid.py convert".

Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
8 years agocputest: Move instantiation of JSONDecoder in cpu-convert.py
Jiri Denemark [Wed, 15 Mar 2017 12:09:21 +0000 (13:09 +0100)] 
cputest: Move instantiation of JSONDecoder in cpu-convert.py

Let's make the object local to the parseFeatureWords function which uses
it.

Signed-off-by: Jiri Denemark <jdenemar@redhat.com>