]> xenbits.xensource.com Git - people/liuw/libxenctrl-split/libvirt.git/log
people/liuw/libxenctrl-split/libvirt.git
9 years agotests: Add subcores2 nodeinfo test
Andrea Bolognani [Mon, 27 Jul 2015 08:08:31 +0000 (10:08 +0200)]
tests: Add subcores2 nodeinfo test

This makes sure CPUs are counted correctly when some of the cores are
completely offline.

9 years agotests: Add subcores1 nodeinfo test
Andrea Bolognani [Mon, 27 Jul 2015 08:08:30 +0000 (10:08 +0200)]
tests: Add subcores1 nodeinfo test

This makes sure CPUs are counted correctly when using the default
configuration, that is, all primary threads are online and all
secondary threads are offline.

9 years agotests: Prepare for subcore tests
Shivaprasad G Bhat [Mon, 27 Jul 2015 08:08:29 +0000 (10:08 +0200)]
tests: Prepare for subcore tests

The nodeGetThreadsPerSubcore() function is mocked to return 8 for
ppc64 tests, which corresponds to the default subcore mode.

Update the expected output for the deconfigured-cpus nodeinfo
test to account for this change.

Signed-off-by: Shivaprasad G Bhat <sbhat@linux.vnet.ibm.com>
Signed-off-by: Andrea Bolognani <abologna@redhat.com>
9 years agonodeinfo: Fix output on PPC64 KVM hosts
Shivaprasad G Bhat [Thu, 30 Jul 2015 09:37:04 +0000 (11:37 +0200)]
nodeinfo: Fix output on PPC64 KVM hosts

The nodeinfo is reporting incorrect number of cpus and incorrect host
topology on PPC64 KVM hosts. The KVM hypervisor on PPC64 needs only
the primary thread in a core to be online, and the secondaries offlined.
While scheduling a guest in, the kvm scheduler wakes up the secondaries to
run in guest context.

The host scheduling of the guests happen at the core level(as only primary
thread is online). The kvm scheduler exploits as many threads of the core
as needed by guest. Further, starting POWER8, the processor allows splitting
a physical core into multiple subcores with 2 or 4 threads each. Again, only
the primary thread in a subcore is online in the host. The KVM-PPC
scheduler allows guests to exploit all the offline threads in the subcore,
by bringing them online when needed.
(Kernel patches on split-core http://www.spinics.net/lists/kvm-ppc/msg09121.html)

Recently with dynamic micro-threading changes in ppc-kvm, makes sure
to utilize all the offline cpus across guests, and across guests with
different cpu topologies.
(https://www.mail-archive.com/kvm@vger.kernel.org/msg115978.html)

Since the offline cpus are brought online in the guest context, it is safe
to count them as online. Nodeinfo today discounts these offline cpus from
cpu count/topology calclulation, and the nodeinfo output is not of any help
and the host appears overcommited when it is actually not.

The patch carefully counts those offline threads whose primary threads are
online. The host topology displayed by the nodeinfo is also fixed when the
host is in valid kvm state.

Signed-off-by: Shivaprasad G Bhat <sbhat@linux.vnet.ibm.com>
Signed-off-by: Andrea Bolognani <abologna@redhat.com>
9 years agorpc: Fix slow volume download (virsh vol-download)
Ossi Herrala [Mon, 20 Jul 2015 12:44:32 +0000 (12:44 +0000)]
rpc: Fix slow volume download (virsh vol-download)

Use I/O vector (iovec) instead of one huge memory buffer as suggested
in https://bugzilla.redhat.com/show_bug.cgi?id=1026137#c7. This avoids
doing memmove() to big buffers and performance doesn't degrade if
source (virNetClientStreamQueuePacket()) is faster than sink
(virNetClientStreamRecvPacket()).

Resolves: http://bugzilla.redhat.com/1026137

Signed-off-by: Martin Kletzander <mkletzan@redhat.com>
9 years agoThere is no virDomainFindBy{ID, Name, UUID} anymore
Cao jin [Wed, 29 Jul 2015 09:11:20 +0000 (17:11 +0800)]
There is no virDomainFindBy{ID, Name, UUID} anymore

s/virDomainFindBy/virDomainObjListFindBy/

Signed-off-by: Cao jin <caoj.fnst@cn.fujitsu.com>
9 years agoqemu: fix some api cannot work when disable cpuset in conf
Luyao Huang [Mon, 20 Jul 2015 09:18:37 +0000 (17:18 +0800)]
qemu: fix some api cannot work when disable cpuset in conf

If cpuset is disabled or not available, it libvirt must not use it.
Mainly for actions that do not need it and can use sched_setaffinity()
or numa_membind() instead, because they will fail without good reason.

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

Signed-off-by: Luyao Huang <lhuang@redhat.com>
9 years agoPost-release version bump to 1.2.19
Martin Kletzander [Mon, 3 Aug 2015 11:07:52 +0000 (13:07 +0200)]
Post-release version bump to 1.2.19

Signed-off-by: Martin Kletzander <mkletzan@redhat.com>
9 years agoFix a trailing space in spec file
Daniel Veillard [Mon, 3 Aug 2015 09:43:34 +0000 (17:43 +0800)]
Fix a trailing space in spec file

9 years agoRelease of libvirt-1.2.18
Daniel Veillard [Mon, 3 Aug 2015 09:36:39 +0000 (17:36 +0800)]
Release of libvirt-1.2.18

* docs/news.html.in libvirt.spec.in: update for release
* po/*.po*: regenerated

9 years agoqemu: Do not reset labels when migration fails
Jiri Denemark [Thu, 30 Jul 2015 14:42:43 +0000 (16:42 +0200)]
qemu: Do not reset labels when migration fails

When stopping a domain on the destination host after a failed migration,
we need to avoid reseting security labels since the domain is still
running on the source host. While we were correctly doing so in some
cases, there were still some paths which did this wrong.

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

Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
9 years agoqemu: Properly check for incoming migration job
Jiri Denemark [Thu, 30 Jul 2015 13:53:41 +0000 (15:53 +0200)]
qemu: Properly check for incoming migration job

In addition to checking the current asynchronous job
qemuMigrationJobIsActive reports an error if the current job does not
match the one we asked for. Let's just check the job directly since we
are not interested in the error in qemuProcessHandleMonitorEOF.

Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
9 years agoqemu: Reject migration with memory-hotplug if destination doesn't support it
Peter Krempa [Thu, 30 Jul 2015 13:27:07 +0000 (15:27 +0200)]
qemu: Reject migration with memory-hotplug if destination doesn't support it

If destination libvirt doesn't support memory hotplug since all the
support was introduced by adding new elements the destination would
attempt to start qemu with an invalid configuration. The worse part is
that qemu might hang in such situation.

Fix this by sending a required migration feature called 'memory-hotplug'
to the destination. If the destination doesn't recognize it it will fail
the migration.

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

9 years agoFix syntax-check: missing "%s"
Cédric Bosdonnat [Thu, 30 Jul 2015 09:10:48 +0000 (11:10 +0200)]
Fix syntax-check: missing "%s"

9 years agoLoad nbd module before running qemu-nbd
Cédric Bosdonnat [Mon, 20 Jul 2015 12:37:48 +0000 (14:37 +0200)]
Load nbd module before running qemu-nbd

So far qemu-nbd is run even if the nbd kernel module isn't loaded. This
leads to errors when the user starts his lxc container while libvirt
could easily load the nbd module automatically.

9 years agoqemu: Adjust VM id allocation
Erik Skultety [Tue, 28 Jul 2015 15:33:53 +0000 (17:33 +0200)]
qemu: Adjust VM id allocation

Our atomic increment (virAtomicIntInc) uses (if available) gcc
__sync_add_and_fetch builtin. In qemu driver though, we'd profit more
from __sync_fetch_and_add builtin. To keep it simplistic, this patch
adjusts qemu driver initialization rather than adding a new atomic
increment macro.

9 years agolxc: Don't accidentaly reset autostart flag in virLXCProcessCleanup
Peter Krempa [Tue, 28 Jul 2015 16:25:59 +0000 (18:25 +0200)]
lxc: Don't accidentaly reset autostart flag in virLXCProcessCleanup

virDomainDeleteConfig is meant to delete the persistent config and thus
it resets vm->autostart. Copy parts of qemuProcessRemoveDomainStatus to
a new helper to avoid using the incorrect function.

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

9 years agoremote: fix typo in remoteDomainOpenGraphicsFD
Daniel P. Berrange [Mon, 27 Jul 2015 09:29:59 +0000 (10:29 +0100)]
remote: fix typo in remoteDomainOpenGraphicsFD

The remoteDomainOpenGraphicsFD method was using the wrong RPC
arg struct remote_domain_open_graphics_args instead of
remote_domain_open_graphics_fd_args. Fortunately both structs
had identical contents so there was no functional bug, but to
avoid confusing future maintainers, we should fix it.

Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
9 years agoadmin: Tiny cleanups
Martin Kletzander [Wed, 22 Jul 2015 09:01:58 +0000 (11:01 +0200)]
admin: Tiny cleanups

First hunk changes the use of srcdir to top_srcdir so it complies with
other rules in the Makefile.  Second one removes the need of
remote_protocol.h in admin_protocol.h as it was suggested and worked in,
but this one line was missed apparently.  Last one just removes the
'remote' naming from admin protocol specification, just so it's cleaner.

Signed-off-by: Martin Kletzander <mkletzan@redhat.com>
9 years agoqemu: Check for iotune_max support properly
Martin Kletzander [Mon, 27 Jul 2015 06:04:06 +0000 (08:04 +0200)]
qemu: Check for iotune_max support properly

Commit d506a51aeb2a7a7b0c963f760e32b94376ea7173 meant to check for
QEMU_CAPS_DRIVE_IOTUNE_MAX, but checked for QEMU_CAPS_DRIVE_IOTUNE
instead.  That's clearly visible from the diff, but it got in.  Because
of that, we were supplying information unknown for QEMU if it wasn't new
enough and we couldn't even properly handle the error, leading to
"Unexpected error".  Also iops_size came at the same time with all the
other "_max" options, so check whether we're not setting that either if
QEMU_CAPS_DRIVE_IOTUNE_MAX is not supported.

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

Signed-off-by: Martin Kletzander <mkletzan@redhat.com>
9 years agotests: Finish rename of the long nodeinfo test case
Martin Kletzander [Mon, 27 Jul 2015 06:22:24 +0000 (08:22 +0200)]
tests: Finish rename of the long nodeinfo test case

Commit 2094d01e2f54e5774c0d0d380e83154b42ea65be forgot to rename two
more files.

Signed-off-by: Martin Kletzander <mkletzan@redhat.com>
9 years agoRenamed deconfigured-cpus to allow make dist
Daniel Veillard [Mon, 27 Jul 2015 02:17:05 +0000 (10:17 +0800)]
Renamed deconfigured-cpus to allow make dist

Simplest was just to rename that extra long name and move files in git
accordingly

9 years agoconf: add virDomainControllerDefNew()
Laine Stump [Thu, 25 Jun 2015 16:55:12 +0000 (12:55 -0400)]
conf: add virDomainControllerDefNew()

There are some non-0 default values in virDomainControllerDef (and
will soon be more) that are easier to not forget if the remembering is
done by a single initializer function (rather than inline code after
allocating the obejct with generic VIR_ALLOC().

9 years agoqemu: reorganize loop in qemuDomainAssignPCIAddresses
Laine Stump [Thu, 25 Jun 2015 16:02:32 +0000 (12:02 -0400)]
qemu: reorganize loop in qemuDomainAssignPCIAddresses

This loop occurs just after we've assured that all devices that
require a PCI device have been assigned and all necessary PCI
controllers have been added. It is the perfect place to add other
potentially auto-generated PCI controller attributes that are
dependent on the controller's PCI address (upcoming patch).

There is a convenient loop through all controllers at the end of the
function, but the patch to add new functionality will be cleaner if we
first rearrange that loop a bit.

Note that the loop originally was accessing info.addr.pci.bus prior to
determining that the pci part of the object was valid. This isn't
dangerous in any way, but seemed a bit ugly, so I fixed it.

9 years agoconf: pay attention to bus minSlot/maxSlot when autoassigning PCI addresses
Laine Stump [Thu, 16 Jul 2015 20:28:47 +0000 (16:28 -0400)]
conf: pay attention to bus minSlot/maxSlot when autoassigning PCI addresses

The function that auto-assigns PCI addresses was written with the
hardcoded assumptions that any PCI bus would have slots available
starting at 1 and ending at 31. This isn't true for many types of
controllers (some have a single slot/port at 0, some have slots/ports
from 0 to 31). This patch updates that function to remove the
hardcoded assumptions. It will properly find/assign addresses for
devices that can only connect to pcie-(root|downstream)-port (which
have minSlot/maxSlot of 0/0) or a pcie-switch-upstream-port (0/31).

It still will not auto-create a new bus of the proper kind for these
connections when one doesn't exist, that task is for another day.

9 years agotests: add vol-qcow2-zerocapacity test to storagevolxml2argvtest
Chris J Arges [Tue, 30 Jun 2015 20:19:04 +0000 (15:19 -0500)]
tests: add vol-qcow2-zerocapacity test to storagevolxml2argvtest

Add a testcase for the previous change to ensure zero capacity volumes can be
defined without a backing store.

Signed-off-by: Chris J Arges <chris.j.arges@canonical.com>
9 years agostorage: allow zero capacity with non-backing file to be created
Chris J Arges [Tue, 30 Jun 2015 20:19:03 +0000 (15:19 -0500)]
storage: allow zero capacity with non-backing file to be created

In commit 155ca616e, a change was introduced that no longer allowed defining
volumes via XML with a capacity of '0'. Because we check for info.size_arg
to be non-zero, this use-case fails. This patch allows info.size_arg to be
zero if no backing store is specified.

Signed-off-by: Chris J Arges <chris.j.arges@canonical.com>
9 years agonodeinfo: Check for SYSFS_INFINIBAND_DIR before open
John Ferlan [Thu, 23 Jul 2015 18:33:32 +0000 (14:33 -0400)]
nodeinfo: Check for SYSFS_INFINIBAND_DIR before open

Commit id 'ac3ed2085' causes 'virsh nodedev-list --cap net' to fail
on any system without SYSFS_INFINIBAND_DIR (/sys/class/infiniband).

Rather than assume it's there and fail on the attempt to open the
non-existent directory, check if it's there - if not, return
success and move on. Also fix caller to check < 0 upon return.

As reported by Suren Hajyan <shajyan@redhat.com> from run of unit tests

9 years agofix typo in qemu_monitor
Cao jin [Fri, 24 Jul 2015 11:53:36 +0000 (19:53 +0800)]
fix typo in qemu_monitor

Signed-off-by: Cao jin <caoj.fnst@cn.fujitsu.com>
9 years agoRevert "qemu: Use heads parameter for QXL driver"
Martin Kletzander [Wed, 22 Jul 2015 07:59:48 +0000 (09:59 +0200)]
Revert "qemu: Use heads parameter for QXL driver"

This reverts commit 7b401c3bdacdf8367a0070e625d73eafb802045d.

Until libvirt is able to differentiate whether heads='1' is just a
leftover from previous libvirt or whether that's added by user on
purpose and also whether the domain was started with the support for
qxl's max_outputs, we cannot incorporate this patch into the tree
due to compatibility reasons.

Signed-off-by: Martin Kletzander <mkletzan@redhat.com>
9 years agotest: introduce a function in test driver to check get vcpupin info
Luyao Huang [Tue, 14 Jul 2015 13:10:50 +0000 (21:10 +0800)]
test: introduce a function in test driver to check get vcpupin info

As there is a regression in use vcpupin get info, introduce a new function
to test the virsh client.

Signed-off-by: Luyao Huang <lhuang@redhat.com>
9 years agoconf: reorganize virNetworkDHCPDefParseXML
Laine Stump [Thu, 21 May 2015 19:51:02 +0000 (15:51 -0400)]
conf: reorganize virNetworkDHCPDefParseXML

This makes the range and static host array management in
virNetworkDHCPDefParseXML() more similar to what is done in
virNetworkDefUpdateIPDHCPRange() and virNetworkDefUpdateIPDHCPHost() -
they use VIR_APPEND_ELEMENT rather than a combination of
VIR_REALLOC_N() and separate incrementing of the array size.

The one functional change here is that a memory leak of the contents
of the last (unsuccessful) virNetworkDHCPHostDef was previously leaked
in certain failure conditions, but it is now properly cleaned up.

9 years agonodeinfo: Check for errors when reading core_id
Andrea Bolognani [Thu, 23 Jul 2015 09:47:05 +0000 (11:47 +0200)]
nodeinfo: Check for errors when reading core_id

9 years agodocs: bhyve: document clock configuration
Roman Bogorodskiy [Sun, 19 Jul 2015 08:20:36 +0000 (11:20 +0300)]
docs: bhyve: document clock configuration

9 years agobhyve: add UTC clock support
Roman Bogorodskiy [Sun, 19 Jul 2015 08:20:35 +0000 (11:20 +0300)]
bhyve: add UTC clock support

Bhyve as of r279225 (FreeBSD -CURRENT) or r284894 (FreeBSD 10-STABLE)
supports using UTC time offset via the '-u' argument to bhyve(8). By
default it's still using localtime.

Make the bhyve driver use UTC clock if it's requested by specifying
<clock offset='utc'> in domain XML and if the bhyve(8) binary supports
the '-u' flag.

9 years agonetdev: fix build on FreeBSD
Roman Bogorodskiy [Wed, 22 Jul 2015 15:24:34 +0000 (18:24 +0300)]
netdev: fix build on FreeBSD

Commit ac3ed20 breaks build on FreeBSD with:

  CC       util/libvirt_util_la-virnetdev.lo
util/virnetdev.c:2967:1: error: unused function 'virNetDevRDMAFeature' [-Werror,-Wunused-function]
virNetDevRDMAFeature(const char *ifname,
^

So hide virNetDevRDMAFeature function under the #ifdef 'SIOCETHTOOL'
and 'HAVE_STRUCT_IFREQ' section.

Pushed under the build breaker rule.

9 years agoconfigure: clarify rationale for checking pkcheck
Daniel P. Berrange [Tue, 21 Jul 2015 16:52:03 +0000 (17:52 +0100)]
configure: clarify rationale for checking pkcheck

We don't need pkcheck binary, but we must detect it in order
to see if we're preferring polkit-1 over polkit-0 when both
are installed. We should also check $with_dbus to see if we
have dbus-devel available, as that's required to talk to
polkit-1.

Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
9 years agoqemu: fix the error cover issue in SetMemoryParameters
Luyao Huang [Wed, 22 Jul 2015 07:35:14 +0000 (15:35 +0800)]
qemu: fix the error cover issue in SetMemoryParameters

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

We won't return the errno after commit 0d7f45ae, and
the more clearly error will be set in the code in vircgroup*.
Also We will always report error "Operation not permitted",
because the return is -1.

Signed-off-by: Luyao Huang <lhuang@redhat.com>
9 years agonodeinfo: Calculate present and online CPUs only once
Andrea Bolognani [Mon, 20 Jul 2015 16:37:30 +0000 (18:37 +0200)]
nodeinfo: Calculate present and online CPUs only once

Move the calls to the respective functions from virNodeParseNode(),
which is executed once for every NUMA node, to
linuxNodeInfoCPUPopulate(), which is executed just once per host.

9 years agonodeinfo: Use a bitmap to keep track of node CPUs
Andrea Bolognani [Mon, 20 Jul 2015 16:37:29 +0000 (18:37 +0200)]
nodeinfo: Use a bitmap to keep track of node CPUs

Keep track of what CPUs belong to the current node while walking
through the sysfs node entry, so we don't need to do it a second
time immediately afterwards.

This also allows us to loop through all CPUs that are part of a
node in guaranteed ascending order, which is something that is
required for some upcoming changes.

9 years agonodeinfo: Use nodeGetOnlineCPUBitmap() when parsing node
Andrea Bolognani [Mon, 20 Jul 2015 16:37:28 +0000 (18:37 +0200)]
nodeinfo: Use nodeGetOnlineCPUBitmap() when parsing node

No need to look up the online status of each CPU separately when we
can get all the information in one go.

9 years agonodeinfo: Phase out cpu_set_t usage
Andrea Bolognani [Mon, 20 Jul 2015 16:37:27 +0000 (18:37 +0200)]
nodeinfo: Phase out cpu_set_t usage

Swap out all instances of cpu_set_t and replace them with virBitmap,
which some of the code was already using anyway.

The changes are pretty mechanical, with one notable exception: an
assumption has been added on the max value we can run into while
reading either socket_it or core_id.

While this specific assumption was not in place before, we were
using cpu_set_t improperly by not making sure not to set any bit
past CPU_SETSIZE or explicitly allocating bigger bitmaps; in fact
the default size of a cpu_set_t, 1024, is way too low to run our
testsuite, which includes core_id values in the 2000s.

9 years agonodeinfo: Rename nodeGetCPUBitmap() to nodeGetOnlineCPUBitmap()
Andrea Bolognani [Mon, 20 Jul 2015 16:37:26 +0000 (18:37 +0200)]
nodeinfo: Rename nodeGetCPUBitmap() to nodeGetOnlineCPUBitmap()

The new name makes it clear that the returned bitmap contains the
information about which CPUs are online, not eg. which CPUs are
present.

No behavioral change.

9 years agonodeinfo: Remove out parameter from nodeGetCPUBitmap()
Andrea Bolognani [Mon, 20 Jul 2015 16:37:25 +0000 (18:37 +0200)]
nodeinfo: Remove out parameter from nodeGetCPUBitmap()

Not all users of this API will need the size of the returned
bitmap; those who do can simply call virBitmapSize() themselves.

9 years agonodeinfo: Add old kernel compatibility to nodeGetPresentCPUBitmap()
Andrea Bolognani [Mon, 20 Jul 2015 16:37:24 +0000 (18:37 +0200)]
nodeinfo: Add old kernel compatibility to nodeGetPresentCPUBitmap()

If the cpu/present file is not available, we assume that the kernel
is too old to support non-consecutive CPU ids and return a bitmap
with all the bits set to represent this fact. This assumption is
already exploited in nodeGetCPUCount().

This means users of this API can expect the information to always
be available unless an error has occurred, and no longer need to
treat the NULL return value as a special case.

The error message has been updated as well.

9 years agonodeinfo: Rename linuxParseCPUmax() to linuxParseCPUCount()
Andrea Bolognani [Mon, 20 Jul 2015 16:37:23 +0000 (18:37 +0200)]
nodeinfo: Rename linuxParseCPUmax() to linuxParseCPUCount()

The original name was confusing because the function returns the number
of CPUs, not the maximum CPU id. The comment above the function has
been updated to reflect this.

No behavioral changes.

9 years agonodeinfo: Introduce linuxGetCPUOnlinePath()
Andrea Bolognani [Mon, 20 Jul 2015 16:37:22 +0000 (18:37 +0200)]
nodeinfo: Introduce linuxGetCPUOnlinePath()

9 years agonodeinfo: Introduce linuxGetCPUGlobalPath()
Andrea Bolognani [Mon, 20 Jul 2015 16:37:21 +0000 (18:37 +0200)]
nodeinfo: Introduce linuxGetCPUGlobalPath()

This is just a more generic version of linuxGetCPUPresentPath(),
which is now implemented by calling the new function appropriately.

9 years agonodeinfo: Fix nodeGetCPUBitmap()'s fallback code path
Andrea Bolognani [Fri, 17 Jul 2015 16:12:50 +0000 (18:12 +0200)]
nodeinfo: Fix nodeGetCPUBitmap()'s fallback code path

During the recent refactoring/cleanups, a bug has been introduced
that caused all CPUs to be reported as online unless the sysfs
cpu/present file was available.

This commit fixes the fallback code path by building the directory
path passed to virNodeGetCpuValue() correctly.

9 years agonodeinfo: Add nodeGetPresentCPUBitmap() to libvirt_private.syms
Andrea Bolognani [Fri, 17 Jul 2015 16:12:49 +0000 (18:12 +0200)]
nodeinfo: Add nodeGetPresentCPUBitmap() to libvirt_private.syms

9 years agotests: Restore links in deconfigured-cpus nodeinfo test
Andrea Bolognani [Fri, 17 Jul 2015 16:12:48 +0000 (18:12 +0200)]
tests: Restore links in deconfigured-cpus nodeinfo test

When cleaning up the data (taken from a running system) for inclusion
I went a little too far and deleted a bunch of links that should have
been left alone. The test worked despite this because it was going
through a fallback code path.

A few other files are affected as well: again, the data is taken from
a running system, so even thought we would probably be okay if we
just added the links, aligning everything is definitely safer.

9 years agocgroup: Drop resource partition from virSystemdMakeScopeName
Peter Krempa [Thu, 16 Jul 2015 13:35:05 +0000 (15:35 +0200)]
cgroup: Drop resource partition from virSystemdMakeScopeName

The scope name, even according to our docs is
"machine-$DRIVER\x2d$VMNAME.scope" virSystemdMakeScopeName would use the
resource partition name instead of "machine-" if it was specified thus
creating invalid scope paths.

This makes libvirt drop cgroups for a VM that uses custom resource
partition upon reconnecting since the detected scope name would not
match the expected name generated by virSystemdMakeScopeName.

The error is exposed by the following log entry:

debug : virCgroupValidateMachineGroup:302 : Name 'machine-qemu\x2dtestvm.scope' for controller 'cpu' does not match 'testvm', 'testvm.libvirt-qemu' or 'machine-test-qemu\x2dtestvm.scope'

for a "/machine/test" resource and "testvm" vm.

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

9 years agospec: Fix polkit dep on F23
Cole Robinson [Tue, 14 Jul 2015 18:42:28 +0000 (14:42 -0400)]
spec: Fix polkit dep on F23

As of fedora polkit-0.113-2, polkit-devel only pulls in polkit-libs, not
full polkit, but we need the latter for pkcheck otherwise our configure
test fails.

9 years agovirsh: Refactor block job waiting in cmdBlockCopy
Peter Krempa [Mon, 13 Jul 2015 15:04:49 +0000 (17:04 +0200)]
virsh: Refactor block job waiting in cmdBlockCopy

Similarly to the refactor of cmdBlockCommit in a previous commit this
does the same change for cmdBlockCopy.

9 years agovirsh: Refactor block job waiting in cmdBlockCommit
Peter Krempa [Mon, 13 Jul 2015 15:04:49 +0000 (17:04 +0200)]
virsh: Refactor block job waiting in cmdBlockCommit

Reuse the vshBlockJobWait infrastructure to refactor cmdBlockCommit to
use the common code. This additionally fixes a bug when working with
new qemus, where when doing an active commit with --pivot the pivoting
would fail, since qemu reaches 100% completion but the job doesn't
switch to synchronized phase right away.

9 years agovirsh: Refactor block job waiting in cmdBlockPull
Peter Krempa [Mon, 13 Jul 2015 15:04:49 +0000 (17:04 +0200)]
virsh: Refactor block job waiting in cmdBlockPull

Introduce helper function that will provide logic for waiting for block
job completion so the 3 open coded places can be unified and improved.

This patch introduces the whole logic and uses it to fix
cmdBlockJobPull. The vshBlockJobWait function provides common logic for
block job waiting that should be robust enough to work across all
previous versions of libvirt. Since virsh allows passing user-provided
strings as paths of block devices we can't reliably use block job events
for detection of block job states so the function contains a great deal
of fallback logic.

9 years agoqemu: Update state of block job to READY only if it actually is ready
Peter Krempa [Wed, 15 Jul 2015 13:11:02 +0000 (15:11 +0200)]
qemu: Update state of block job to READY only if it actually is ready

Few parts of the code looked at the current progress of and assumed that
a two phase blockjob is in the _READY state as soon as the progress
reached 100% (info.cur == info.end). In current versions of qemu this
assumption is invalid and qemu exposes a new flag 'ready' in the
query-block-jobs output that is set to true if the job is actually
finished.

This patch adds internal data handling for reading the 'ready' flag and
acting appropriately as long as the flag is present.

While this still doesn't fix the virsh client problem with two phase
block jobs and the --pivot option, it at least improves the error
message:

$ virsh blockcommit  --wait --verbose vm vda  --base vda[1] --active --pivot
Block commit: [100 %]error: failed to pivot job for disk vda
error: internal error: unable to execute QEMU command 'block-job-complete': The active block job for device 'drive-virtio-disk0' cannot be completed

to

$ virsh blockcommit  --wait --verbose VM vda  --base vda[1] --active --pivot
Block commit: [100 %]error: failed to pivot job for disk vda
error: block copy still active: disk 'vda' not ready for pivot yet

9 years agovirsh: Refactor argument handling in cmdBlockPull
Peter Krempa [Tue, 14 Jul 2015 10:56:27 +0000 (12:56 +0200)]
virsh: Refactor argument handling in cmdBlockPull

Put all argument parsing together and refactor the argument checking
code.

9 years agovirsh: Refactor argument handling in cmdBlockCopy
Peter Krempa [Tue, 14 Jul 2015 10:56:27 +0000 (12:56 +0200)]
virsh: Refactor argument handling in cmdBlockCopy

Put all argument parsing together and refactor the argument checking
code.

9 years agovirsh: Refactor argument checking in cmdBlockCommit
Peter Krempa [Mon, 13 Jul 2015 14:23:59 +0000 (16:23 +0200)]
virsh: Refactor argument checking in cmdBlockCommit

Use the VSH_EXCLUSIVE_OPTIONS to exclude combinations of --pivot and
--keep-overlay and refactor the enforcing of the --wait option and other
flags that imply --wait.

9 years agovirsh: Kill blockJobImpl by moving the final impl into cmdBlockCommit
Peter Krempa [Thu, 30 Apr 2015 14:31:36 +0000 (16:31 +0200)]
virsh: Kill blockJobImpl by moving the final impl into cmdBlockCommit

Final cleanup to get rid of the hub function.

9 years agovirsh: Split out block pull implementation from blockJobImpl
Peter Krempa [Thu, 30 Apr 2015 14:22:04 +0000 (16:22 +0200)]
virsh: Split out block pull implementation from blockJobImpl

9 years agovirsh: block job: separate abort from blockJobImpl
Peter Krempa [Thu, 2 Apr 2015 12:55:09 +0000 (14:55 +0200)]
virsh: block job: separate abort from blockJobImpl

9 years agovirsh: blockjob: Split out vshBlockJobSetSpeed from blockJobImpl
Peter Krempa [Wed, 1 Apr 2015 14:45:19 +0000 (16:45 +0200)]
virsh: blockjob: Split out vshBlockJobSetSpeed from blockJobImpl

9 years agovirsh: cmdBlockJob: Switch to declarative flag interlocking
Peter Krempa [Wed, 1 Apr 2015 13:05:33 +0000 (15:05 +0200)]
virsh: cmdBlockJob: Switch to declarative flag interlocking

Use the VSH_EXCLUSIVE_OPTIONS_VAR to interlock incompatible options.
Since a variable named 'abort' would conflict with older compilers use
VSH_EXCLUSIVE_OPTIONS for the --abort option.

9 years agovirsh: blockjob: Extract block job info code into a separate function
Peter Krempa [Wed, 1 Apr 2015 12:54:10 +0000 (14:54 +0200)]
virsh: blockjob: Extract block job info code into a separate function

cmdBlockJob will be converted to a hub that will call into the
individual executor functions.

9 years agonodedev: add RDMA and tx-udp_tnl-segmentation NIC capabilities
Moshe Levi [Sun, 19 Jul 2015 10:11:07 +0000 (13:11 +0300)]
nodedev: add RDMA and tx-udp_tnl-segmentation NIC capabilities

Adding functionality to libvirt that will allow
it query the interface for the availability of RDMA and
tx-udp_tnl-segmentation Offloading NIC capabilities

Here is an example of the feature XML definition:

<device>
<name>net_eth4_90_e2_ba_5e_a5_45</name>
  <path>/sys/devices/pci0000:00/0000:00:03.0/0000:08:00.1/net/eth4</path>
  <parent>pci_0000_08_00_1</parent>
  <capability type='net'>
    <interface>eth4</interface>
    <address>90:e2:ba:5e:a5:45</address>
    <link speed='10000' state='up'/>
    <feature name='rx'/>
    <feature name='tx'/>
    <feature name='sg'/>
    <feature name='tso'/>
    <feature name='gso'/>
    <feature name='gro'/>
    <feature name='rxvlan'/>
    <feature name='txvlan'/>
    <feature name='rxhash'/>
    <feature name='rdma'/>
    <feature name='txudptnl'/>
    <capability type='80203'/>
  </capability>
</device>

9 years agonodeinfo: fix build on FreeBSD
Roman Bogorodskiy [Fri, 17 Jul 2015 17:07:45 +0000 (20:07 +0300)]
nodeinfo: fix build on FreeBSD

Currently, build fails on FreeBSD with:

  CC       libvirt_driver_la-nodeinfo.lo
nodeinfo.c:1941:56: error: use of undeclared identifier 'SYSFS_SYSTEM_PATH'
    const char *prefix = sysfs_prefix ? sysfs_prefix : SYSFS_SYSTEM_PATH;
                                                       ^
1 error generated.

This is caused by commit b97b3048 that added sysfs_prefix to
nodeCapsInitNUMA and used SYSFS_CPU_PATH.

Fix it by unconditionally defining SYSFS_CPU_PATH instead of defining it
under #ifdef __linux__.

9 years agoqemu: Reject updating unsupported disk information
Martin Kletzander [Thu, 9 Jul 2015 16:28:38 +0000 (18:28 +0200)]
qemu: Reject updating unsupported disk information

If one calls update-device with information that is not updatable,
libvirt reports success even though no data were updated.  The example
used in the bug linked below uses updating device with <boot order='2'/>
which, in my opinion, is a valid thing to request from user's
perspective.  Mainly since we properly error out if user wants to update
such data on a network device for example.

And since there are many things that might happen (update-device on disk
basically knows just how to change removable media), check for what's
changing and moreover, since the function might be usable in other
drivers (updating only disk path is a valid possibility) let's abstract
it for any two disks.

We can't possibly check for everything since for many fields our code
does not properly differentiate between default and unspecified values.
Even though this could be changed, I don't feel like it's worth the
complexity so it's not the aim of this patch.

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

9 years agoEscape left brace as new perl suggests
Martin Kletzander [Tue, 14 Jul 2015 12:14:30 +0000 (14:14 +0200)]
Escape left brace as new perl suggests

After upgrade to perl-5.22.0, it started complaining about one of our
scripts.  The thing is that even though it works, it wants all curly
brackets escaped properly.  The change is not functional, it merely gets
rid of the following error:

  Unescaped left brace in regex is deprecated, passed through in regex;
  marked by <-- HERE in m/^enum { <-- HERE / at -e line 3.

There is one more error like this that I'm getting, but it is because of
GNU automake bug #21001:

  https://debbugs.gnu.org/cgi/bugreport.cgi?bug=21001

Signed-off-by: Martin Kletzander <mkletzan@redhat.com>
9 years agoqemu: Use heads parameter for QXL driver
Frediano Ziglio [Fri, 17 Jul 2015 08:29:44 +0000 (09:29 +0100)]
qemu: Use heads parameter for QXL driver

Allows to specify maximum number of head to QXL driver.

Actually can be a compatiblity problem as heads in the XML configuration
was set by default to '1'.

Signed-off-by: Frediano Ziglio <fziglio@redhat.com>
9 years agostorage: Fix pool building when directory already exists
Christophe Fergeau [Fri, 17 Jul 2015 08:02:20 +0000 (10:02 +0200)]
storage: Fix pool building when directory already exists

Currently, when trying to virsh pool-define/virsh pool-build a new
'dir' pool, if the target directory already exists, virsh
pool-build/virStoragePoolBuild will error out. This is a change of
behaviour compared to eg libvirt 1.2.13

This is caused by the wrong type being used for the dir_create_flags
variable in virStorageBackendFileSystemBuild , it's defined as a bool
but is used as a flag bit field so should be unsigned int (this matches
the type virDirCreate expects for this variable).

This should fix https://bugzilla.gnome.org/show_bug.cgi?id=752417 (GNOME
Boxes) and https://bugzilla.redhat.com/show_bug.cgi?id=1244080
(downstream virt-manager).

9 years agorpc: ensure daemon is spawn even if dead socket exists
Daniel P. Berrange [Fri, 3 Jul 2015 15:51:56 +0000 (16:51 +0100)]
rpc: ensure daemon is spawn even if dead socket exists

The auto-spawn code would originally attempt to spawn the
daemon for both ENOENT and ECONNREFUSED errors from connect().
The various refactorings eventually lost this so we only
spawn the daemon on ENOENT. The result is if the daemon exits
uncleanly, so that the socket is left in the filesystem, we
will never be able to auto-spawn the daemon again.

9 years agoviraccessperm.h: Fix some typos
Michal Privoznik [Fri, 17 Jul 2015 07:41:31 +0000 (09:41 +0200)]
viraccessperm.h: Fix some typos

Like s/authoriation/authorization/ and s/requries/requires/

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
9 years agodocs: Document how libvirt handles companion controllers
Martin Kletzander [Mon, 13 Jul 2015 13:51:25 +0000 (15:51 +0200)]
docs: Document how libvirt handles companion controllers

The information on companion controllers we give in our documentation is
rather sparse.  For example, it looks like any controller can be used as
a companion one.  Also, when using ich9-uhci2, for example, we are able
to set some sensible defaults, but it might get confusing for the user
as we don't do that for all controller models.

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

Signed-off-by: Martin Kletzander <mkletzan@redhat.com>
9 years agorbd: Return error from rbd_create for message processing
John Ferlan [Thu, 16 Jul 2015 16:28:58 +0000 (12:28 -0400)]
rbd: Return error from rbd_create for message processing

Resolving an error reporting bug introduced by commit id '761491e' which
just took the return of virStorageBackendRBDCreateImage and used it as
the basis for the message generated. This would generate EPERM regardless
of error seen.

9 years agorbd: Use RBD format 2 by default when creating images.
Wido den Hollander [Tue, 14 Jul 2015 08:15:26 +0000 (10:15 +0200)]
rbd: Use RBD format 2 by default when creating images.

We used to look at the librbd code version and depending on that
we would invoke rbd_create3() or rbd_create().

Since librbd version 0.67.9 we can however tell RBD that it should
create rbd format 2 images even if we invoke rbd_create().

The less options we pass to librbd, the more we can lean on the sane
defaults it uses.

For rbd_create3() we had things like the stripe count and unit hardcoded
in libvirt and that might cause problems down the road.

Signed-off-by: Wido den Hollander <wido@widodh.nl>
9 years agovirsh: Don't output node frequency if unknown
Martin Kletzander [Fri, 10 Jul 2015 09:05:07 +0000 (11:05 +0200)]
virsh: Don't output node frequency if unknown

Commit ed8155eafbff5c5ca0bdfe84a8388f58b718c2f9 documented that
mhz field in virNodeInfo might be 0 if the frequency is unknown.  Modify
virsh to know about that.

Signed-off-by: Martin Kletzander <mkletzan@redhat.com>
9 years agoqemu: Test for virtio-9p-ccw support
Boris Fiuczynski [Tue, 7 Jul 2015 15:30:43 +0000 (17:30 +0200)]
qemu: Test for virtio-9p-ccw support

This patch adds a test for the qemu command line generation.

Signed-off-by: Boris Fiuczynski <fiuczy@linux.vnet.ibm.com>
Reviewed-by: Jason J. Herne <jjherne@us.ibm.com>
Reviewed-by: Stefan Zimmermann <stzi@linux.vnet.ibm.com>
9 years agoqemu: Make virtio-9p-ccw the default for s390-ccw-virtio machines
Boris Fiuczynski [Tue, 7 Jul 2015 15:30:42 +0000 (17:30 +0200)]
qemu: Make virtio-9p-ccw the default for s390-ccw-virtio machines

For s390-ccw-virtio machines the default bus type is set to ccw.
Specifing an address element allows to override the default.

Signed-off-by: Boris Fiuczynski <fiuczy@linux.vnet.ibm.com>
Reviewed-by: Jason J. Herne <jjherne@us.ibm.com>
Reviewed-by: Stefan Zimmermann <stzi@linux.vnet.ibm.com>
9 years agoqemu: Support for virtio-9p-ccw
Boris Fiuczynski [Tue, 7 Jul 2015 15:30:41 +0000 (17:30 +0200)]
qemu: Support for virtio-9p-ccw

Adding the recently in qemu added 9pfs support for virtio-ccw.

Signed-off-by: Boris Fiuczynski <fiuczy@linux.vnet.ibm.com>
Reviewed-by: Jason J. Herne <jjherne@us.ibm.com>
Reviewed-by: Stefan Zimmermann <stzi@linux.vnet.ibm.com>
9 years agodaemonRunStateInit: Fix a typo on a comment
Michal Privoznik [Wed, 15 Jul 2015 12:25:30 +0000 (14:25 +0200)]
daemonRunStateInit: Fix a typo on a comment

s/priviledged/privileged/

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
9 years agovirsh: Teach cmdFreepages to work with lxc driver
Michal Privoznik [Thu, 2 Jul 2015 08:21:50 +0000 (10:21 +0200)]
virsh: Teach cmdFreepages to work with lxc driver

Some drivers don't expose available huge page sizes in the
capabilities XML. For instance, LXC driver is one of those.
This has a downside that when virsh is trying to get
aggregated info on free pages per all NUMA nodes, it fails.
The problem is that the virNodeGetFreePages() API expects
caller to pass an array of page sizes he is interested in.
In virsh, this array is filled from the capabilities from
'/capabilities/host/cpu/pages' XPath. As said, in LXC
there's no such XPath and therefore virsh fails currently.
But hey, we can fallback: the page sizes are exposed under
'/capabilities/host/topology/cells/cell/pages'. The page
size can be collected from there, and voilà the command
works again. But now we must make sure that there are no
duplicates in the array passed to the public API. Otherwise
we won't get as beautiful output as we are getting now.

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
9 years agocmdVcpuPin: Remove dead code
Michal Privoznik [Tue, 14 Jul 2015 14:23:26 +0000 (16:23 +0200)]
cmdVcpuPin: Remove dead code

There's this condition:

flags & VIR_DOMAIN_AFFECT_CURRENT && virDomainIsActive(dom)

which can never be true since VIR_DOMAIN_AFFECT_CURRENT has hardcoded
value of zero. Therefore virDomainIsActive() is a dead code. However,
the condition could make sense if it is rewritten as the following:

!(flags & VIR_DOMAIN_AFFECT_CONFIG) && virDomainIsActive(dom)

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
9 years agoqemuMigrationRun: Don't leak @fd
Michal Privoznik [Tue, 14 Jul 2015 13:42:50 +0000 (15:42 +0200)]
qemuMigrationRun: Don't leak @fd

If we are migrating to an UNIX socket, we accept() a connection
from qemu and use that FD to set up a tunnel. However, the FD is
not closed as often as it should be.

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
9 years agolxc: wait for nbd device to be up to get its PIDs
Cédric Bosdonnat [Wed, 15 Jul 2015 08:13:21 +0000 (10:13 +0200)]
lxc: wait for nbd device to be up to get its PIDs

The nbd device pid file doesn't appear immediately after starting
qemu-nbd: adding a small loop to wait for it before getting it's
processes PIDs.

9 years agoFix qemu-nbd cleanup crashes
Cédric Bosdonnat [Wed, 15 Jul 2015 07:58:18 +0000 (09:58 +0200)]
Fix qemu-nbd cleanup crashes

The virLXCControllerAppendNBDPids function didn't properly initialize
pids and npids. In case of failure it was crashing when freeing those.

9 years agonodeinfo: Formatting changes
Andrea Bolognani [Tue, 14 Jul 2015 09:40:14 +0000 (11:40 +0200)]
nodeinfo: Formatting changes

9 years agonodeinfo: Make sysfs_prefix usage more consistent
Andrea Bolognani [Tue, 14 Jul 2015 09:40:13 +0000 (11:40 +0200)]
nodeinfo: Make sysfs_prefix usage more consistent

Make sure sysfs_prefix, when present, is always the first argument
to a function; don't use a different name to refer to it; check
whether it is NULL, and hence SYSFS_SYSTEM_PATH should be used, only
when using it directly and not just passing it down to another
function; always pass down the same value we've been passed when
calling another function.

9 years agoqemu: process: Improve update of maximum balloon state at startup
Peter Krempa [Tue, 30 Jun 2015 14:31:24 +0000 (16:31 +0200)]
qemu: process: Improve update of maximum balloon state at startup

In commit 641a145d73fdc3dd9350fd57b3d3247abf101c05 I've added code that
resets the balloon memory value to full size prior to resuming the vCPUs
since the size certainly was not reduced at that point.

Since qemuProcessStart is used also in code paths with already booted
up guests (migration, save/restore) the assumption is not entirely true
since the guest might already been running before.

This patch adds a function that queries the monitor rather than using
the full size since a balloon event would not be reissued in case we are
recovering a saved migration state.

Additionally the new function is used also when reconnecting to a VM
after libvirtd restart since we might have missed a few balloon events
while libvirtd was not running.

9 years agoqemuDomainSetNumaParamsLive: Check for NUMA mode more wisely
Michal Privoznik [Mon, 13 Jul 2015 16:11:33 +0000 (18:11 +0200)]
qemuDomainSetNumaParamsLive: Check for NUMA mode more wisely

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

In one of my previous ptaches (bcd9a564) I've tried to fix the problem
that we blindly assumed strict NUMA mode for guests. This led to
several problems like us pinning a domain onto a nodeset via libnuma
among with CGroups. Once the nodeset was changed by user, well, it did
not result in desired effect. See the original commit for more info.
But, the commit I wrote had a bug: when NUMA parameters are changed on
a running domain we require domain to be strictly pinned onto a
nodeset. Due to a typo a condition was mis-evaluated.

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
9 years agonetwork: Add another collision check into networkCheckRouteCollision
Martin Kletzander [Thu, 9 Jul 2015 13:53:25 +0000 (15:53 +0200)]
network: Add another collision check into networkCheckRouteCollision

The comment above that function says: "This function can be a lot more
exhaustive, ...", so let's be.

Check for collisions between routes in the system and static routes
being added explicitly from the <route/> element of the network XML.

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

Signed-off-by: Martin Kletzander <mkletzan@redhat.com>
9 years agoconf: Add getter for network routes
Martin Kletzander [Thu, 9 Jul 2015 13:50:41 +0000 (15:50 +0200)]
conf: Add getter for network routes

Add virNetworkDefGetRouteByIndex() similarly to
virNetworkDefGetIpByIndex(), but for routes.

Signed-off-by: Martin Kletzander <mkletzan@redhat.com>
9 years agotests: Add nodeinfo test for non-present CPUs
Andrea Bolognani [Mon, 13 Jul 2015 16:37:37 +0000 (18:37 +0200)]
tests: Add nodeinfo test for non-present CPUs

Some of the possible CPUs in a system might not be present, eg. they
might be defective or might have been deconfigured from the ASM console
in a Power system. Due to this fact, Linux keeps track of what CPUs are
possible and what are present separately.

This test uses the data from a system where not all the possible CPUs
are present to make sure libvirt handles this situation correctly.

9 years agonodeinfo: fix to parse present cpus rather than possible cpus
Kothapally Madhu Pavan [Fri, 26 Jun 2015 22:27:29 +0000 (03:57 +0530)]
nodeinfo: fix to parse present cpus rather than possible cpus

This patch resolves a situation where a core is defective and is not
in the present mask during boot. Optionally a host can have empty sockets
could be brought online if the socket is added. In this case the present
mask contains the cpu's that are actually there in the sockets even though
they might be offline for some reason. This patch excludes the cpu's that
are offline because the socket is defective/empty by checking the present
mask before reading the cpu directory. Otherwise, the nodeinfo on such
hosts always displays wrong output which includes the defective/empty
sockets as set of offline cpu's.

Signed-off-by: Kothapally Madhu Pavan <kmp@linux.vnet.ibm.com>
9 years agonodeinfo: Add sysfs_prefix to nodeGetMemoryStats
John Ferlan [Tue, 7 Jul 2015 21:37:36 +0000 (17:37 -0400)]
nodeinfo: Add sysfs_prefix to nodeGetMemoryStats

Add the sysfs_prefix argument to the call to allow for setting the
path for tests to something other than SYSFS_SYSTEM_PATH.

9 years agonodeinfo: Add sysfs_prefix to nodeCapsInitNUMA
John Ferlan [Tue, 7 Jul 2015 21:22:28 +0000 (17:22 -0400)]
nodeinfo: Add sysfs_prefix to nodeCapsInitNUMA

Add the sysfs_prefix argument to the call to allow for setting the
path for tests to something other than SYSFS_CPU_PATH which is a
derivative of SYSFS_SYSTEM_PATH

Use cpupath for nodeCapsInitNUMAFake and remove SYSFS_CPU_PATH

9 years agonodeinfo: Add sysfs_prefix to nodeGetInfo
John Ferlan [Tue, 7 Jul 2015 11:27:53 +0000 (07:27 -0400)]
nodeinfo: Add sysfs_prefix to nodeGetInfo

Add the sysfs_prefix argument to the call to allow for setting the
path for tests to something other than SYSFS_SYSTEM_PATH.

9 years agonodeinfo: Add sysfs_prefix to nodeGetCPUMap
John Ferlan [Mon, 6 Jul 2015 21:49:04 +0000 (17:49 -0400)]
nodeinfo: Add sysfs_prefix to nodeGetCPUMap

Add the sysfs_prefix argument to the call to allow for setting the
path for tests to something other than SYSFS_SYSTEM_PATH.

9 years agonodeinfo: Add sysfs_prefix to nodeGetCPUBitmap
John Ferlan [Tue, 7 Jul 2015 23:26:52 +0000 (19:26 -0400)]
nodeinfo: Add sysfs_prefix to nodeGetCPUBitmap

Add the sysfs_prefix argument to the call to allow for setting the
path for tests to something other than SYSFS_SYSTEM_PATH.