]> xenbits.xensource.com Git - libvirt.git/log
libvirt.git
7 years agovirTestCompareToFile: Don't access memory we don't own
Michal Privoznik [Fri, 4 Aug 2017 13:22:53 +0000 (15:22 +0200)]
virTestCompareToFile: Don't access memory we don't own

After reading the contents of a file some cleanup is performed.
However, the check for it might access a byte outside of the
string - if the file is empty in the first place. Then strlen()
is zero.

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
7 years agoqemuDomainObjPrivateFree: Free @machineName
Michal Privoznik [Fri, 4 Aug 2017 13:17:39 +0000 (15:17 +0200)]
qemuDomainObjPrivateFree: Free @machineName

We're storing the machine name in @priv but free it just in
qemuProcessStop, Therefore this may leak.

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
7 years agovirNodeDevCapCCWParseXML: Free temporary variables
Michal Privoznik [Fri, 4 Aug 2017 13:11:59 +0000 (15:11 +0200)]
virNodeDevCapCCWParseXML: Free temporary variables

Again, we are using @cssid, @ssid and @devno to store some
temporary strings, but never free it.

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
7 years agovirDomainDefParseXML: Free @tmp
Michal Privoznik [Fri, 4 Aug 2017 13:10:08 +0000 (15:10 +0200)]
virDomainDefParseXML: Free @tmp

When parsing <ioapic> feature we're using @tmp to store some
temporary string but never free it.

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
7 years agovirDomainDefFree: Don't leak initenv name and value
Michal Privoznik [Fri, 4 Aug 2017 13:06:39 +0000 (15:06 +0200)]
virDomainDefFree: Don't leak initenv name and value

When parsing boot options from domain XML in
virDomainDefParseBootOptions() initenv id stored to:

    def->os.initenv[i]->name
    def->os.initenv[i]->value

But these are never freed.

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
7 years agotools: make wireshark build quiet
Daniel P. Berrange [Fri, 4 Aug 2017 17:12:13 +0000 (18:12 +0100)]
tools: make wireshark build quiet

Use $(AM_V_GEN) when running wireshark related tools

Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
7 years agodocs: bhyve: document autoport support
Roman Bogorodskiy [Sun, 30 Jul 2017 10:01:03 +0000 (14:01 +0400)]
docs: bhyve: document autoport support

 - Update the driver page with the information about using
   autport for VNC ports
 - Add a news entry

Signed-off-by: Roman Bogorodskiy <bogorodskiy@gmail.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
7 years agobhyve: Add support for VNC autoport
Alexander Nusov [Mon, 8 May 2017 10:36:43 +0000 (13:36 +0300)]
bhyve: Add support for VNC autoport

This patch adds support for automatic VNC port assignment for bhyve guests.

Signed-off-by: Roman Bogorodskiy <bogorodskiy@gmail.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
7 years agolibxl: Add a test suite for libxl_domain_config generator
Jim Fehlig [Tue, 1 Aug 2017 13:17:51 +0000 (15:17 +0200)]
libxl: Add a test suite for libxl_domain_config generator

The libxl library allows a libxl_domain_config object to be serialized
from/to a JSON string. Use this to allow testing of the XML to
libxl_domain_config conversion process. Test XML is converted to
libxl_domain_config, which is then serialized to json. A json template
corresponding to the test XML is converted to a libxl_domain_config
object using libxl_domain_config_from_json(), and then serialized
back to json using libxl_domain_config_to_json(). The two json
docs are then compared.

Using libxl to convert the json template to a libxl_domain_config
object and then back to json provides a simple way to account for
any changes or additions to the json representation across Xen
releases.

Signed-off-by: Jim Fehlig <jfehlig@suse.com>
[update to v3.5.0-rc1, improve error reporting, use /bin/true emulator]
Signed-off-by: Marek Marczykowski-Górecki <marmarek@invisiblethingslab.com>
7 years agoremote: increase max storage pools, nwfilters & snapshots to 16384
Daniel P. Berrange [Thu, 11 May 2017 10:34:21 +0000 (11:34 +0100)]
remote: increase max storage pools, nwfilters & snapshots to 16384

Most other top level objects have already had their limits increased
to 16384. Increase the storage pool, nwfilter & snapshot object
limits to match. For snapshots at least, we have seen hosts which
exceeded the current limit

Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
7 years agorpm: conditionalize dep on perl for perl-interpretor split in F27
Daniel P. Berrange [Wed, 2 Aug 2017 09:51:36 +0000 (10:51 +0100)]
rpm: conditionalize dep on perl for perl-interpretor split in F27

Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
7 years agocpu: define sub-leaf 0 for leaf 7 in cpu_map.xml
Marek Marczykowski-Górecki [Tue, 4 Jul 2017 03:03:44 +0000 (05:03 +0200)]
cpu: define sub-leaf 0 for leaf 7 in cpu_map.xml

CPUID leaf 7 is sub-leaf aware. Add missing attribute.

Signed-off-by: Marek Marczykowski-Górecki <marmarek@invisiblethingslab.com>
Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
7 years agoqemu: command: explicitly error for non-x86 default CPU
Cole Robinson [Thu, 13 Jul 2017 19:15:38 +0000 (15:15 -0400)]
qemu: command: explicitly error for non-x86 default CPU

The code only currently handles writing an x86 default -cpu
argument, and doesn't know anything about other architectures.
Let's make this explicit rather than leaving ex. qemu ppc64 to
throw an error about -cpu qemu64

Reviewed-by: Ján Tomko <jtomko@redhat.com>
Signed-off-by: Cole Robinson <crobinso@redhat.com>
7 years agoqemu: command: rework adding of default cpu model
Cole Robinson [Thu, 13 Jul 2017 14:39:13 +0000 (10:39 -0400)]
qemu: command: rework adding of default cpu model

Certain XML features that aren't in the <cpu> block map to -cpu
flags on the qemu cli. If one of these is specified but the user
didn't explicitly pass an XML <cpu> model, we need to format a
default model on the command line.

The current code handles this by sprinkling this default cpu handling
among all the different flag string formatting. Instead, switch it
to do this just once.

This alters some test output slightly: the previous code would
write the default -cpu in some cases when no flags were actually
added, so the output was redundant.

Reviewed-by: Ján Tomko <jtomko@redhat.com>
Signed-off-by: Cole Robinson <crobinso@redhat.com>
7 years agoconf: fix formatting of smartcard devices
Ján Tomko [Thu, 3 Aug 2017 12:26:47 +0000 (14:26 +0200)]
conf: fix formatting of smartcard devices

My commit 0c1d863 broke formatting of passthrough smartcard devices:
<smartcard mode='passthrough' type='spicevmc'/>

resulted in invalid XML:
    <smartcard mode='passthrough'>
       type='spicevmc'>
      <address type='ccid' controller='0' slot='0'/>
    </smartcard>

Split out chardev source formatting function into two -
one formatting the attributes and other formatting the subelements.

Reported-by: Cole Robinson <crobinso@redhat.com>
Reviewed-by: John Ferlan <jferlan@redhat.com>
7 years agotests: deterministichash: Make hash tables arch-independent
Peter Krempa [Wed, 2 Aug 2017 15:23:51 +0000 (17:23 +0200)]
tests: deterministichash: Make hash tables arch-independent

It turns out that our implementation of the hashing function is
endian-dependent and thus if used on various architectures the testsuite
may have different results. Work this around by mocking virHashCodeGen
to something which does not use bit operations instead of just setting a
deterministic seed.

7 years agoutil: hash: Make virHashCodeGen mockable
Peter Krempa [Wed, 2 Aug 2017 15:31:14 +0000 (17:31 +0200)]
util: hash: Make virHashCodeGen mockable

Export the function from the util module so that dynamic linking can
override it.

7 years agoutil: hash: Include stdbool.h in the header file
Peter Krempa [Wed, 2 Aug 2017 15:28:55 +0000 (17:28 +0200)]
util: hash: Include stdbool.h in the header file

The functions declared in virhash.h return bool, but stdbool.h was not
included.

7 years agoqemu: command: align disk serial check to schema
Nikolay Shirokovskiy [Tue, 28 Mar 2017 08:10:53 +0000 (11:10 +0300)]
qemu: command: align disk serial check to schema

Disk serial schema has extra '.+' allowed characters in comparison
with check in code. Looks like there is no reason for that as qemu
allows any character AFAIK for serial. This discrepancy is originated
in commit id '85d15b51' where the ability to add serial was added.

Alter the disk-serial test to add a disk with all the possible
characters listed as the serial value.

7 years agoqemu: Check for existence of provided *_tls_x509_cert_dir
John Ferlan [Thu, 29 Jun 2017 12:27:55 +0000 (08:27 -0400)]
qemu: Check for existence of provided *_tls_x509_cert_dir

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

Introduce virQEMUDriverConfigTLSDirResetDefaults in order to check
if the defaultTLSx509certdir was changed, then change the default
for any other *TLSx509certdir that was not set to the default default.

Introduce virQEMUDriverConfigValidate to validate the existence of
any of the *_tls_x509_cert_dir values that were uncommented/set,
incuding the default.

Update the qemu.conf description for default to describe the consequences
if the default directory path does not exist.

Signed-off-by: John Ferlan <jferlan@redhat.com>
7 years agodocs: Fix syntax-check error
John Ferlan [Wed, 2 Aug 2017 18:58:31 +0000 (14:58 -0400)]
docs: Fix syntax-check error

Commit id '94d2d6429' caused a syntax-error check to fail:

docs/Makefile.am:276: $(AM_V_GEN)sed -e '/<span id="php_placeholder"><\/span>/r '"$(srcdir)/$@.code.in" \
maint.mk: Wrap long lines in Makefiles
cfg.mk:721: recipe for target 'sc_prohibit_long_lines' failed
make: *** [sc_prohibit_long_lines] Error 1
make: *** Waiting for unfinished jobs....

Altered the line to put another line wrap between sed and -e

7 years agodocs: Fix syntax-check error
John Ferlan [Wed, 2 Aug 2017 18:57:35 +0000 (14:57 -0400)]
docs: Fix syntax-check error

commit id '40cb5581' caused syntax-check error:

prohibit_empty_lines_at_EOF
docs/manifest.json
maint.mk: empty line(s) or no newline at EOF
maint.mk:929: recipe for target 'sc_prohibit_empty_lines_at_EOF' failed
make: *** [sc_prohibit_empty_lines_at_EOF] Error 1

I just edited the file and replaced the closing } and it made things happy

7 years agodocs: add full set of "favicon" files to support modern clients
Daniel P. Berrange [Wed, 26 Jul 2017 17:22:11 +0000 (18:22 +0100)]
docs: add full set of "favicon" files to support modern clients

Use of the relation "shortcut" for a favicon was an Internet
Explorer only feature. Other browsers just require "icon".

The new icons & metadata are generated using

  https://realfavicongenerator.net/

which is user tested to work well across all modern clients

Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
7 years agodocs: explicitly declare pages as being UTF-8 format
Daniel P. Berrange [Wed, 26 Jul 2017 17:20:26 +0000 (18:20 +0100)]
docs: explicitly declare pages as being UTF-8 format

Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
7 years agodocs: remove bogus 'shape' attribute on links
Daniel P. Berrange [Wed, 26 Jul 2017 17:18:16 +0000 (18:18 +0100)]
docs: remove bogus 'shape' attribute on links

The 'shape' attribute on <a> is used together with a 'coords'
attribute to create hot-zones in image maps. We're not using
image maps so our inclusion of a 'shape' attribute is bogus.
Furthermore this is forbidden in HTML5.

Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
7 years agodocs: generate pretty indented HTML for API docs
Daniel P. Berrange [Wed, 26 Jul 2017 17:12:50 +0000 (18:12 +0100)]
docs: generate pretty indented HTML for API docs

Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
7 years agodocs: switch to using HTML5 doctype declaration
Daniel P. Berrange [Wed, 26 Jul 2017 17:01:25 +0000 (18:01 +0100)]
docs: switch to using HTML5 doctype declaration

The HTML5 doctype is simply

  <!DOCTYPE html>

no DTD is present because HTML5 is no longer defined as an
extension of SGML.

XSL has no way to natively output a doctype without a public
or system identifier, so we have to use an <xsl:text> hack
instead.

See also

  https://dev.w3.org/html5/html-author/#doctype-declaration

Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
7 years agodocs: use UTF-8 instead of HTML entities for decorated letters
Daniel P. Berrange [Wed, 26 Jul 2017 16:56:44 +0000 (17:56 +0100)]
docs: use UTF-8 instead of HTML entities for decorated letters

We have files which use HTML entities for decorating letters
with unlauts, accents, etc. Other files just use UTF-8
characters directly for this. Remove the HTML entities since
they have no benefit and use UTF-8 instead.

Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
7 years agodocs: remove use of &mdash; entity
Daniel P. Berrange [Wed, 26 Jul 2017 16:54:30 +0000 (17:54 +0100)]
docs: remove use of &mdash; entity

A handful of places in the docs choose to use &mdash; instead
of '-' for no clear reason. Remove this inconsistency.

Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
7 years agodocs: remove use of &nbsp; in docs
Daniel P. Berrange [Wed, 26 Jul 2017 16:49:15 +0000 (17:49 +0100)]
docs: remove use of &nbsp; in docs

Some docs pages were using <p>&nbsp;</p> to add arbitrary whitespace
in the page. This is something that should be done by CSS if needed,
but it is not needed here, so delete it.

There was also use of <td>&nbsp;</td> which adds no value at all
when we have CSS to prettify tables.

Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
7 years agodocs: fix typo s/&and;/&amp;/
Daniel P. Berrange [Wed, 26 Jul 2017 16:42:02 +0000 (17:42 +0100)]
docs: fix typo s/&and;/&amp;/

Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
7 years agodocs: make xmllint & xsltproc compulsory
Daniel P. Berrange [Wed, 26 Jul 2017 16:40:44 +0000 (17:40 +0100)]
docs: make xmllint & xsltproc compulsory

We already require libxml to be installed, so it is not unreasonable
to require xmllint and xsltproc to be installed too - any platform
with the former will have the latter too.

Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
7 years agodocs: drop XHTML 1.0 validation of website
Daniel P. Berrange [Wed, 26 Jul 2017 16:13:40 +0000 (17:13 +0100)]
docs: drop XHTML 1.0 validation of website

The HTML pages are currently validated against an XHTML 1.0 DTD.
This makes it impossible to take advantage of features that are
introduced in HTML 5, because they'll fail validation.

There is intentionally no DTD defined for HTML 5, so there's no
alternative to XHTML 1.0 DTD that we could switch to. The only
options are to stick with XHTML 1.0 forever, or drop the DTD
validation, and we pick the latter.

Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
7 years agodocs: switch to using 'id' attribute instead of 'name' for links
Daniel P. Berrange [Wed, 26 Jul 2017 14:52:42 +0000 (15:52 +0100)]
docs: switch to using 'id' attribute instead of 'name' for links

The 'name' attribute on <a...> elements is deprecated in favour
of the 'id' attribute which is allowed on any element. HTML5
drops 'name' support entirely.

Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
7 years agoTurn virDomainDeviceInfoFormat into void
Ján Tomko [Wed, 28 Jun 2017 15:10:59 +0000 (17:10 +0200)]
Turn virDomainDeviceInfoFormat into void

The rombar attribute was already validated at the time of parsing
the XML.

7 years agoconf: check for buffer errors before virBufferUse
Ján Tomko [Tue, 27 Jun 2017 14:33:22 +0000 (16:33 +0200)]
conf: check for buffer errors before virBufferUse

After an OOM error, virBuffer* APIs set buf->use to zero.
Adding a buffer to the parent buffer only if use is non-zero
would quietly drop data on error.

Check the error beforehand to make sure buf->use is zero
because we have not attempted to add anything to it.

7 years agoUse a separate buffer for <hub> subelements
Ján Tomko [Tue, 27 Jun 2017 14:36:24 +0000 (16:36 +0200)]
Use a separate buffer for <hub> subelements

Switch virDomainHubDefFormat to use a separate buffer for subelements.

7 years agoUse a separate buffer for <watchdog> subelements
Ján Tomko [Tue, 27 Jun 2017 14:28:06 +0000 (16:28 +0200)]
Use a separate buffer for <watchdog> subelements

Convert virDomainWatchdogDefFormat to use a separate
buffer for subelements.

7 years agoUse a separate buffer for <sound> subelements
Ján Tomko [Tue, 27 Jun 2017 14:27:18 +0000 (16:27 +0200)]
Use a separate buffer for <sound> subelements

Convert virDomainSoundDefFormat to use a separate buffer
for subelements.

7 years agoUse a separate buffer for <smartcard> subelements
Ján Tomko [Tue, 27 Jun 2017 14:24:11 +0000 (16:24 +0200)]
Use a separate buffer for <smartcard> subelements

Convert virDomainSmartcardDefFormat to use a separate buffer
for possible subelements, to avoid the need for duplicated
formatting logic in virDomainDeviceInfoNeedsFormat.

7 years agovirDomainDeviceInfoFormat: delete outdated comments
Ján Tomko [Tue, 27 Jun 2017 12:14:32 +0000 (14:14 +0200)]
virDomainDeviceInfoFormat: delete outdated comments

This function has grown to format more than just the address.
Delete the comment completely to avoid failing to update it
in the future.

Also, the indentation is now handled by the virBuffer APIs,
so the comment about indentation no longer makes sense.

7 years agoRemove superfluous usage of virDomainDeviceInfoNeedsFormat
Ján Tomko [Tue, 27 Jun 2017 12:04:52 +0000 (14:04 +0200)]
Remove superfluous usage of virDomainDeviceInfoNeedsFormat

This function returns false if virDomainDeviceInfoFormat
would not format anything.

Using it as the sole condition to decide whether to call
virDomainDeviceInfoFormat or not is pointless, since
the conditions are repeated in virDomainDeviceInfoFormat.

7 years agovirCapabilitiesFormatCaches: free cpus_str right after use
Ján Tomko [Wed, 2 Aug 2017 13:38:40 +0000 (15:38 +0200)]
virCapabilitiesFormatCaches: free cpus_str right after use

This will simplify the cleanup when we start checking for
buffer errors.

7 years agoAdd support for virtio-net.tx_queue_size
Michal Privoznik [Wed, 12 Jul 2017 12:19:26 +0000 (14:19 +0200)]
Add support for virtio-net.tx_queue_size

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

Just like I've added support for setting rx_queue_size (in
c56cdf259 and friends), qemu just gained support for setting tx
ring size.

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
7 years agodriver: conditionalize use of dlopen functions & use mingw-dlfcn
Daniel P. Berrange [Wed, 2 Aug 2017 10:21:12 +0000 (11:21 +0100)]
driver: conditionalize use of dlopen functions & use mingw-dlfcn

Not every platform is guaranteed to have dlopen/dlsym, so we should
conditionalize its use. Suprisingly it is actually present for Win32
via the mingw-dlfcn add on, but we should still conditionalize it.

Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
7 years agotools: rename 'socket' to 'sockpath'
Daniel P. Berrange [Wed, 2 Aug 2017 10:51:08 +0000 (11:51 +0100)]
tools: rename 'socket' to 'sockpath'

A variable named 'socket' clashes with the function of the same
name, causing build failures due to warnings on some platforms.

Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
7 years agovirnetworkobj: Make virNetworkObjFindBy{UUID,Name}Locked() static again
Michal Privoznik [Tue, 25 Jul 2017 15:04:11 +0000 (17:04 +0200)]
virnetworkobj: Make virNetworkObjFindBy{UUID,Name}Locked() static again

These functions were made exportable back in 3aa3e072 when I was
splitting network code into parsing and list management parts.
Since then the split is finished now and these two functions do
not need to be exported anymore.

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
7 years agovirConnect: Update comment for @privateData
Michal Privoznik [Thu, 27 Jul 2017 06:43:40 +0000 (08:43 +0200)]
virConnect: Update comment for @privateData

This member allows us to store a pointer to some private data.
However, the comment says it's used in both domain driver and
network driver. Well, it is not. It's just one pointer and domain
driver uses it directly. Network driver has a global driver
variable. Update the comment to not confuse others.

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
7 years agotools: virsh: Adding unix socket support to 'domdisplay' command.
Julio Faracco [Fri, 28 Jul 2017 21:49:35 +0000 (18:49 -0300)]
tools: virsh: Adding unix socket support to 'domdisplay' command.

This commit adds the unix socket URL support to 'domdisplay' command.
Before, even if an user was using unix socket to define a spice graphics,
the command 'domdisplay' showed that the settings were not supported. Now,
the command shows the proper URL: spice+unix://foo/bar.sock.

Settings:
<graphics type='vnc' port='-1' autoport='yes' listen='127.0.0.1'>
  <listen type='address' address='127.0.0.1'/>
</graphics>
<graphics type='spice'>
  <listen type='socket' socket='/tmp/spice.sock'/>
</graphics>

Before:
virsh # domdisplay --all Windows7
vnc://127.0.0.1:0

After:
virsh # domdisplay --all Windows7
vnc://127.0.0.1:0
spice+unix:///tmp/spice.sock

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

Signed-off-by: Julio Faracco <jcfaracco@gmail.com>
7 years agoUpdate news.xml after the post-release
Michal Privoznik [Mon, 31 Jul 2017 08:50:58 +0000 (10:50 +0200)]
Update news.xml after the post-release

In 19581afd778 the configure.ac was updated. However, the
news.xml was missing adjustment - creating the new section for
the release.

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
7 years agoqemu: Split shmem preparation as it's supposed to be
Martin Kletzander [Fri, 21 Jul 2017 11:47:05 +0000 (13:47 +0200)]
qemu: Split shmem preparation as it's supposed to be

Since the introduction of shmem, there was a split of preparation code
from the formatting code from qemuBuildCommandLine() into
qemuProcessPrepareDomain().  Let's fix shmem in this regard, so that
we can slowly get to a cleaner codebase.

Signed-off-by: Martin Kletzander <mkletzan@redhat.com>
7 years agoPost-release version bump to 3.7.0
Martin Kletzander [Wed, 2 Aug 2017 07:27:08 +0000 (09:27 +0200)]
Post-release version bump to 3.7.0

Signed-off-by: Martin Kletzander <mkletzan@redhat.com>
7 years agoRelease of libvirt-3.6.0
Daniel Veillard [Wed, 2 Aug 2017 02:00:22 +0000 (10:00 +0800)]
Release of libvirt-3.6.0

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

7 years agovirNetDaemonCallInhibit: Call virNetDaemonGotInhibitReply properly
Michal Privoznik [Tue, 1 Aug 2017 09:04:22 +0000 (11:04 +0200)]
virNetDaemonCallInhibit: Call virNetDaemonGotInhibitReply properly

So there are couple of issues here. Firstly, we never unref the
@pendingReply and thus it leaks.

==13279== 144 (72 direct, 72 indirect) bytes in 1 blocks are definitely lost in loss record 1,095 of 1,259
==13279==    at 0x4C2E080: calloc (vg_replace_malloc.c:711)
==13279==    by 0x781FA97: _dbus_pending_call_new_unlocked (in /usr/lib64/libdbus-1.so.3.14.11)
==13279==    by 0x7812A4C: dbus_connection_send_with_reply (in /usr/lib64/libdbus-1.so.3.14.11)
==13279==    by 0x56BEDF3: virNetDaemonCallInhibit (virnetdaemon.c:514)
==13279==    by 0x56BEF18: virNetDaemonAddShutdownInhibition (virnetdaemon.c:536)
==13279==    by 0x12473B: daemonInhibitCallback (libvirtd.c:742)
==13279==    by 0x1249BD: daemonRunStateInit (libvirtd.c:823)
==13279==    by 0x554FBCF: virThreadHelper (virthread.c:206)
==13279==    by 0x8F913D3: start_thread (in /lib64/libpthread-2.23.so)
==13279==    by 0x928DE3C: clone (in /lib64/libc-2.23.so)

Secondly, while we send the message, we are suspended ('cos we're
talking to a UNIX socket).  However, until we are resumed back
again the reply might have came therefore subsequent
dbus_pending_call_set_notify() has no effect and in fact the
virNetDaemonGotInhibitReply() callback is never called. Thirdly,
the dbus_connection_send_with_reply() has really stupid policy
for return values. To cite the man page:

  Returns
      FALSE if no memory, TRUE otherwise.

Yes, that's right. If anything goes wrong and it's not case of
OOM then TRUE is returned, i.e. you're trying to pass FDs and
it's not supported, or you're not connected, or anything else.
Therefore, checking for return value of
dbus_connection_send_with_reply() is not enoguh. We also have to
check if @pendingReply is not NULL before proceeding any further.

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
7 years agovirCgroupValidateMachineGroup: Don't free @machinename
Michal Privoznik [Tue, 1 Aug 2017 07:08:31 +0000 (09:08 +0200)]
virCgroupValidateMachineGroup: Don't free @machinename

We are given a string in @machinename, we never allocate it, just
merely use it for reading. We should not free it otherwise it
leads to double free:

==32191== Thread 17:
==32191== Invalid free() / delete / delete[] / realloc()
==32191==    at 0x4C2D1A0: free (vg_replace_malloc.c:530)
==32191==    by 0x54BBB84: virFree (viralloc.c:582)
==32191==    by 0x2BC04499: qemuProcessStop (qemu_process.c:6313)
==32191==    by 0x2BC500FF: processMonitorEOFEvent (qemu_driver.c:4724)
==32191==    by 0x2BC502FC: qemuProcessEventHandler (qemu_driver.c:4769)
==32191==    by 0x5550640: virThreadPoolWorker (virthreadpool.c:167)
==32191==    by 0x554FBCF: virThreadHelper (virthread.c:206)
==32191==    by 0x8F913D3: start_thread (in /lib64/libpthread-2.23.so)
==32191==    by 0x928DE3C: clone (in /lib64/libc-2.23.so)
==32191==  Address 0x31893d70 is 0 bytes inside a block of size 1,100 free'd
==32191==    at 0x4C2D1A0: free (vg_replace_malloc.c:530)
==32191==    by 0x54BBB84: virFree (viralloc.c:582)
==32191==    by 0x54C1936: virCgroupValidateMachineGroup (vircgroup.c:343)
==32191==    by 0x54C4B29: virCgroupNewDetectMachine (vircgroup.c:1550)
==32191==    by 0x2BBDDA29: qemuConnectCgroup (qemu_cgroup.c:972)
==32191==    by 0x2BC05DA7: qemuProcessReconnect (qemu_process.c:6822)
==32191==    by 0x554FBCF: virThreadHelper (virthread.c:206)
==32191==    by 0x8F913D3: start_thread (in /lib64/libpthread-2.23.so)
==32191==    by 0x928DE3C: clone (in /lib64/libc-2.23.so)
==32191==  Block was alloc'd at
==32191==    at 0x4C2BE80: malloc (vg_replace_malloc.c:298)
==32191==    by 0x4C2E35F: realloc (vg_replace_malloc.c:785)
==32191==    by 0x54BB492: virReallocN (viralloc.c:245)
==32191==    by 0x54BEDF2: virBufferGrow (virbuffer.c:150)
==32191==    by 0x54BF3B9: virBufferVasprintf (virbuffer.c:408)
==32191==    by 0x54BF324: virBufferAsprintf (virbuffer.c:381)
==32191==    by 0x55BB271: virDomainGenerateMachineName (domain_conf.c:27078)
==32191==    by 0x2BBD5B8F: qemuDomainGetMachineName (qemu_domain.c:9595)
==32191==    by 0x2BBDD9B4: qemuConnectCgroup (qemu_cgroup.c:966)
==32191==    by 0x2BC05DA7: qemuProcessReconnect (qemu_process.c:6822)
==32191==    by 0x554FBCF: virThreadHelper (virthread.c:206)
==32191==    by 0x8F913D3: start_thread (in /lib64/libpthread-2.23.so)

Moreover, make the @machinename 'const char *' to mark it
explicitly that we are not changing the passed string.

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
7 years agonews: Fix typo
Andrea Bolognani [Tue, 1 Aug 2017 06:29:19 +0000 (08:29 +0200)]
news: Fix typo

Signed-off-by: Andrea Bolognani <abologna@redhat.com>
7 years agonews: Update for 3.6.0 release
Michal Privoznik [Fri, 28 Jul 2017 14:10:51 +0000 (16:10 +0200)]
news: Update for 3.6.0 release

I was volunteered to prepare the release notes.

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Andrea Bolognani <abologna@redhat.com>
7 years agotests: qemumonitorjson: Old and empty test case for node name detection
Peter Krempa [Wed, 26 Jul 2017 09:06:51 +0000 (11:06 +0200)]
tests: qemumonitorjson: Old and empty test case for node name detection

Prior to qemu 2.5 the node names would not be generated, thus would be
missing from 'query-blockstats' and 'query-named-block-nodes'. Test that
the code correctly detects nothing.

Additionally make sure that a VM without disks does not cause problems.

The test case change is necessary as our test file checker does not play
well with empty files.

7 years agotests: utils: Allow NULL strings to be equal to empty file in virTestCompareToFile
Peter Krempa [Fri, 28 Jul 2017 10:37:48 +0000 (12:37 +0200)]
tests: utils: Allow NULL strings to be equal to empty file in virTestCompareToFile

Treat an NULL string equivalent to an empty string in
virTestCompareToFile so that callers don't need to add additional logic
in case when a test produces no output.

7 years agotests: Run virdrivermoduletest only when WITH_LIBVIRTD is defined
Peter Krempa [Fri, 28 Jul 2017 09:54:37 +0000 (11:54 +0200)]
tests: Run virdrivermoduletest only when WITH_LIBVIRTD is defined

The test makes sense only when building the daemon, thus run it only in
such case.

7 years agotests: Run virt-aa-helper-test only when the helper was compiled
Peter Krempa [Fri, 28 Jul 2017 09:49:38 +0000 (11:49 +0200)]
tests: Run virt-aa-helper-test only when the helper was compiled

'virt-aa-helper' is compiled when both WITH_LIBVIRTD and
WITH_SECDRIVER_APPARMOR are defined. The test was run only when
WITH_SECDRIVER_APPARMOR was defined thus causing a build failure when
building without the daemon.

7 years agodocs: Format comment timestamp in UTC
Martin Kletzander [Fri, 28 Jul 2017 08:45:26 +0000 (10:45 +0200)]
docs: Format comment timestamp in UTC

I just forgot '-u' in a54c9622860a.

Signed-off-by: Martin Kletzander <mkletzan@redhat.com>
7 years agonodedev: Fix double unlock of the driver on udevEnumerateDevices failure
Erik Skultety [Wed, 26 Jul 2017 08:45:11 +0000 (10:45 +0200)]
nodedev: Fix double unlock of the driver on udevEnumerateDevices failure

Commit @4cb719b2dc moved the driver locks around since these have become
unnecessary at spots where the code handles now self-lockable object
list, but missed the possible double unlock if udevEnumerateDevices
fails, because at that point the driver lock had been already dropped.

Signed-off-by: Erik Skultety <eskultet@redhat.com>
7 years agoRevert "build: distribute tests/virfilecachedata"
Pavel Hrdina [Thu, 27 Jul 2017 10:08:13 +0000 (12:08 +0200)]
Revert "build: distribute tests/virfilecachedata"

This reverts commit d3d422e00c995d50c4b78066367bfbc4f872f586.

Already fixed by commit 5a30b817ec93543c7a6cc93b5a6091a6666e377e.

7 years agobuild: distribute tests/virfilecachedata
Pavel Hrdina [Thu, 27 Jul 2017 09:55:40 +0000 (11:55 +0200)]
build: distribute tests/virfilecachedata

Missed by 478f0c5b8575.

Signed-off-by: Pavel Hrdina <phrdina@redhat.com>
7 years agosecurity: apparmor: load the storage driver dynamically
Peter Krempa [Wed, 26 Jul 2017 19:57:23 +0000 (21:57 +0200)]
security: apparmor: load the storage driver dynamically

In commit 5e515b542d I've attempted to fix the inability to access
storage from the apparmor helper program by linking with the storage
driver. By linking with the .so the linker complains that it's not
portable. Fix this by loading the module dynamically as we are supposed
to do.

Reviewed-by: Daniel P. Berrange <berrange@redhat.com>
7 years agomake: Drop building without driver modules
Peter Krempa [Wed, 26 Jul 2017 19:31:47 +0000 (21:31 +0200)]
make: Drop building without driver modules

Driver modules proved to be reliable for a long time. Since support for
not building modules complicates the code and makefiles drop it.

Reviewed-by: Daniel P. Berrange <berrange@redhat.com>
7 years agotests: add virfilecachedata to EXTRA_DIST
Daniel P. Berrange [Thu, 27 Jul 2017 09:56:20 +0000 (10:56 +0100)]
tests: add virfilecachedata to EXTRA_DIST

Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
7 years agotests: add test case for new syntax of VNC unix path with '='
Pavel Hrdina [Fri, 21 Jul 2017 17:55:35 +0000 (19:55 +0200)]
tests: add test case for new syntax of VNC unix path with '='

Signed-off-by: Pavel Hrdina <phrdina@redhat.com>
7 years agoqemu: properly handle '=' in the VNC socket path
Pavel Hrdina [Fri, 21 Jul 2017 17:54:33 +0000 (19:54 +0200)]
qemu: properly handle '=' in the VNC socket path

If a domain name contains a '=' and the unix socket path is
auto-generated or socket path provided by user contains '=' QEMU
is unable to properly parse the command line.  In order to make it
work we need to use the new command line syntax for VNC if it's
available, otherwise we can use the old syntax.

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

Signed-off-by: Pavel Hrdina <phrdina@redhat.com>
7 years agoqemu: capabilities: introduce QEMU_CAPS_VNC_MULTI_SERVERS
Pavel Hrdina [Fri, 21 Jul 2017 16:44:14 +0000 (18:44 +0200)]
qemu: capabilities: introduce QEMU_CAPS_VNC_MULTI_SERVERS

Signed-off-by: Pavel Hrdina <phrdina@redhat.com>
7 years agotests: qemumonitorjson: Test extraction of iSCSI device node names
Peter Krempa [Wed, 3 May 2017 06:45:00 +0000 (08:45 +0200)]
tests: qemumonitorjson: Test extraction of iSCSI device node names

Test storage was created on a rhel/centos 7 node using targetcli.

Reviewed-by: Eric Blake <eblake@redhat.com>
7 years agotests: qemumonitorjson: Test extraction of LUKS node names
Peter Krempa [Thu, 27 Jul 2017 08:26:41 +0000 (10:26 +0200)]
tests: qemumonitorjson: Test extraction of LUKS node names

Test file created by:

qemu-img create -f luks /var/lib/libvirt/images/luks 10M \
        -o key-secret=asdf --object secret,id=asdf,format=raw,data=asdf

Used in libvirt as:
 <disk type='file' device='disk'>
   <driver name='qemu' type='raw'/>
   <source file='/var/lib/libvirt/images/luks'/>
   <target dev='vda' bus='virtio'/>
   <encryption format='luks'>
     <secret type='passphrase' uuid='9b2c831a-fdb9-4c09-873c-1959580589e1'/>
   </encryption>
 </disk>

Reviewed-by: Eric Blake <eblake@redhat.com>
7 years agotests: qemumonitorjson: Add test case for node name detection with blockjob
Peter Krempa [Wed, 26 Jul 2017 09:06:51 +0000 (11:06 +0200)]
tests: qemumonitorjson: Add test case for node name detection with blockjob

qemu 2.9 returns an extra layer in the backing data if a block job is
active. Add a test case to see whether our code properly detects and
ignores such layer.

The test data was prepared by creating a backing chain of qcow2 images
(with qemu-img and with libvirt's snapshot feature).

One of the layers was then merged back by doing a block-commit:

virsh blockcommit VM hda --top /var/lib/libvirt/images/b

and then a block-copy job was started and kept in synchronized phase:

virsh blockcopy VM hda /tmp/tgt.img --transient job

Reviewed-by: Eric Blake <eblake@redhat.com>
7 years agotests: qemumonitorjson: Fix 'gluster' node name detection test case
Peter Krempa [Wed, 26 Jul 2017 08:30:18 +0000 (10:30 +0200)]
tests: qemumonitorjson: Fix 'gluster' node name detection test case

Add the blockstats data and fix the expected output.

Reviewed-by: Eric Blake <eblake@redhat.com>
7 years agotests: qemumonitorjson: Fix 'relative' node name detection test case
Peter Krempa [Wed, 26 Jul 2017 08:30:18 +0000 (10:30 +0200)]
tests: qemumonitorjson: Fix 'relative' node name detection test case

Add the blockstats data and fix the expected output.

Test data was created as:

qemu-img create -f qcow2 img0 10M
qemu-img create -f qcow2 -o "backing_fmt=qcow2,backing_file=img0" img1
qemu-img create -f qcow2 -o "backing_fmt=qcow2,backing_file=img1" img2
...

Reviewed-by: Eric Blake <eblake@redhat.com>
7 years agotests: qemumonitorjson: Add data and fix 'same-backing' node detection case
Peter Krempa [Wed, 26 Jul 2017 08:27:57 +0000 (10:27 +0200)]
tests: qemumonitorjson: Add data and fix 'same-backing' node detection case

With the new approach we are actually able to correctly detect node
names for the two instances of the same backing file.

Test images were created as:
qemu-img create -f qcow2 /var/lib/libvirt/images/base.qcow2 10M
qemu-img create -f qcow2 \
   -o "backing_fmt=qcow2,backing_file=/var/lib/libvirt/images/base.qcow2 \
   /var/lib/libvirt/images/a.qcow2
qemu-img create -f qcow2 \
   -o "backing_fmt=qcow2,backing_file=/var/lib/libvirt/images/base.qcow2 \
   /var/lib/libvirt/images/b.qcow2

and then used for two separate disks.

Reviewed-by: Eric Blake <eblake@redhat.com>
7 years agoqemu: block: store and test driver names for detected storage nodes
Peter Krempa [Tue, 25 Jul 2017 17:10:27 +0000 (19:10 +0200)]
qemu: block: store and test driver names for detected storage nodes

Store the 'drv' field both for the storage node and for the format node
and format them in the test case.

Reviewed-by: Eric Blake <eblake@redhat.com>
7 years agotests: qemumonitorjson: Simplify node name detection test
Peter Krempa [Wed, 26 Jul 2017 07:42:11 +0000 (09:42 +0200)]
tests: qemumonitorjson: Simplify node name detection test

We can now iterate the hash table and print all detected backing chains.
This simplifies calling of the test cases.

Reviewed-by: Eric Blake <eblake@redhat.com>
7 years agotests: Extract mock library for making hash table deterministic
Peter Krempa [Wed, 26 Jul 2017 08:02:21 +0000 (10:02 +0200)]
tests: Extract mock library for making hash table deterministic

virHashNew calls virRandomBits to initialize seed for the hashing
function. If a test uses iteration through the hash table to produce
results they may/will be non-deterministic. Extract the mock library
which was used for mac address mapping to be universal.

Reviewed-by: Eric Blake <eblake@redhat.com>
7 years agoqemu: block: Refactor node name detection code
Peter Krempa [Wed, 26 Jul 2017 07:36:21 +0000 (09:36 +0200)]
qemu: block: Refactor node name detection code

Remove the complex and unreliable code which inferred the node name
hierarchy only from data returned by 'query-named-block-nodes'. It turns
out that query-blockstats contain the full hierarchy of nodes as
perceived by qemu so the inference code is not necessary.

In query blockstats, the 'parent' object corresponds to the storage
behind a storage volume and 'backing' corresponds to the lower level of
backing chain. Since all have node names this data can be really easily
used to detect node names.

In addition to the code refactoring the one remaining test case needed
to be fixed along.

Reviewed-by: Eric Blake <eblake@redhat.com>
7 years agoutil: storagefile: rename 'nodebacking' to 'nodestorage' in virStorageSource
Peter Krempa [Tue, 25 Jul 2017 16:11:58 +0000 (18:11 +0200)]
util: storagefile: rename 'nodebacking' to 'nodestorage' in virStorageSource

Make it less confusing by naming the field which refers to the storage
object as 'nodestorage'.

Reviewed-by: Eric Blake <eblake@redhat.com>
7 years agoqemu: block: Rename qemuBlockFillNodeData and move it to the top
Peter Krempa [Tue, 25 Jul 2017 15:32:38 +0000 (17:32 +0200)]
qemu: block: Rename qemuBlockFillNodeData and move it to the top

The same operation will become useful in other places so rename the
function to be more generic and move it to the top so that it can be
reused earlier in the file.

Reviewed-by: Eric Blake <eblake@redhat.com>
7 years agotests: qemumontitorjson: temporarily disable node name detection tests
Peter Krempa [Wed, 26 Jul 2017 07:33:32 +0000 (09:33 +0200)]
tests: qemumontitorjson: temporarily disable node name detection tests

To simplify the refactoring patches disable the tests. This will allow
adding test data later.

Reviewed-by: Eric Blake <eblake@redhat.com>
7 years agotests: qemumonitorjson: simplify path handling in testBlockNodeNameDetect
Peter Krempa [Tue, 25 Jul 2017 13:49:00 +0000 (15:49 +0200)]
tests: qemumonitorjson: simplify path handling in testBlockNodeNameDetect

Extract the test prefix path into a variable and reuse
virTestLoadFileJSON to load the sample json files rather than doing it
manually.

Reviewed-by: Eric Blake <eblake@redhat.com>
7 years agotests: utils: Add virTestLoadFileJSON helper
Peter Krempa [Tue, 25 Jul 2017 16:40:50 +0000 (18:40 +0200)]
tests: utils: Add virTestLoadFileJSON helper

This new helper loads, parses and returns a JSON file from 'abs_srcdir'
By using variable arguments for the function, it's not necessary to
format the path separately in the test cases.

Reviewed-by: Eric Blake <eblake@redhat.com>
7 years agotests: qemuhelp: convert to virTestLoadFilePath
Peter Krempa [Tue, 25 Jul 2017 13:13:33 +0000 (15:13 +0200)]
tests: qemuhelp: convert to virTestLoadFilePath

As a sample usage of the new helper convert the calls in qemuhelptest to
the new helper.

Reviewed-by: Eric Blake <eblake@redhat.com>
7 years agotests: utils: Add virTestLoadFilePath helper
Peter Krempa [Tue, 25 Jul 2017 13:11:31 +0000 (15:11 +0200)]
tests: utils: Add virTestLoadFilePath helper

This new helper loads and returns a file from 'abs_srcdir'. By using
variable arguments for the function, it's not necessary to format the
path separately in the test cases.

Reviewed-by: Eric Blake <eblake@redhat.com>
7 years agoutil: buffer: Add virBufferStrcatVArgs
Peter Krempa [Mon, 24 Jul 2017 16:54:15 +0000 (18:54 +0200)]
util: buffer: Add virBufferStrcatVArgs

Split out the worker loop into a separate function and export it.

Reviewed-by: Eric Blake <eblake@redhat.com>
7 years agotests: utils: Don't calculate file size in virTestLoadFile
Peter Krempa [Tue, 25 Jul 2017 12:28:48 +0000 (14:28 +0200)]
tests: utils: Don't calculate file size in virTestLoadFile

The callers don't use it so don't waste a strlen(). Also fix the comment
for the function.

Reviewed-by: Eric Blake <eblake@redhat.com>
7 years agotests: qemumonitorjson: Drop redundant data from testBlockNodeNameDetectFormat
Peter Krempa [Wed, 26 Jul 2017 07:32:10 +0000 (09:32 +0200)]
tests: qemumonitorjson: Drop redundant data from testBlockNodeNameDetectFormat

The node name and backing file name can be inferred from the hierarchy.
This will also help when converting to detect node names using
query-blockstats data.

Reviewed-by: Eric Blake <eblake@redhat.com>
7 years agotests: qemumonitor: Prepare for more test data in testBlockNodeNameDetect
Peter Krempa [Wed, 26 Jul 2017 07:30:18 +0000 (09:30 +0200)]
tests: qemumonitor: Prepare for more test data in testBlockNodeNameDetect

Rename 'json' and related variables to 'nodeNameJson'. Also rename the
test files along. This is a preparation for modifying how we detect node
names which will also require data from 'query-blockstats'.

Reviewed-by: Eric Blake <eblake@redhat.com>
7 years agotests: qemumonitorjson: Consolidate basic node name detection test cases
Peter Krempa [Wed, 26 Jul 2017 07:26:56 +0000 (09:26 +0200)]
tests: qemumonitorjson: Consolidate basic node name detection test cases

Test cases named '1' and '2' differed only in the length of the backing
chain, so remove test case '2' and rename test '1' to 'basic'.

Reviewed-by: Eric Blake <eblake@redhat.com>
7 years agoqemu: monitor: Extract call of 'query-blockstats' and add new API for it
Peter Krempa [Mon, 24 Jul 2017 10:51:10 +0000 (12:51 +0200)]
qemu: monitor: Extract call of 'query-blockstats' and add new API for it

Allow getting the raw data from query-blockstats, so that we can use it
to detect the backing chain later on.

Reviewed-by: Eric Blake <eblake@redhat.com>
7 years agostorage: Disallow usage of the HBA for a fc_host backing
John Ferlan [Thu, 20 Jul 2017 18:52:15 +0000 (14:52 -0400)]
storage: Disallow usage of the HBA for a fc_host backing

Disallow providing the wwnn/wwpn of the HBA in the adapter XML:

  <adapter type='fc_host' [parent='scsi_hostN'] wwnn='HBA_wwnn'
    wwpn='HBA_wwpn'/>

This should be considered a configuration error since a vHBA
would not be created. In order to use the HBA as the backing the
following XML should be used:

  <adapter type='scsi_host' name='scsi_hostN'/>

So add a check prior to the checkParent call to validate that
the provided wwnn/wwpn resolves to a vHBA and not an HBA.

Signed-off-by: John Ferlan <jferlan@redhat.com>
7 years agoqemu_cgroup: Remove unnecessary virQEMUDriverPtr arguments
Martin Kletzander [Tue, 25 Jul 2017 15:49:43 +0000 (17:49 +0200)]
qemu_cgroup: Remove unnecessary virQEMUDriverPtr arguments

Since commit 2e6ecba1bcac, the pointer to the qemu driver is saved in
domain object's private data and hence does not have to be passed as
yet another parameter if domain object is already one of them.

This is a first (example) patch of this kind of clean up, others will
hopefully follow.

Signed-off-by: Martin Kletzander <mkletzan@redhat.com>
7 years agodocs: Add build timestamps to generated html/php pages
Martin Kletzander [Wed, 26 Jul 2017 15:04:37 +0000 (17:04 +0200)]
docs: Add build timestamps to generated html/php pages

In order not to make the build even less reproducible, honour
SOURCE_DATE_EPOCH environment variable as specified:

  https://reproducible-builds.org/specs/source-date-epoch/

Signed-off-by: Martin Kletzander <mkletzan@redhat.com>
7 years agobuild: Distribute tests/{qemucpumock.c,testutilshostcpus.h}
Martin Kletzander [Wed, 26 Jul 2017 15:34:03 +0000 (17:34 +0200)]
build: Distribute tests/{qemucpumock.c,testutilshostcpus.h}

Missed by 13554a9e7f4e.

Signed-off-by: Martin Kletzander <mkletzan@redhat.com>
7 years agotests: Prepare for stricter NIC model validation
Andrea Bolognani [Tue, 25 Jul 2017 14:46:14 +0000 (16:46 +0200)]
tests: Prepare for stricter NIC model validation

While using "definitely-not-virtio" as a model name is very
cute, it will also cause the relevant test to fail once we
introduce stricter validation.

Use "e1000", which is definitely not virtio but also a valid
model name, instead.

Signed-off-by: Andrea Bolognani <abologna@redhat.com>
7 years agodocs: Fix typo in memory backing section
Nitesh Konkar [Wed, 26 Jul 2017 09:54:25 +0000 (15:24 +0530)]
docs: Fix typo in memory backing section

Signed-off-by: Nitesh Konkar <nitkon12@linux.vnet.ibm.com>
Signed-off-by: Ján Tomko <jtomko@redhat.com>