]> xenbits.xensource.com Git - libvirt.git/log
libvirt.git
8 years agoqemu: new functions to calculate/set device pciConnectFlags
Laine Stump [Sun, 4 Sep 2016 20:03:57 +0000 (16:03 -0400)]
qemu: new functions to calculate/set device pciConnectFlags

The lowest level function of this trio
(qemuDomainDeviceCalculatePCIConnectFlags()) aims to be the single
authority for the virDomainPCIConnectFlags to use for any given device
using a particular arch/machinetype/qemu-binary.

qemuDomainFillDevicePCIConnectFlags() sets info->pciConnectFlags in a
single device (unless it has no virDomainDeviceInfo, in which case
it's a NOP).

qemuDomainFillAllPCIConnectFlags() sets info->pciConnectFlags in all
devices that have a virDomainDeviceInfo

The latter two functions aren't called anywhere yet. This commit is
just making them available. Later patches will replace all the current
hodge-podge of flag settings with calls to this single authority.

8 years agoqemu: new functions qemuDomainMachineHasPCI[e]Root()
Laine Stump [Sat, 3 Sep 2016 01:41:43 +0000 (21:41 -0400)]
qemu: new functions qemuDomainMachineHasPCI[e]Root()

These functions provide a simple one line method of learning if the
current domain has a pci-root or pcie-root bus.

8 years agovz: fixed migration in p2p mode
Pavel Glushchak [Mon, 14 Nov 2016 15:20:30 +0000 (18:20 +0300)]
vz: fixed migration in p2p mode

dom xml generated on begin step should be passed
to perform step in VIR_MIGRATE_PARAM_DEST_XML parameter.
Otherwise 'XML error: failed to parse xml document' is
raised on destination host as dom xml is NULL.

Signed-off-by: Pavel Glushchak <pglushchak@virtuozzo.com>
8 years agotools: Replace vshPrint with vshPrintExtra on places we forgot about
Erik Skultety [Fri, 4 Nov 2016 14:22:26 +0000 (15:22 +0100)]
tools: Replace vshPrint with vshPrintExtra on places we forgot about

Although there already was an effort (b620bdee) to replace vshPrint occurrences
with vshPrintExtra due to '--quiet' flag, there were still some leftovers. So
this patch fixes them, hopefully for good.

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

Signed-off-by: Erik Skultety <eskultet@redhat.com>
8 years agotools: use vshError rather than vshPrint on failure
Erik Skultety [Fri, 4 Nov 2016 14:21:31 +0000 (15:21 +0100)]
tools: use vshError rather than vshPrint on failure

There were a few places in our virsh* code where instead of calling vshError
on failure we called vshPrint.

Signed-off-by: Erik Skultety <eskultet@redhat.com>
8 years agostorage.html.in: Kill useless spaces in <pre/>
Michal Privoznik [Fri, 11 Nov 2016 22:40:27 +0000 (23:40 +0100)]
storage.html.in: Kill useless spaces in <pre/>

The <pre/> section is rendered as-is on the page. That is, if all
the lines are prefixed with 4 spaces the rendered page will also
have them. Problem is if we put a box around such <pre/> because
the content might not fix into it.

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
8 years agomigration.html.in: Kill useless spaces in <pre/>
Michal Privoznik [Fri, 11 Nov 2016 22:40:27 +0000 (23:40 +0100)]
migration.html.in: Kill useless spaces in <pre/>

The <pre/> section is rendered as-is on the page. That is, if all
the lines are prefixed with 4 spaces the rendered page will also
have them. Problem is if we put a box around such <pre/> because
the content might not fix into it.

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
8 years agologging.html.in: Kill useless spaces in <pre/>
Michal Privoznik [Fri, 11 Nov 2016 22:40:27 +0000 (23:40 +0100)]
logging.html.in: Kill useless spaces in <pre/>

The <pre/> section is rendered as-is on the page. That is, if all
the lines are prefixed with 4 spaces the rendered page will also
have them. Problem is if we put a box around such <pre/> because
the content might not fix into it.

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
8 years agolocking-sanlock.html.in: Kill useless spaces in <pre/>
Michal Privoznik [Fri, 11 Nov 2016 22:40:27 +0000 (23:40 +0100)]
locking-sanlock.html.in: Kill useless spaces in <pre/>

The <pre/> section is rendered as-is on the page. That is, if all
the lines are prefixed with 4 spaces the rendered page will also
have them. Problem is if we put a box around such <pre/> because
the content might not fix into it.

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
8 years agolocking-lockd.html.in: Kill useless spaces in <pre/>
Michal Privoznik [Fri, 11 Nov 2016 22:40:27 +0000 (23:40 +0100)]
locking-lockd.html.in: Kill useless spaces in <pre/>

The <pre/> section is rendered as-is on the page. That is, if all
the lines are prefixed with 4 spaces the rendered page will also
have them. Problem is if we put a box around such <pre/> because
the content might not fix into it.

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
8 years agorpc.html.in: Kill useless spaces in <pre/>
Michal Privoznik [Fri, 11 Nov 2016 22:40:27 +0000 (23:40 +0100)]
rpc.html.in: Kill useless spaces in <pre/>

The <pre/> section is rendered as-is on the page. That is, if all
the lines are prefixed with 4 spaces the rendered page will also
have them. Problem is if we put a box around such <pre/> because
the content might not fix into it.

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
8 years agolocking.html.in: Kill useless spaces in <pre/>
Michal Privoznik [Fri, 11 Nov 2016 22:40:27 +0000 (23:40 +0100)]
locking.html.in: Kill useless spaces in <pre/>

The <pre/> section is rendered as-is on the page. That is, if all
the lines are prefixed with 4 spaces the rendered page will also
have them. Problem is if we put a box around such <pre/> because
the content might not fix into it.

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
8 years agocommand.html.in: Kill useless spaces in <pre/>
Michal Privoznik [Fri, 11 Nov 2016 22:40:27 +0000 (23:40 +0100)]
command.html.in: Kill useless spaces in <pre/>

The <pre/> section is rendered as-is on the page. That is, if all
the lines are prefixed with 4 spaces the rendered page will also
have them. Problem is if we put a box around such <pre/> because
the content might not fix into it.

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
8 years agoformatstorageencryption.html.in: Kill useless spaces in <pre/>
Michal Privoznik [Fri, 11 Nov 2016 22:40:27 +0000 (23:40 +0100)]
formatstorageencryption.html.in: Kill useless spaces in <pre/>

The <pre/> section is rendered as-is on the page. That is, if all
the lines are prefixed with 4 spaces the rendered page will also
have them. Problem is if we put a box around such <pre/> because
the content might not fix into it.

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
8 years agoformatstorage.html.in: Kill useless spaces in <pre/>
Michal Privoznik [Fri, 11 Nov 2016 22:40:27 +0000 (23:40 +0100)]
formatstorage.html.in: Kill useless spaces in <pre/>

The <pre/> section is rendered as-is on the page. That is, if all
the lines are prefixed with 4 spaces the rendered page will also
have them. Problem is if we put a box around such <pre/> because
the content might not fix into it.

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
8 years agoformatsecret.html.in: Kill useless spaces in <pre/>
Michal Privoznik [Fri, 11 Nov 2016 22:40:27 +0000 (23:40 +0100)]
formatsecret.html.in: Kill useless spaces in <pre/>

The <pre/> section is rendered as-is on the page. That is, if all
the lines are prefixed with 4 spaces the rendered page will also
have them. Problem is if we put a box around such <pre/> because
the content might not fix into it.

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
8 years agoformatnwfilter.html.in: Kill useless spaces in <pre/>
Michal Privoznik [Fri, 11 Nov 2016 22:40:27 +0000 (23:40 +0100)]
formatnwfilter.html.in: Kill useless spaces in <pre/>

The <pre/> section is rendered as-is on the page. That is, if all
the lines are prefixed with 4 spaces the rendered page will also
have them. Problem is if we put a box around such <pre/> because
the content might not fix into it.

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
8 years agoformatnetwork.html.in: Kill useless spaces in <pre/>
Michal Privoznik [Fri, 11 Nov 2016 22:40:27 +0000 (23:40 +0100)]
formatnetwork.html.in: Kill useless spaces in <pre/>

The <pre/> section is rendered as-is on the page. That is, if all
the lines are prefixed with 4 spaces the rendered page will also
have them. Problem is if we put a box around such <pre/> because
the content might not fix into it.

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
8 years agoformatdomain.html.in: Kill useless spaces in <pre/>
Michal Privoznik [Fri, 11 Nov 2016 22:40:27 +0000 (23:40 +0100)]
formatdomain.html.in: Kill useless spaces in <pre/>

The <pre/> section is rendered as-is on the page. That is, if all
the lines are prefixed with 4 spaces the rendered page will also
have them. Problem is if we put a box around such <pre/> because
the content might not fix into it.

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
8 years agoformatcaps.html.in: Kill useless spaces in <pre/>
Michal Privoznik [Fri, 11 Nov 2016 22:40:27 +0000 (23:40 +0100)]
formatcaps.html.in: Kill useless spaces in <pre/>

The <pre/> section is rendered as-is on the page. That is, if all
the lines are prefixed with 4 spaces the rendered page will also
have them. Problem is if we put a box around such <pre/> because
the content might not fix into it.

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
8 years agoformat.html.in: Kill useless spaces in <pre/>
Michal Privoznik [Fri, 11 Nov 2016 22:40:27 +0000 (23:40 +0100)]
format.html.in: Kill useless spaces in <pre/>

The <pre/> section is rendered as-is on the page. That is, if all
the lines are prefixed with 4 spaces the rendered page will also
have them. Problem is if we put a box around such <pre/> because
the content might not fix into it.

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
8 years agodrvlxc.html.in: Kill useless spaces in <pre/>
Michal Privoznik [Fri, 11 Nov 2016 22:40:27 +0000 (23:40 +0100)]
drvlxc.html.in: Kill useless spaces in <pre/>

The <pre/> section is rendered as-is on the page. That is, if all
the lines are prefixed with 4 spaces the rendered page will also
have them. Problem is if we put a box around such <pre/> because
the content might not fix into it.

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
8 years agodrvesx.html.in: Kill useless spaces in <pre/>
Michal Privoznik [Fri, 11 Nov 2016 22:40:27 +0000 (23:40 +0100)]
drvesx.html.in: Kill useless spaces in <pre/>

The <pre/> section is rendered as-is on the page. That is, if all
the lines are prefixed with 4 spaces the rendered page will also
have them. Problem is if we put a box around such <pre/> because
the content might not fix into it.

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
8 years agodrvbhyve.html.in: Kill useless spaces in <pre/>
Michal Privoznik [Fri, 11 Nov 2016 22:40:27 +0000 (23:40 +0100)]
drvbhyve.html.in: Kill useless spaces in <pre/>

The <pre/> section is rendered as-is on the page. That is, if all
the lines are prefixed with 4 spaces the rendered page will also
have them. Problem is if we put a box around such <pre/> because
the content might not fix into it.

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
8 years agodownloads.html.in: Kill useless spaces in <pre/>
Michal Privoznik [Fri, 11 Nov 2016 22:40:27 +0000 (23:40 +0100)]
downloads.html.in: Kill useless spaces in <pre/>

The <pre/> section is rendered as-is on the page. That is, if all
the lines are prefixed with 4 spaces the rendered page will also
have them. Problem is if we put a box around such <pre/> because
the content might not fix into it.

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
8 years agodevguide.html.in: Kill useless spaces in <pre/>
Michal Privoznik [Fri, 11 Nov 2016 22:40:27 +0000 (23:40 +0100)]
devguide.html.in: Kill useless spaces in <pre/>

The <pre/> section is rendered as-is on the page. That is, if all
the lines are prefixed with 4 spaces the rendered page will also
have them. Problem is if we put a box around such <pre/> because
the content might not fix into it.

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
8 years agocompiling.html.in: Kill useless spaces in <pre/>
Michal Privoznik [Fri, 11 Nov 2016 22:40:27 +0000 (23:40 +0100)]
compiling.html.in: Kill useless spaces in <pre/>

The <pre/> section is rendered as-is on the page. That is, if all
the lines are prefixed with 4 spaces the rendered page will also
have them. Problem is if we put a box around such <pre/> because
the content might not fix into it.

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
8 years agocgroups.html.in: Kill useless spaces in <pre/>
Michal Privoznik [Fri, 11 Nov 2016 22:40:27 +0000 (23:40 +0100)]
cgroups.html.in: Kill useless spaces in <pre/>

The <pre/> section is rendered as-is on the page. That is, if all
the lines are prefixed with 4 spaces the rendered page will also
have them. Problem is if we put a box around such <pre/> because
the content might not fix into it.

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
8 years agoaclpolkit.html.in: Kill useless spaces in <pre/>
Michal Privoznik [Fri, 11 Nov 2016 22:40:27 +0000 (23:40 +0100)]
aclpolkit.html.in: Kill useless spaces in <pre/>

The <pre/> section is rendered as-is on the page. That is, if all
the lines are prefixed with 4 spaces the rendered page will also
have them. Problem is if we put a box around such <pre/> because
the content might not fix into it.

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
8 years agoqemuDomainAttachNetDevice: Avoid @originalError leak
Michal Privoznik [Fri, 11 Nov 2016 15:30:51 +0000 (16:30 +0100)]
qemuDomainAttachNetDevice: Avoid @originalError leak

Coverity identified that this variable might be leaked. And it's
right. If an error occurred and we have to roll back the control
jumps to try_remove label where we save the current error (see
0e82fa4c34 for more info). However, inside the code a jump onto
other label is possible thus leaking the error object.

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
8 years agoadmin: Use the newly introduced close callback handling helpers
Erik Skultety [Thu, 10 Nov 2016 12:21:29 +0000 (13:21 +0100)]
admin: Use the newly introduced close callback handling helpers

Use the newly introduced close callback helpers to make the code look just a
bit cleaner and more importantly, to fix the following memleak regarding a
dangling virAdmConnect object reference caused by assigning NULL to the close
callback data once the catch-disconnect routine used the callback followed
by a comparison of NULL to the originally defined close callback (which at that
moment had already been NULL'd by remoteAdminClientCloseFunc) in
virAdmConnectCloseCallbackUnregister.

717 (88 direct, 629 indirect) bytes in 1 blocks are definitely lost record
 110 of 141
    at 0x4C2A988: calloc (vg_replace_malloc.c:711)
    by 0x530696F: virAllocVar (viralloc.c:560)
    by 0x53689E6: virObjectNew (virobject.c:193)
    by 0x5368B5E: virObjectLockableNew (virobject.c:219)
    by 0x4E3E7EE: virAdmConnectNew (datatypes.c:900)
    by 0x4E398BB: virAdmConnectOpen (libvirt-admin.c:220)
    by 0x10D3E3: vshAdmConnect (virt-admin.c:161)
    by 0x10D624: vshAdmReconnect (virt-admin.c:215)
    by 0x10DB0A: cmdConnect (virt-admin.c:353)
    by 0x11288F: vshCommandRun (vsh.c:1313)
    by 0x10FDB6: main (virt-admin.c:1439)

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

Signed-off-by: Erik Skultety <eskultet@redhat.com>
8 years agodatatypes: Introduce some admin-related close callback handling helpers
Erik Skultety [Thu, 10 Nov 2016 12:20:26 +0000 (13:20 +0100)]
datatypes: Introduce some admin-related close callback handling helpers

Well, there were three different spots where closeCallback->freeCallback was
called, not looking the same --> potential for bugs - and there indeed is a bug
with refcounting of the @conn object. So this patch partially follows the path
set by commit 24dbb69f by introducing some close callback helpers both to
replace all the spots where we call clean the close callback data with a
dedicated function and to be able to fix the refcounting bug causing a memleak.

Signed-off-by: Erik Skultety <eskultet@redhat.com>
8 years agoadmin: Remove unnecessary @conn object locking
Erik Skultety [Thu, 10 Nov 2016 12:32:41 +0000 (13:32 +0100)]
admin: Remove unnecessary @conn object locking

The only place we change the @conn object is actually virAdmConnectOpen
routine, thus at the moment we don't really need to lock it, given the fact that
what we're trying to do here is to change the closeCallback object which is a
lockable object itself, so that should be enough to avoid races.

Signed-off-by: Erik Skultety <eskultet@redhat.com>
8 years agovsh: Drop conditional error reporting in vshErrorHandler
Erik Skultety [Wed, 9 Nov 2016 11:20:46 +0000 (12:20 +0100)]
vsh: Drop conditional error reporting in vshErrorHandler

First, since commit 834c5720 the error reporting within the vshErrorHandler
doesn't work because there was a lot of renaming going on (dull mechanical
renaming without much thinking about it, yep - shame on me) and so the original
env variable VIRSH_DEBUG got renamed to VSH_DEBUG which we don't support nor
document anywhere. Second, by specifying this env variable, the last libvirt
error gets reported twice despite the fact we say the error reporting should be
deferred until the command finishes, and last but not least the vintage code's
logic is a bit 'odd', since the error would get reported iff the env variable
is set, even if the value should be equal to our DEFAULT value in which case it
doesn't make sense that we behave differently when an env variable is set to
some value and when there's no env variable at all but we use the same value
automatically as default.

Signed-off-by: Erik Skultety <eskultet@redhat.com>
8 years agobuild: update to latest gnulib
Eric Blake [Thu, 15 Sep 2016 20:12:52 +0000 (15:12 -0500)]
build: update to latest gnulib

In particular, pull in gnulib's fix for the broken SIZE_MAX on s390.

* .gnulib: Update to latest.
* bootstrap: Resync to upstream.

Signed-off-by: Eric Blake <eblake@redhat.com>
8 years agoCleanup switch statements on the hostdev subsystem type
Eric Farman [Tue, 8 Nov 2016 18:26:23 +0000 (13:26 -0500)]
Cleanup switch statements on the hostdev subsystem type

As was suggested in an earlier review comment[1], we can
catch some additional code points by cleaning up how we use the
hostdev subsystem type in some switch statements.

[1] End of https://www.redhat.com/archives/libvir-list/2016-September/msg00399.html

Signed-off-by: Eric Farman <farman@linux.vnet.ibm.com>
Signed-off-by: John Ferlan <jferlan@redhat.com>
8 years agovsh: Fix the incorrect environment variable prefix in error message
Erik Skultety [Fri, 11 Nov 2016 12:39:45 +0000 (13:39 +0100)]
vsh: Fix the incorrect environment variable prefix in error message

Unlike the other error messages in vshInitDebug, this one relied on a hardcoded
name of a variable instead of using the prefix of the tool calling the init
routine.

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

Signed-off-by: Erik Skultety <eskultet@redhat.com>
8 years agodocs: remove bogus line-height override
Daniel P. Berrange [Tue, 8 Nov 2016 16:50:13 +0000 (16:50 +0000)]
docs: remove bogus line-height override

The default browser line height is fine. Overriding it
causes <pre> blocks inside a <dl> to have enourmous
spacing.

Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
8 years agodocs: add some content to the XML format main page
Daniel P. Berrange [Tue, 8 Nov 2016 11:35:20 +0000 (11:35 +0000)]
docs: add some content to the XML format main page

The XML format main page has never had any content in it,
relying on the left navbar to provide links to the XML
schema pages. Since the navbar is gone, the page needs
to have some content created, otherwise it is useless.

Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
8 years agodocs: remove outdated or duplicated content
Daniel P. Berrange [Mon, 31 Oct 2016 11:23:50 +0000 (11:23 +0000)]
docs: remove outdated or duplicated content

Remove a bunch of pages which are either outdated, have no
content, or duplicate content better described elsewhere
in the site or wiki.

Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
8 years agodocs: remove navigation sidebar from pages
Daniel P. Berrange [Mon, 31 Oct 2016 11:25:26 +0000 (11:25 +0000)]
docs: remove navigation sidebar from pages

A combination of the index page, top nav bar and docs.html page
provide links to all pages on the site. The left hand nav bar
is thus redundant and can be removed to provide a simpler style
for the site.

Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
8 years agodocs: fill out docs page with useful links
Daniel P. Berrange [Mon, 31 Oct 2016 11:29:21 +0000 (11:29 +0000)]
docs: fill out docs page with useful links

The docs page is currently completely empty. Fill it in with
links to the various documentation, categorized as to whether
it is targetting people deploying libvirt, application
developers using libvirt, or people working on libvirt
itself.

Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
8 years agodocs: add some improved styling to contact page
Daniel P. Berrange [Mon, 31 Oct 2016 11:36:20 +0000 (11:36 +0000)]
docs: add some improved styling to contact page

Change the contact page styling to better distinguish the
various mailing lists.

Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
8 years agodocs: expand downloads page to cover all modules
Daniel P. Berrange [Mon, 31 Oct 2016 11:27:27 +0000 (11:27 +0000)]
docs: expand downloads page to cover all modules

Previously the download page only covered the main libvirt
module and the app dev guide. Expand it to provide direct
links to all artifacts published by the project, whether
the main library, language bindings, docs, or testing.

Tweak the top table styling to better fit in with new
branding.

Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
8 years agodocs: rewrite content on front page to be more useful
Daniel P. Berrange [Wed, 26 Oct 2016 08:37:06 +0000 (10:37 +0200)]
docs: rewrite content on front page to be more useful

The front page contains a bunch of content that is either
outdated (eg links to libvirt qpid) or not particularly
useful (links to vendor hypervisor sites).

This rewrites it to be more directly useful to visitors,
providing a updated intro to libvirt project, direct
links to key pieces of website content (new contributors
guide, security process, bug reporting, XML formats), and
feed showing recent 5 blog posts on the virt tools planet.

Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
8 years agoRevert "syntax-check: Enforce <code> inside <dt> elements"
Daniel P. Berrange [Mon, 31 Oct 2016 12:04:54 +0000 (12:04 +0000)]
Revert "syntax-check: Enforce <code> inside <dt> elements"

This reverts commit 1f29f3da065ef12d3ec39c3c673186f8ea6d764e.

Assuming <dt> is always used to document symbols is way too
broad, requiring far too many exemptions to be marked to
avoid syntax check rules.

Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
8 years agodocs: remove related links page
Daniel P. Berrange [Tue, 25 Oct 2016 15:32:37 +0000 (17:32 +0200)]
docs: remove related links page

The related links page is either horribly outdated, or duplicating
stuff already linked elsewhere.

Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
8 years agodocs: remove todo page
Daniel P. Berrange [Tue, 25 Oct 2016 15:31:32 +0000 (17:31 +0200)]
docs: remove todo page

The todo page used to be auto-generated from bugzilla but is
no longer used.

Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
8 years agodocs: add three core links in the header bar
Daniel P. Berrange [Tue, 25 Oct 2016 15:27:10 +0000 (17:27 +0200)]
docs: add three core links in the header bar

Add links to download, communicate and learn in the
header bar, as the main jumping off points for
navigation.

Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
8 years agodocs: add page describing contribution to libvirt
Daniel P. Berrange [Mon, 31 Oct 2016 11:48:12 +0000 (11:48 +0000)]
docs: add page describing contribution to libvirt

Add a page that describes what contributions libvirt is
looking for and how to get involved.

Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
8 years agodocs: simplify style for headers
Daniel P. Berrange [Tue, 25 Oct 2016 15:26:25 +0000 (17:26 +0200)]
docs: simplify style for headers

Remove the 1px border underneath all headers and make them
use black text to simplify visual appearance

Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
8 years agodocs: add footer to all pages
Daniel P. Berrange [Tue, 25 Oct 2016 14:56:50 +0000 (16:56 +0200)]
docs: add footer to all pages

Add a footer to all pages containing a blurb about the
code of conduct, and links to various communication
channels / social media / user self-help sites.

Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
8 years agodocs: provide new style logos for the apps page
Daniel P. Berrange [Mon, 7 Nov 2016 16:41:23 +0000 (16:41 +0000)]
docs: provide new style logos for the apps page

Replace the old "Made with libvirt" logo with links to the
new "Libvirt powered" logos, providing various sizes.

Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
8 years agodocs: redo style of front page
Daniel P. Berrange [Tue, 25 Oct 2016 14:55:39 +0000 (16:55 +0200)]
docs: redo style of front page

Use a large logo banner across the front page. Tile the
three lists of links into three panels

Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
8 years agodocs: switch to new website banner
Daniel P. Berrange [Tue, 25 Oct 2016 14:16:29 +0000 (16:16 +0200)]
docs: switch to new website banner

Use a dark banner whose color matches the dark green used in
the logo. Introduce a newly rendered version of the header
logo derived from new SVG file, instead of old one from
(now lost) Adobe Illustrator file.

The top banner logo now links to the front page as is common
practice for most websites.

Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
8 years agodocs: add master SVG for libvirt logo
Daniel P. Berrange [Mon, 31 Oct 2016 12:20:53 +0000 (12:20 +0000)]
docs: add master SVG for libvirt logo

Add the SVG files for the libvirt logo, along with corresponding
pre-rendered PNG bitmaps at key sizes. Also add a README file
describing how to modify the logos and their intended usages.

Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
8 years agodocs: use overpass font for website
Daniel P. Berrange [Tue, 25 Oct 2016 13:55:17 +0000 (15:55 +0200)]
docs: use overpass font for website

The original libvirt logo was built using what appears to be
either Overpass font, or one stylistically very similar (the
slanted top of letters like 'l', 't', etc). The newly recreated
libvirt logo will use Overpass. Use this font for the website
text too, to provide a consistent style.

Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
8 years agoqemu: Generate memory device aliases according to slot number
Peter Krempa [Tue, 1 Nov 2016 05:21:36 +0000 (06:21 +0100)]
qemu: Generate memory device aliases according to slot number

The memory device alias needs to be treated as machine ABI as qemu is
using it in the migration stream for section labels. To simplify this
generate the alias from the slot number unless an existing broken
configuration is detected.

With this patch the aliases are predictable and even certain
configurations which would not be migratable previously are fixed.

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

8 years agoqemu: Assign slots to memory devices prior to usage
Peter Krempa [Tue, 1 Nov 2016 05:07:09 +0000 (06:07 +0100)]
qemu: Assign slots to memory devices prior to usage

As with other devices assign the slot number right away when adding the
device. This will make the slot numbers static as we do with other
addressing elements and it will ultimately simplify allocation of the
alias in a static way which does not break with qemu.

8 years agoqemu: process: detect if dimm aliases are broken on reconnect
Peter Krempa [Mon, 31 Oct 2016 15:49:49 +0000 (16:49 +0100)]
qemu: process: detect if dimm aliases are broken on reconnect

Detect on reconnect to a running qemu VM whether the alias of a
hotpluggable memory device (dimm) does not match the dimm slot number
where it's connected to. This is necessary as qemu is actually
considering the alias as machine ABI used to connect the backend object
to the dimm device.

This will require us to keep them consistent so that we can reliably
restore them on migration. In some situations it was currently possible
to create a mismatched configuration and qemu would refuse to restore
the migration stream.

To avoid breaking existing VMs we'll need to keep the old algorithm
though.

8 years agoconf: Allow specifying only the slot number for hotpluggable memory
Peter Krempa [Thu, 13 Oct 2016 12:55:47 +0000 (14:55 +0200)]
conf: Allow specifying only the slot number for hotpluggable memory

Simplify handling of the 'dimm' address element by allowing to specify
the slot number only. This will allow libvirt to allocate slot numbers
before starting qemu.

8 years agoconfigure: remove fallback check for parted
Daniel P. Berrange [Wed, 9 Nov 2016 17:29:20 +0000 (17:29 +0000)]
configure: remove fallback check for parted

Since we no longer support building on RHEL-5, we can
drop the non-pkg-config based check for parted.

Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
8 years agoxen: remove legacy hack for RHEL-5 Xen
Daniel P. Berrange [Wed, 9 Nov 2016 17:27:50 +0000 (17:27 +0000)]
xen: remove legacy hack for RHEL-5 Xen

We dropped support for RHEL-5 vintage Xen a while ago,
but forgot to remove some of the hacks for it.

Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
8 years agoqemu: Remove erroneously placed comments for numerical ordering
John Ferlan [Thu, 10 Nov 2016 14:47:50 +0000 (09:47 -0500)]
qemu: Remove erroneously placed comments for numerical ordering

Commit id '74bbb8c2ec' seems to have mismerged a bit - adding 240 comments
out of place.  Just clean that up.

8 years agoqemuDomainAttachNetDevice: Enable multiqueue for vhost-user
Michal Privoznik [Tue, 25 Oct 2016 10:18:23 +0000 (12:18 +0200)]
qemuDomainAttachNetDevice: Enable multiqueue for vhost-user

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

We have everything ready. Actually the only limitation was our
check that denied hotplug of vhost-user.

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
8 years agoqemuDomainAttachNetDevice: Don't overwrite error on rollback
Michal Privoznik [Tue, 25 Oct 2016 10:16:36 +0000 (12:16 +0200)]
qemuDomainAttachNetDevice: Don't overwrite error on rollback

If there is an error hotpluging a net device (for whatever
reason) a rollback operation is performed. However, whilst doing
so various helper functions that are called report errors on
their own. This results in the original error to be overwritten
and thus misleading the user.

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
8 years agoqemu: Make sure shmem memory is shared
Martin Kletzander [Thu, 10 Nov 2016 07:20:07 +0000 (08:20 +0100)]
qemu: Make sure shmem memory is shared

Even though using /dev/shm/asdf as the backend, we still need to make
the mapping shared.  The original patch forgot to add that parameter.

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

Signed-off-by: Martin Kletzander <mkletzan@redhat.com>
8 years agolxc.conf: s/QEMU/LXC/
Michal Privoznik [Wed, 9 Nov 2016 17:13:45 +0000 (18:13 +0100)]
lxc.conf: s/QEMU/LXC/

There's one copy paste error where a comment mentions QEMU
instead of LXC driver.

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
8 years agoqemu_capabilities: fix build with for old gcc
Pavel Hrdina [Wed, 9 Nov 2016 17:40:14 +0000 (18:40 +0100)]
qemu_capabilities: fix build with for old gcc

../../src/qemu/qemu_capabilities.c:3757: error: declaration of
'basename' shadows a global declaration [-Wshadow]

Signed-off-by: Pavel Hrdina <phrdina@redhat.com>
8 years agoqemu: Fix double free when live-attaching shmem
Martin Kletzander [Wed, 9 Nov 2016 16:40:17 +0000 (17:40 +0100)]
qemu: Fix double free when live-attaching shmem

Function qemuDomainAttachShmemDevice() steals the device data if the
hotplug was successful, but the condition checked for unsuccessful
execution otherwise.

Signed-off-by: Martin Kletzander <mkletzan@redhat.com>
8 years agoqemu: command: Add debug option for gluster volumes
Prasanna Kumar Kalever [Fri, 14 Oct 2016 03:37:45 +0000 (05:37 +0200)]
qemu: command: Add debug option for gluster volumes

Propagate the selected or default level to qemu if it's supported.

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

Signed-off-by: Prasanna Kumar Kalever <prasanna.kalever@redhat.com>
Signed-off-by: Peter Krempa <pkrempa@redhat.com>
8 years agoqemu: conf: add option for tuning debug logging level
Prasanna Kumar Kalever [Wed, 21 Sep 2016 19:34:18 +0000 (01:04 +0530)]
qemu: conf: add option for tuning debug logging level

This helps in selecting log level of the gluster gfapi, output to stderr.
The option is 'gluster_debug_level', can be tuned by editing
'/etc/libvirt/qemu.conf'

Debug levels ranges 0-9, with 9 being the most verbose, and 0
representing no debugging output.  The default is the same as it was
before, which is a level of 4.  The current logging levels defined in
the gluster gfapi are:

    0 - None
    1 - Emergency
    2 - Alert
    3 - Critical
    4 - Error
    5 - Warning
    6 - Notice
    7 - Info
    8 - Debug
    9 - Trace

Signed-off-by: Prasanna Kumar Kalever <prasanna.kalever@redhat.com>
Signed-off-by: Peter Krempa <pkrempa@redhat.com>
8 years agotests: qemucaps: Add QMP introspection data for qemu 2.6.0 on aarch64 gicv3
Andrea Bolognani [Wed, 19 Oct 2016 15:36:45 +0000 (11:36 -0400)]
tests: qemucaps: Add QMP introspection data for qemu 2.6.0 on aarch64 gicv3

Add QMP schema data query for aarch64. The gic capabilities are
unfortunately queried after the QMP schema and thus this patch needs to
undo the temporary removal of the declared support for query-qmp-schema.

Note that as a gicv3 machine was not available the schema data is taken
from the gicv2 case. It should be identical since qemu would be built
from the same source.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
8 years agotests: qemucaps: Add QMP introspection data for qemu 2.6.0 on aarch64 gicv2
Andrea Bolognani [Wed, 19 Oct 2016 15:36:45 +0000 (11:36 -0400)]
tests: qemucaps: Add QMP introspection data for qemu 2.6.0 on aarch64 gicv2

Add QMP schema data query for aarch64. The gic capabilities are
unfortunately queried after the QMP schema and thus this patch needs to
undo the temporary removal of the declared support for query-qmp-schema.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
8 years agoqemu: capabilities: Detect support for gluster debug setting
Prasanna Kumar Kalever [Wed, 21 Sep 2016 19:34:19 +0000 (01:04 +0530)]
qemu: capabilities: Detect support for gluster debug setting

Teach qemu driver to detect whether qemu supports specifying debug level
for gluster volumes.

Signed-off-by: Prasanna Kumar Kalever <prasanna.kalever@redhat.com>
Signed-off-by: Peter Krempa <pkrempa@redhat.com>
8 years agoqemu: capabilities: Add support for QMP schema introspection
Peter Krempa [Wed, 19 Oct 2016 12:40:53 +0000 (14:40 +0200)]
qemu: capabilities: Add support for QMP schema introspection

Allow detecting capabilities according to the qemu QMP schema. This is
necessary as sometimes the availability of certain options depends on
the presence of a field in the schema.

This patch adds support for loading the QMP schema when detecting qemu
capabilities and adds a very simple query language to allow traversing
the schema and selecting a certain element from it.

The infrastructure in this patch uses a query path to set a specific
capability flag according to the availability of the given element in
the schema.

8 years agotests: qemucaps: Temporarily remove 'query-qmp-schema' from test data
Peter Krempa [Thu, 20 Oct 2016 08:11:05 +0000 (10:11 +0200)]
tests: qemucaps: Temporarily remove 'query-qmp-schema' from test data

Remove the command from the supported commands list temporarily so that
QMP introspection code can be added without breaking tests and having to
tweak the test data in the same commit.

This will be later reverted and test data will be added. The aarch64
code is special as it calls additional commands and thus the test data
can't be added upfront.

8 years agotests: qemucaps: Add QMP introspection data for qemu 2.6.0 on ppc64le
Andrea Bolognani [Wed, 19 Oct 2016 15:36:45 +0000 (11:36 -0400)]
tests: qemucaps: Add QMP introspection data for qemu 2.6.0 on ppc64le

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
8 years agotests: qemucaps: Add QMP introspection data for qemu 2.7.0 on x86
Pavel Hrdina [Wed, 19 Oct 2016 14:53:22 +0000 (16:53 +0200)]
tests: qemucaps: Add QMP introspection data for qemu 2.7.0 on x86

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
8 years agotests: qemucaps: Add QMP introspection data for qemu 2.6.0 on x86
Pavel Hrdina [Wed, 19 Oct 2016 14:53:13 +0000 (16:53 +0200)]
tests: qemucaps: Add QMP introspection data for qemu 2.6.0 on x86

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
8 years agotests: qemucaps: Add QMP introspection data for qemu 2.5.0 on x86
Pavel Hrdina [Wed, 19 Oct 2016 14:52:02 +0000 (16:52 +0200)]
tests: qemucaps: Add QMP introspection data for qemu 2.5.0 on x86

Add output of 'query-qmp-schema' to the capabilities test.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
8 years agotests: qemucaps: Update aarch64 gicv2 replies for qemu 2.6.0 release
Andrea Bolognani [Wed, 19 Oct 2016 15:36:45 +0000 (11:36 -0400)]
tests: qemucaps: Update aarch64 gicv2 replies for qemu 2.6.0 release

Sync up to the released version of qemu.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
8 years agotests: qemucaps: Update ppc64 replies for qemu 2.6.0 release
Andrea Bolognani [Wed, 19 Oct 2016 15:36:45 +0000 (11:36 -0400)]
tests: qemucaps: Update ppc64 replies for qemu 2.6.0 release

Sync up to the released version of qemu.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
8 years agoqemu: monitor: Add code to retrieve and store QMP schema data
Peter Krempa [Mon, 17 Oct 2016 12:20:42 +0000 (14:20 +0200)]
qemu: monitor: Add code to retrieve and store QMP schema data

Call 'query-qmp-schema' and store the returned types in a hash table
keyed by the 'name' field so that the capabilities code can traverse it.

8 years agoutil: json: add helper to iterate and steal members of json array
Peter Krempa [Mon, 17 Oct 2016 11:44:16 +0000 (13:44 +0200)]
util: json: add helper to iterate and steal members of json array

Simplifies cases where JSON array members need to be transferred to a
different structure.

8 years agotest driver: Deny some operations on inactive domains
Michal Privoznik [Tue, 8 Nov 2016 08:49:22 +0000 (09:49 +0100)]
test driver: Deny some operations on inactive domains

Some operations like reboot, save, coreDump, blockStats,
ifaceStats make sense iff domain is running. While it is
technically possible for our test driver to return success
regardless of domain state, we should copy constraints from
other drivers and thus deny these operations over inactive
domains.

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
8 years agoqemu: Only allow 'raw' format for scsi-block using virtio-scsi
John Ferlan [Mon, 31 Oct 2016 19:44:34 +0000 (15:44 -0400)]
qemu: Only allow 'raw' format for scsi-block using virtio-scsi

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

Add check in qemuCheckDiskConfig for an invalid combination
of using the 'scsi' bus for a block 'lun' device and any disk
source format other than 'raw'.

8 years agoAdd vbox 5.1 driver file
Daniel P. Berrange [Tue, 8 Nov 2016 11:19:02 +0000 (11:19 +0000)]
Add vbox 5.1 driver file

Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
8 years agodocs: add note about when lxc: XML namespace was added
Daniel P. Berrange [Tue, 8 Nov 2016 09:59:41 +0000 (09:59 +0000)]
docs: add note about when lxc: XML namespace was added

Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
8 years agovbox: hookup the 5.1 C API to the unified driver
Dawid Zamirski [Tue, 8 Nov 2016 09:56:33 +0000 (09:56 +0000)]
vbox: hookup the 5.1 C API to the unified driver

8 years agovbox: add vbox 5.1 C API header file.
Dawid Zamirski [Thu, 20 Oct 2016 20:13:45 +0000 (16:13 -0400)]
vbox: add vbox 5.1 C API header file.

extracted from VirutalBox SDK and reindented with cppi.

8 years agotest driver: error out when domain destroy twice
Félix Bouliane [Mon, 7 Nov 2016 20:09:26 +0000 (15:09 -0500)]
test driver: error out when domain destroy twice

Fixes the behavior when destroying a domain more than once.
VIR_ERR_OPERATION_INVALID should be raised when destroying an
already destroyed domain.

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
8 years agoUnbreak rebuilding docs with release tarballs
Guido Günther [Fri, 4 Nov 2016 17:30:16 +0000 (18:30 +0100)]
Unbreak rebuilding docs with release tarballs

Release tarballs ship the include/libvirt/libvirt-common.h.

when srcdir != builddir we end up including libvirt-common.h twice: from
$top_srcdir/include/libvirt-common.h and from
$builddir/include/libvirt-common.h leading to

  function virTypedParamsGetUInt from /tmp/buildd/libvirt-2.4.0/debian/build/docs/../include/libvirt/libvirt-common.h redeclared in /tmp/buildd/libvirt-2.4.0/docs/../include/libvirt/libvirt-common.h
  function virTypedParamsAddBoolean from /tmp/buildd/libvirt-2.4.0/debian/build/docs/../include/libvirt/libvirt-common.h redeclared in /tmp/buildd/libvirt-2.4.0/docs/../include/libvirt/libvirt-common.h
   …

Only add the builddir to the search list if there is no pregenerated
libvirt-common.h.

Reuse the existing check that predates the libvirt.h → libvirt-common.h
split and that probably was meant for exactly that.

References: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=842452

8 years agospec: Run all make jobs in parallel
Andrea Bolognani [Mon, 7 Nov 2016 15:09:17 +0000 (16:09 +0100)]
spec: Run all make jobs in parallel

Commit e8861f69714f changed our spec file to compile and run
tests in parallel. That's a very good step forward, but why
stop there? Let's run *all* make jobs in parallel and really
put those expensive cores to use!

On my laptop, this shaves ~10s off 'make rpm'.

8 years agowireshark: Use ${exec_prefix} instead of ${prefix}
Andrea Bolognani [Wed, 26 Oct 2016 14:27:05 +0000 (16:27 +0200)]
wireshark: Use ${exec_prefix} instead of ${prefix}

${exec_prefix} and ${prefix} point to the same directory in
most setups, but when that's not the case the former should
be used for architecture-dependent data such as shared objects,
which makes it the best fit for our Wireshark dissector.

While at it, change all uses of $(var) to ${var}: they are
absolutely identicaly as far as make's concerned, but autoconf
itself seems to prefer the latter form so we might as well
follow suit.

8 years agowireshark: Make fallback path construction more reliable
Andrea Bolognani [Thu, 27 Oct 2016 12:43:00 +0000 (14:43 +0200)]
wireshark: Make fallback path construction more reliable

We only need to strip $ws_prefix from $ws_plugindir if we've
retrieved it from pkg-config: if we're building it ourselves
from $libdir, we can just use it without further processing.

8 years agowireshark: Don't redefine ws_plugindir
Andrea Bolognani [Wed, 26 Oct 2016 14:06:18 +0000 (16:06 +0200)]
wireshark: Don't redefine ws_plugindir

autoconf already defines the variable for us, and prints out
a warning if we try to do it a second time. So let's not :)

8 years agoqemu: Fix build on RHEL-6
Jiri Denemark [Fri, 4 Nov 2016 12:16:44 +0000 (13:16 +0100)]
qemu: Fix build on RHEL-6

Commit c29e6d4805 cause build failure on RHEL-6:

../../src/qemu/qemu_capabilities.c: In function 'virQEMUCapsIsValid':
../../src/qemu/qemu_capabilities.c:4085: error: declaration of 'ctime'
shadows a global declaration [-Wshadow]
/usr/include/time.h:258: error: shadowed declaration is here [-Wshadow]

Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
8 years agovshReadlineParse: Remove unused variable
Michal Privoznik [Fri, 4 Nov 2016 08:07:04 +0000 (09:07 +0100)]
vshReadlineParse: Remove unused variable

After 06a7b1ff4 the @&opts_need_arg is not used anywhere. Well,
it is set but never read:

vsh.c: In function 'vshReadlineParse':
vsh.c:2658:14: warning: variable 'opts_need_arg' set but not used [-Wunused-but-set-variable]
     uint64_t opts_need_arg, opts_seen;
              ^~~~~~~~~~~~~

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
8 years agodocs: Add Qt Virtual machines manager and Qt Remote viewer
Alexander Vasilenko [Thu, 3 Nov 2016 12:44:20 +0000 (15:44 +0300)]
docs: Add Qt Virtual machines manager and Qt Remote viewer