]> xenbits.xensource.com Git - libvirt.git/log
libvirt.git
6 years agophyp: Drop check for auth and auth->cb
Marcos Paulo de Souza [Fri, 3 Aug 2018 00:27:54 +0000 (21:27 -0300)]
phyp: Drop check for auth and auth->cb

Since they are done inside virAuthGetPassword and virAuthGetUsername
when needed.

Signed-off-by: Marcos Paulo de Souza <marcos.souza.org@gmail.com>
6 years agohyperv: Drop check for auth and auth->cb
Marcos Paulo de Souza [Fri, 3 Aug 2018 00:27:53 +0000 (21:27 -0300)]
hyperv: Drop check for auth and auth->cb

Since they are done inside virAuthGetPassword and virAuthGetUsername
when needed.

Signed-off-by: Marcos Paulo de Souza <marcos.souza.org@gmail.com>
6 years agoesx: Drop check for auth and auth->cb
Marcos Paulo de Souza [Fri, 3 Aug 2018 00:27:52 +0000 (21:27 -0300)]
esx: Drop check for auth and auth->cb

Since they are done inside virAuthGetPassword and virAuthGetUsername
when needed.

Signed-off-by: Marcos Paulo de Souza <marcos.souza.org@gmail.com>
6 years agovirauth.c: Check for valid auth callback
Marcos Paulo de Souza [Fri, 3 Aug 2018 00:27:51 +0000 (21:27 -0300)]
virauth.c: Check for valid auth callback

Instead of adding the same check for every drivers, execute the checks
in virAuthGetUsername and virAuthGetPassword. These funtions are called
when user is not set in the URI.

Signed-off-by: Marcos Paulo de Souza <marcos.souza.org@gmail.com>
6 years agolibvirt_iohelper: record the libvirt_iohelper's error message at virFileWrapperFdFree
xinhua.Cao [Mon, 23 Jul 2018 12:22:41 +0000 (20:22 +0800)]
libvirt_iohelper: record the libvirt_iohelper's error message at virFileWrapperFdFree

Currently iohelper's error log is recorded in virFileWrapperFdClose.
However, if something goes wrong the caller might not even get to
calling virFileWrapperFdClose and call virFileWrapperFdFree
directly. Therefore the error reporting should happen there.

Signed-off-by: xinhua.Cao <caoxinhua@huawei.com>
Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
6 years agotests: Add linux-high-ids test
Andrea Bolognani [Thu, 2 Aug 2018 15:24:48 +0000 (17:24 +0200)]
tests: Add linux-high-ids test

This proves libvirt can now handle high socket_id and
core_id values correctly and ensures we won't introduce
regressions in this area.

Signed-off-by: Andrea Bolognani <abologna@redhat.com>
6 years agoutils: Remove arbitrary limit on socket_id/core_id
Andrea Bolognani [Fri, 3 Aug 2018 08:15:16 +0000 (10:15 +0200)]
utils: Remove arbitrary limit on socket_id/core_id

While in most cases the values are going to be much
smaller than our arbitrary 4096 limit, there is really
no guarantee that would be the case: in fact, a few
aarch64 servers have been spotted in the wild with
core_id as high as 6216.

Take advantage of virBitmap's ability to automatically
alter its size at runtime to accomodate such values.

Signed-off-by: Andrea Bolognani <abologna@redhat.com>
6 years agotests: Drop core_siblings/thread_siblings files
Andrea Bolognani [Thu, 2 Aug 2018 14:20:41 +0000 (16:20 +0200)]
tests: Drop core_siblings/thread_siblings files

The latter are no longer used by libvirt, and the former
never were; moreover, both have a corresponding *_list
file which we can manipulate very conveniently using our
bitmap APIs, so dropping them makes sure in the future
developers will look into that rather than trying to
parse the kernel binary bitmaps.

Signed-off-by: Andrea Bolognani <abologna@redhat.com>
6 years agoutil: Rewrite virHostCPUCountThreadSiblings()
Andrea Bolognani [Thu, 2 Aug 2018 14:15:02 +0000 (16:15 +0200)]
util: Rewrite virHostCPUCountThreadSiblings()

We already have a function which parses
thread_siblings_list for a CPU and returns the
corresponding bitmap, and a bunch of utility functions
that perform operations on bitmaps such as counting
the number of set bits: use those to implement the
function instead of having an additional ad-hoc parser
for thread_siblings.

Signed-off-by: Andrea Bolognani <abologna@redhat.com>
6 years agotests: Add missing thread_siblings_list files
Andrea Bolognani [Thu, 2 Aug 2018 13:45:07 +0000 (15:45 +0200)]
tests: Add missing thread_siblings_list files

Some of the data dumps didn't include them; luckily,
we're not actually missing any information since we
can recreate them by looking at the corresponding
thread_sibilings files.

Signed-off-by: Andrea Bolognani <abologna@redhat.com>
6 years agotests: Drop unused data
Andrea Bolognani [Thu, 2 Aug 2018 16:09:04 +0000 (18:09 +0200)]
tests: Drop unused data

Added by mistake with commit a0fdd2f6f9a0.

Signed-off-by: Andrea Bolognani <abologna@redhat.com>
6 years agoutil: Drop VIR_HOST_CPU_MASK_LEN
Andrea Bolognani [Wed, 1 Aug 2018 08:32:50 +0000 (10:32 +0200)]
util: Drop VIR_HOST_CPU_MASK_LEN

Unused since commit c67e04e25fa5.

Signed-off-by: Andrea Bolognani <abologna@redhat.com>
6 years agospec: Enable the iscsi-direct storage driver conditionally
Andrea Bolognani [Tue, 14 Aug 2018 12:31:35 +0000 (14:31 +0200)]
spec: Enable the iscsi-direct storage driver conditionally

Most distributions we build RPMs on don't ship a
recent enough version of libiscsi, so we can't enable
the driver unconditionally. Add an explicit dependency
on the runtime package while at it.

Signed-off-by: Andrea Bolognani <abologna@redhat.com>
Reviewed-by: Pavel Hrdina <phrdina@redhat.com>
6 years agospec: Require libiscsi-devel instead of libiscsi
Andrea Bolognani [Tue, 14 Aug 2018 11:39:51 +0000 (13:39 +0200)]
spec: Require libiscsi-devel instead of libiscsi

Commit 34a6962c41b4 added a BuildRequires for the
iscsi-direct backend, but we need the headers rather
than the runtime package to be available in order to
link against the library.

Signed-off-by: Andrea Bolognani <abologna@redhat.com>
Reviewed-by: Erik Skultety <eskultet@redhat.com>
6 years agovirsh: Add missed fields to pool-define-as item entry
John Ferlan [Mon, 13 Aug 2018 12:19:30 +0000 (08:19 -0400)]
virsh: Add missed fields to pool-define-as item entry

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

Commit id d45bee449 updated the pool-define-as qualifier descriptions
to add some new fields, but neglected to modify the command item list
in order to add those fields as well.

Signed-off-by: John Ferlan <jferlan@redhat.com>
6 years agoFix build on non-linux platforms after another VIR_AUTOPTR patches
Erik Skultety [Tue, 14 Aug 2018 10:08:51 +0000 (12:08 +0200)]
Fix build on non-linux platforms after another VIR_AUTOPTR patches

Caused by commit f7d0663d49. The problem is missing libnl library on
these platforms, so the VIR_DEFINE_AUTOPTR_FUNC has to be compiled in
conditionally.

Signed-off-by: Erik Skultety <eskultet@redhat.com>
6 years agoconf: rename Match functions
Anya Harter [Mon, 13 Aug 2018 15:55:16 +0000 (11:55 -0400)]
conf: rename Match functions

name match functions to be the vir prefix and interface name followed by ObjMatch

    ex. for virNetworkObjListExport, the match function is named
        virNetworkObjMatch

Signed-off-by: Anya Harter <aharter@redhat.com>
Reviewed-by: Andrea Bolognani <abologna@redhat.com>
6 years agoconf: rename Export Callback functions
Anya Harter [Mon, 13 Aug 2018 15:55:15 +0000 (11:55 -0400)]
conf: rename Export Callback functions

name functions to be the name of the export function followed by Callback

    ex. for virInterfaceObjListExport, the callback function is named
        virInterfaceObjListExportCallback

Signed-off-by: Anya Harter <aharter@redhat.com>
Reviewed-by: Andrea Bolognani <abologna@redhat.com>
6 years agoconf: rename structs used by Export function
Anya Harter [Mon, 13 Aug 2018 15:55:14 +0000 (11:55 -0400)]
conf: rename structs used by Export function

name structs to be the name of the Export function followed by Data
also tweak definitions to follow standard struct definition pattern

    ex. for virInterfaceObjListExport, the struct is defined as follows:

        typedef struct _virInterfaceObjListExportData virInterfaceObjListExportData;
        typedef virInterfaceObjListExportData *virInterfaceObjListExportDataPtr;
        struct _virInterfaceObjListExportData {...};

Signed-off-by: Anya Harter <aharter@redhat.com>
Reviewed-by: Andrea Bolognani <abologna@redhat.com>
6 years agoesx: Fix build when libcurl debug is enabled
Marcos Paulo de Souza [Sat, 11 Aug 2018 14:39:29 +0000 (11:39 -0300)]
esx: Fix build when libcurl debug is enabled

When building libvirt with libcurl debug enabled (with
ESX_VI__CURL__ENABLE_DEBUG_OUTPUT set), the message bellow pops up:

make[3]: Entering directory '/mnt/data/gitroot/libvirt/src'
  CC       esx/libvirt_driver_esx_la-esx_vi.lo
esx/esx_vi.c: In function 'esxVI_CURL_Debug':
esx/esx_vi.c:191:5: error: enumeration value 'CURLINFO_SSL_DATA_IN' not handled in switch [-Werror=switch-enum]
     switch (type) {
     ^~~~~~
esx/esx_vi.c:191:5: error: enumeration value 'CURLINFO_SSL_DATA_OUT' not handled in switch [-Werror=switch-enum]
esx/esx_vi.c:191:5: error: enumeration value 'CURLINFO_END' not handled in switch [-Werror=switch-enum]

Our build requires at least libcurl 7.18.0, which is pretty stable since
it was release in 2008. Fix this problem by handling the mentioned enums
in the code.

Signed-off-by: Marcos Paulo de Souza <marcos.souza.org@gmail.com>
Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
6 years agoconf: Add memory bandwidth allocation capability of host
Bing Niu [Mon, 30 Jul 2018 03:12:41 +0000 (11:12 +0800)]
conf: Add memory bandwidth allocation capability of host

Add new XML section to report host's memory bandwidth allocation
capability. The format as below example:

 <host>
 .....
   <memory_bandwidth>
     <node id='0' cpus='0-19'>
       <control granularity='10' min ='10' maxAllocs='8'/>
     </node>
   </memory_bandwidth>
</host>

granularity   ---- granularity of memory bandwidth, unit percentage.
min           ---- minimum memory bandwidth allowed, unit percentage.
maxAllocs     ---- maximum memory bandwidth allocation group supported.

Signed-off-by: Bing Niu <bing.niu@intel.com>
Reviewed-by: John Ferlan <jferlan@redhat.com>
6 years agoconf: Add return value check to virResctrlAllocForeachCache
Bing Niu [Mon, 30 Jul 2018 03:12:40 +0000 (11:12 +0800)]
conf: Add return value check to virResctrlAllocForeachCache

Add return value check to virResctrlAllocForeachCache in
virDomainCachetuneDefFormat. The virResctrlAllocForeachCache does have
return value, so need check return value to make sure function executed
without error.

Signed-off-by: Bing Niu <bing.niu@intel.com>
Reviewed-by: John Ferlan <jferlan@redhat.com>
6 years agoconf: Add support for memorytune XML processing for resctrl MBA
Bing Niu [Mon, 30 Jul 2018 03:12:39 +0000 (11:12 +0800)]
conf: Add support for memorytune XML processing for resctrl MBA

Introduce a new section memorytune to support memory bandwidth allocation.
This is consistent with existing cachetune. As the example:
below:
  <cputune>
    ......
    <memorytune vcpus='0'>
      <node id='0' bandwidth='30'/>
    </memorytune>
  </cputune>

vpus      --- vpus subjected to this memory bandwidth.
id        --- on which node memory bandwidth to be set.
bandwidth --- the memory bandwidth percent to set.

Signed-off-by: Bing Niu <bing.niu@intel.com>
Reviewed-by: John Ferlan <jferlan@redhat.com>
6 years agoconf: Factor out virDomainResctrlDef update from virDomainCachetuneDefParse
Bing Niu [Mon, 30 Jul 2018 03:12:38 +0000 (11:12 +0800)]
conf: Factor out virDomainResctrlDef update from virDomainCachetuneDefParse

Factor out vcpus virDomainResctrlDef update from
virDomainCachetuneDefParse and introduce virDomainResctrlAppend.
virDomainResctrlAppend will format vcpus string and append a new
virDomainResctrlDef to virDomainDefPtr. So that this logic can
be reusable.

Signed-off-by: Bing Niu <bing.niu@intel.com>
Reviewed-by: John Ferlan <jferlan@redhat.com>
6 years agoconf: Factor out vcpus overlapping from virDomainCachetuneDefParse
Bing Niu [Mon, 30 Jul 2018 03:12:37 +0000 (11:12 +0800)]
conf: Factor out vcpus overlapping from virDomainCachetuneDefParse

Factor out vcpus overlapping detecting part from
virDomainCachetuneDefParse and introduce virDomainResctrlVcpuMatch.
Instead of allocating virResctrlAllocPtr by default, allocating
virResctrlAllocPtr after confirm vcpus not overlap with existing ones.
And virDomainResctrlVcpuMatch can be reused by other resource control
technologies. virDomainResctrlVcpuMatch can clarify old vcpus overlap
error whether an overlap or a redefinition.

Signed-off-by: Bing Niu <bing.niu@intel.com>
Reviewed-by: John Ferlan <jferlan@redhat.com>
6 years agoconf: Factor out vcpus parsing part from virDomainCachetuneDefParse
Bing Niu [Mon, 30 Jul 2018 03:12:36 +0000 (11:12 +0800)]
conf: Factor out vcpus parsing part from virDomainCachetuneDefParse

Extract vcpus parsing part from virDomainCachetuneDefParse into one
function called virDomainResctrlParseVcpus. So that vcpus parsing logic
can be reused by other resource control technologies. Adjust error
message and use node->name so that the error message can fit to all
technologies.

Signed-off-by: Bing Niu <bing.niu@intel.com>
Reviewed-by: John Ferlan <jferlan@redhat.com>
6 years agoconf: Rename cachetune to resctrl
Bing Niu [Mon, 30 Jul 2018 03:12:35 +0000 (11:12 +0800)]
conf: Rename cachetune to resctrl

Resctrl not only supports cache tuning, but also memory bandwidth
tuning. Renaming cachetune to resctrl to reflect that. With resctrl,
all allocation for different resources (cache, memory bandwidth) are
aggregated and represented by a virResctrlAllocPtr inside
virDomainResctrlDef.

Signed-off-by: Bing Niu <bing.niu@intel.com>
Reviewed-by: John Ferlan <jferlan@redhat.com>
6 years agoutil: Introduce virResctrlAllocSetMemoryBandwidth
Bing Niu [Mon, 30 Jul 2018 03:12:34 +0000 (11:12 +0800)]
util: Introduce virResctrlAllocSetMemoryBandwidth

Introduce an API to allow setting of the MBA from domain XML.

Signed-off-by: Bing Niu <bing.niu@intel.com>
Reviewed-by: John Ferlan <jferlan@redhat.com>
6 years agoutil: Introduce virResctrlAllocForeachMemory
Bing Niu [Mon, 30 Jul 2018 03:12:33 +0000 (11:12 +0800)]
util: Introduce virResctrlAllocForeachMemory

Introduce an API that will traverse the memory bandwidth data calling
a callback function for each defined bandwidth entry.

Signed-off-by: Bing Niu <bing.niu@intel.com>
Reviewed-by: John Ferlan <jferlan@redhat.com>
6 years agoutil: Add support to calculate MBA utilization
Bing Niu [Mon, 30 Jul 2018 03:12:32 +0000 (11:12 +0800)]
util: Add support to calculate MBA utilization

Introduce virResctrlMemoryBandwidthSubtract and
virResctrlAllocMemoryBandwidth to be used as part of
the virResctrlAllocAssign processing to configure
the available memory bandwidth.

Signed-off-by: Bing Niu <bing.niu@intel.com>
Reviewed-by: John Ferlan <jferlan@redhat.com>
6 years agoutil: Add MBA schemata parse and format methods
Bing Niu [Mon, 30 Jul 2018 03:12:31 +0000 (11:12 +0800)]
util: Add MBA schemata parse and format methods

Introduce virResctrlAllocMemoryBandwidthFormat and
virResctrlAllocParseMemoryBandwidthLine which will format
and parse an entry in the schemata file for MBA.

Signed-off-by: Bing Niu <bing.niu@intel.com>
Reviewed-by: John Ferlan <jferlan@redhat.com>
6 years agoutil: Add MBA allocation to virresctrl
Bing Niu [Mon, 30 Jul 2018 03:12:30 +0000 (11:12 +0800)]
util: Add MBA allocation to virresctrl

Add memory bandwidth allocation support to virresctrl class.
Introducing virResctrlAllocMemBW which is used for allocating memory
bandwidth. Following virResctrlAllocPerType, it also employs a
nested sparse array to indicate whether allocation is available for
particular last level cache.

Signed-off-by: Bing Niu <bing.niu@intel.com>
Reviewed-by: John Ferlan <jferlan@redhat.com>
6 years agoutil: Add MBA check to virResctrlInfoGetCache
Bing Niu [Mon, 30 Jul 2018 03:12:29 +0000 (11:12 +0800)]
util: Add MBA check to virResctrlInfoGetCache

If we have some membw_info data, then we need to calculate the number
of MBA controllers on the system. The value cannot be obtained from a
direct query to the RDT kernel module, but it is the same as the last
level cache value which is calculated by traversing the cache hierarchy
of host(/sys/bus/cpu/devices/cpuX/cache/).

Signed-off-by: Bing Niu <bing.niu@intel.com>
Reviewed-by: John Ferlan <jferlan@redhat.com>
6 years agoutil: Add MBA capability information query to resctrl
Bing Niu [Mon, 30 Jul 2018 03:12:28 +0000 (11:12 +0800)]
util: Add MBA capability information query to resctrl

Introducing virResctrlInfoMemBW for the information memory bandwidth
allocation information.

Signed-off-by: Bing Niu <bing.niu@intel.com>
Reviewed-by: John Ferlan <jferlan@redhat.com>
6 years agoutil: Refactor virResctrlAllocFormat of virresctrl
Bing Niu [Mon, 30 Jul 2018 03:12:27 +0000 (11:12 +0800)]
util: Refactor virResctrlAllocFormat of virresctrl

Refactor virResctrlAllocFormat so that it is easy to support other
resource allocation technologies.

Signed-off-by: Bing Niu <bing.niu@intel.com>
Reviewed-by: John Ferlan <jferlan@redhat.com>
6 years agoutil: Refactor virResctrlGetInfo in virresctrl
Bing Niu [Mon, 30 Jul 2018 03:12:26 +0000 (11:12 +0800)]
util: Refactor virResctrlGetInfo in virresctrl

Separate resctrl common information parts from CAT specific parts,
so that common information parts can be reused among different
resource allocation technologies.

Signed-off-by: Bing Niu <bing.niu@intel.com>
Reviewed-by: John Ferlan <jferlan@redhat.com>
6 years agoutil: Rename some functions of virresctrl
Bing Niu [Mon, 30 Jul 2018 03:12:25 +0000 (11:12 +0800)]
util: Rename some functions of virresctrl

Some functions in virresctrl are for CAT only, while some of other
functions are for resource allocation, not just CAT. So change
their names to reflect the reality.

Signed-off-by: Bing Niu <bing.niu@intel.com>
Reviewed-by: John Ferlan <jferlan@redhat.com>
6 years agoutil: netdevopenvswitch: use VIR_AUTOPTR for aggregate types
Sukrit Bhatnagar [Thu, 9 Aug 2018 04:12:18 +0000 (09:42 +0530)]
util: netdevopenvswitch: use VIR_AUTOPTR for aggregate types

By making use of GNU C's cleanup attribute handled by the
VIR_AUTOPTR macro for declaring aggregate pointer variables,
majority of the calls to *Free functions can be dropped, which
in turn leads to getting rid of most of our cleanup sections.

Signed-off-by: Sukrit Bhatnagar <skrtbhtngr@gmail.com>
Reviewed-by: Erik Skultety <eskultet@redhat.com>
6 years agoutil: netdevip: use VIR_AUTOPTR for aggregate types
Sukrit Bhatnagar [Thu, 9 Aug 2018 04:12:17 +0000 (09:42 +0530)]
util: netdevip: use VIR_AUTOPTR for aggregate types

By making use of GNU C's cleanup attribute handled by the
VIR_AUTOPTR macro for declaring aggregate pointer variables,
majority of the calls to *Free functions can be dropped, which
in turn leads to getting rid of most of our cleanup sections.

Signed-off-by: Sukrit Bhatnagar <skrtbhtngr@gmail.com>
Reviewed-by: Erik Skultety <eskultet@redhat.com>
6 years agoutil: netdevbridge: use VIR_AUTOPTR for aggregate types
Sukrit Bhatnagar [Thu, 9 Aug 2018 04:12:14 +0000 (09:42 +0530)]
util: netdevbridge: use VIR_AUTOPTR for aggregate types

By making use of GNU C's cleanup attribute handled by the
VIR_AUTOPTR macro for declaring aggregate pointer variables,
majority of the calls to *Free functions can be dropped, which
in turn leads to getting rid of most of our cleanup sections.

Signed-off-by: Sukrit Bhatnagar <skrtbhtngr@gmail.com>
Reviewed-by: Erik Skultety <eskultet@redhat.com>
6 years agoutil: netdevbridge: use VIR_AUTOFREE instead of VIR_FREE for scalar types
Sukrit Bhatnagar [Thu, 9 Aug 2018 04:12:13 +0000 (09:42 +0530)]
util: netdevbridge: use VIR_AUTOFREE instead of VIR_FREE for scalar types

By making use of GNU C's cleanup attribute handled by the
VIR_AUTOFREE macro for declaring scalar variables, majority
of the VIR_FREE calls can be dropped, which in turn leads to
getting rid of most of our cleanup sections.

Signed-off-by: Sukrit Bhatnagar <skrtbhtngr@gmail.com>
Reviewed-by: Erik Skultety <eskultet@redhat.com>
6 years agoutil: netlink: use VIR_AUTOPTR for aggregate types
Sukrit Bhatnagar [Thu, 9 Aug 2018 04:12:12 +0000 (09:42 +0530)]
util: netlink: use VIR_AUTOPTR for aggregate types

By making use of GNU C's cleanup attribute handled by the
VIR_AUTOPTR macro for declaring aggregate pointer variables,
majority of the calls to *Free functions can be dropped, which
in turn leads to getting rid of most of our cleanup sections.

Signed-off-by: Sukrit Bhatnagar <skrtbhtngr@gmail.com>
Reviewed-by: Erik Skultety <eskultet@redhat.com>
6 years agoutil: netlink: use VIR_AUTOFREE instead of VIR_FREE for scalar types
Sukrit Bhatnagar [Thu, 9 Aug 2018 04:12:11 +0000 (09:42 +0530)]
util: netlink: use VIR_AUTOFREE instead of VIR_FREE for scalar types

By making use of GNU C's cleanup attribute handled by the
VIR_AUTOFREE macro for declaring scalar variables, majority
of the VIR_FREE calls can be dropped, which in turn leads to
getting rid of most of our cleanup sections.

Signed-off-by: Sukrit Bhatnagar <skrtbhtngr@gmail.com>
Reviewed-by: Erik Skultety <eskultet@redhat.com>
6 years agoutil: netlink: define cleanup function using VIR_DEFINE_AUTOPTR_FUNC
Sukrit Bhatnagar [Thu, 9 Aug 2018 04:12:10 +0000 (09:42 +0530)]
util: netlink: define cleanup function using VIR_DEFINE_AUTOPTR_FUNC

Using the new VIR_DEFINE_AUTOPTR_FUNC macro defined in
src/util/viralloc.h, define a new wrapper around an existing
cleanup function which will be called when a variable declared
with VIR_AUTOPTR macro goes out of scope. Also, drop the redundant
viralloc.h include, since that has moved from the source module into
the header.

This commit also typedefs virNetlinkMsg to struct nl_msg type for use
with the cleanup macros.

When a variable of type virNetlinkMsg * is declared using VIR_AUTOPTR,
the function nlmsg_free will be run automatically on it when it
goes out of scope.

Signed-off-by: Sukrit Bhatnagar <skrtbhtngr@gmail.com>
Reviewed-by: Erik Skultety <eskultet@redhat.com>
6 years agoutil: iscsi: use VIR_AUTOFREE instead of VIR_FREE for scalar types
Sukrit Bhatnagar [Thu, 9 Aug 2018 04:12:09 +0000 (09:42 +0530)]
util: iscsi: use VIR_AUTOFREE instead of VIR_FREE for scalar types

Add another usage for VIR_AUTOFREE macro which was left in the
commit ec3e878, thereby dropping a VIR_FREE call and and a cleanup
section.

Signed-off-by: Sukrit Bhatnagar <skrtbhtngr@gmail.com>
Reviewed-by: Erik Skultety <eskultet@redhat.com>
6 years agospec: Add libvirt-daemon-driver-storage-iscsi-direct
Cole Robinson [Wed, 8 Aug 2018 23:43:25 +0000 (19:43 -0400)]
spec: Add libvirt-daemon-driver-storage-iscsi-direct

Signed-off-by: Cole Robinson <crobinso@redhat.com>
6 years agoqemu: Prefer nvdimmPath over hugepages for memory-backend-file
Michal Privoznik [Thu, 9 Aug 2018 14:29:17 +0000 (16:29 +0200)]
qemu: Prefer nvdimmPath over hugepages for memory-backend-file

If a domain has hugepages configured and we're currently building
memory-backend-file for a nvdimm device that domain has we will
put hugepages path onto the command line. It should have been
nvdimm path configured in the XML.

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Pavel Hrdina <phrdina@redhat.com>
6 years agovircgroup: fix MinGW build
Pavel Hrdina [Mon, 13 Aug 2018 14:03:03 +0000 (16:03 +0200)]
vircgroup: fix MinGW build

Broken by commit <901d2b9c87>.

Signed-off-by: Pavel Hrdina <phrdina@redhat.com>
6 years agoesx: Fix nodeGetInfo so cpu model fits inside nodeinfo->model
Marcos Paulo de Souza [Sun, 12 Aug 2018 11:05:19 +0000 (08:05 -0300)]
esx: Fix nodeGetInfo so cpu model fits inside nodeinfo->model

Commit 6c0d0210cbcd5d647f0d882c07f077d444bc707d changed the behavior of
virStr*cpy* functions, so now the nodeGetInfo call fails. Version 4.1.0
(default for Fedora 28) works:

Model: Intel Core i7-4500U CPU @ 1.80G

Current master tries to write "Intel Core i7-4500U CPU @ 1.80GHz", but
the string is bigger than nodeinfo->model (which is a char[32]). So this
patch "cuts" the string, and presents the same output from 4.1.0.

Signed-off-by: Marcos Paulo de Souza <marcos.souza.org@gmail.com>
6 years agoRevert "build: add --with-jansson"
Ján Tomko [Mon, 13 Aug 2018 11:41:14 +0000 (13:41 +0200)]
Revert "build: add --with-jansson"

This reverts commit 12b34f094e2f1c7f414f4bb8f880a9d65c8fcd85.

Jansson cannot parse QEMU's quirky JSON.
Revert back to yajl.

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

Conflicts:
  configure.ac:
    Commit 8aa85e0b introduced LIBVIRT_*_LIBISCSI macros.

Signed-off-by: Ján Tomko <jtomko@redhat.com>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
6 years agoRevert "build: undef WITH_JANSSON for SETUID_RPC_CLIENT"
Ján Tomko [Mon, 13 Aug 2018 11:40:25 +0000 (13:40 +0200)]
Revert "build: undef WITH_JANSSON for SETUID_RPC_CLIENT"

This reverts commit 93fdc9e0b0cbb2eec32745a868ac4633f0912ad5.

Jansson cannot parse QEMU's quirky JSON.
Revert back to yajl.

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

Signed-off-by: Ján Tomko <jtomko@redhat.com>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
6 years agoRevert "Switch from yajl to Jansson"
Ján Tomko [Mon, 13 Aug 2018 11:40:18 +0000 (13:40 +0200)]
Revert "Switch from yajl to Jansson"

This reverts commit 9cf38263d05ca7f27dbbd9b1a0b48d338d9280e2.

Jansson cannot parse QEMU's quirky JSON.
Revert back to yajl.

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

Signed-off-by: Ján Tomko <jtomko@redhat.com>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
6 years agoRevert "Remove functions using yajl"
Ján Tomko [Mon, 13 Aug 2018 11:40:11 +0000 (13:40 +0200)]
Revert "Remove functions using yajl"

This reverts commit bf114decb34f21cd225ead6dc4d929d35a8c5fe5.

Jansson cannot parse QEMU's quirky JSON.
Revert back to yajl.

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

Signed-off-by: Ján Tomko <jtomko@redhat.com>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
6 years agoRevert "build: remove references to WITH_YAJL for SETUID_RPC_CLIENT"
Ján Tomko [Mon, 13 Aug 2018 11:40:02 +0000 (13:40 +0200)]
Revert "build: remove references to WITH_YAJL for SETUID_RPC_CLIENT"

This reverts commit 1caf8441604b58e4a89aa2c09975b8346928c52a.

Jansson cannot parse QEMU's quirky JSON.
Revert back to yajl.

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

Signed-off-by: Ján Tomko <jtomko@redhat.com>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
6 years agoRevert "Remove virJSONValueNewStringLen"
Ján Tomko [Mon, 13 Aug 2018 11:39:56 +0000 (13:39 +0200)]
Revert "Remove virJSONValueNewStringLen"

This reverts commit 8f802c6d8659beb9eb3cab96ba2553e251728337.

Jansson cannot parse QEMU's quirky JSON.
Revert back to yajl.

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

Signed-off-by: Ján Tomko <jtomko@redhat.com>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
6 years agoRevert "build: switch --with-qemu default from yes to check"
Ján Tomko [Mon, 13 Aug 2018 11:39:48 +0000 (13:39 +0200)]
Revert "build: switch --with-qemu default from yes to check"

This reverts commit c5ae8e0c2b4b6bb3c667cfadaf65a66c3f4f3d85.

Jansson cannot parse QEMU's quirky JSON.
Revert back to yajl.

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

Signed-off-by: Ján Tomko <jtomko@redhat.com>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
6 years agoRevert "build: require Jansson if QEMU driver is enabled"
Ján Tomko [Mon, 13 Aug 2018 11:39:39 +0000 (13:39 +0200)]
Revert "build: require Jansson if QEMU driver is enabled"

This reverts commit 01ce04375c3348fd683475e5aa5231149ef6a78a.

Jansson cannot parse QEMU's quirky JSON.
Revert back to yajl.

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

Signed-off-by: Ján Tomko <jtomko@redhat.com>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
6 years agoRevert "m4: Introduce STABLE_ORDERING_JANSSON"
Ján Tomko [Mon, 13 Aug 2018 11:39:33 +0000 (13:39 +0200)]
Revert "m4: Introduce STABLE_ORDERING_JANSSON"

This reverts commit 4dd60540007042bfc0087a67f57f3e9f3311a84a.

Jansson cannot parse QEMU's quirky JSON.
Revert back to yajl.

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

Signed-off-by: Ján Tomko <jtomko@redhat.com>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
6 years agoRevert "tests: also skip qemuagenttest with old jansson"
Ján Tomko [Mon, 13 Aug 2018 11:39:25 +0000 (13:39 +0200)]
Revert "tests: also skip qemuagenttest with old jansson"

This reverts commit c31146685f5c8558ff88d52d03a68533c9220feb.

Jansson cannot parse QEMU's quirky JSON.
Revert back to yajl.

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

Signed-off-by: Ján Tomko <jtomko@redhat.com>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
6 years agoRevert "util: avoid symbol clash between json libraries"
Ján Tomko [Mon, 13 Aug 2018 11:39:16 +0000 (13:39 +0200)]
Revert "util: avoid symbol clash between json libraries"

This reverts commit ce3c6ef6843f98d81be5423ece11fad79eaab920.

Jansson cannot parse QEMU's quirky JSON.
Revert back to yajl.

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

Signed-off-by: Ján Tomko <jtomko@redhat.com>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
6 years agoRevert "tests: qemucapsprobe: Fix output after switching to jansson"
Ján Tomko [Mon, 13 Aug 2018 11:39:09 +0000 (13:39 +0200)]
Revert "tests: qemucapsprobe: Fix output after switching to jansson"

This reverts commit 397447f80588438545994a86883792a5999cad15.

Jansson cannot parse QEMU's quirky JSON.
Revert back to yajl.

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

Signed-off-by: Ján Tomko <jtomko@redhat.com>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
6 years agoRevert "util: jsoncompat: Stub out virJSONInitialize when compiling without jansson"
Ján Tomko [Mon, 13 Aug 2018 11:38:46 +0000 (13:38 +0200)]
Revert "util: jsoncompat: Stub out virJSONInitialize when compiling without jansson"

This reverts commit 9e44c2db8ad94d3c20acc1d081538c280af198b4.

Jansson cannot parse QEMU's quirky JSON.
Revert back to yajl.

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

Signed-off-by: Ján Tomko <jtomko@redhat.com>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
6 years agoRevert "remote: daemon: Make sure that JSON symbols are properly loaded at startup"
Ján Tomko [Mon, 13 Aug 2018 11:38:38 +0000 (13:38 +0200)]
Revert "remote: daemon: Make sure that JSON symbols are properly loaded at startup"

This reverts commit 3251fc9c9b9639c3fec3181530599415523d671a.

Jansson cannot parse QEMU's quirky JSON.
Revert back to yajl.

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

Signed-off-by: Ján Tomko <jtomko@redhat.com>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
6 years agoRevert "Fix link errors in tools/nss and tests"
Ján Tomko [Mon, 13 Aug 2018 11:38:28 +0000 (13:38 +0200)]
Revert "Fix link errors in tools/nss and tests"

This reverts commit b3d9b08ef797e569b14cfa42d3dceba23c2a5b14.

Jansson cannot parse QEMU's quirky JSON.
Revert back to yajl.

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

Signed-off-by: Ján Tomko <jtomko@redhat.com>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
6 years agoRevert "src: Move DLOPEN_LIBS to libraries introducing the dependency"
Ján Tomko [Mon, 13 Aug 2018 11:37:53 +0000 (13:37 +0200)]
Revert "src: Move DLOPEN_LIBS to libraries introducing the dependency"

This reverts commit 5d40272ea67c74049600e120095d1b42287ed2d2.

Jansson cannot parse QEMU's quirky JSON.
Revert back to yajl.

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

Signed-off-by: Ján Tomko <jtomko@redhat.com>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
6 years agonetworkStartNetworkVirtual: Don't leak macmap object
Michal Privoznik [Mon, 13 Aug 2018 09:17:20 +0000 (11:17 +0200)]
networkStartNetworkVirtual: Don't leak macmap object

When starting network a macmap object is created (which stores
MAC -> domain name mappings). However, if something goes wrong
(e.g. virNetDevIPCheckIPv6Forwarding() fails) then the object is
leaked.

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Erik Skultety <eskultet@redhat.com>
6 years agovirnetdevip: Free data.devices in virNetDevIPCheckIPv6Forwarding() too
Michal Privoznik [Mon, 13 Aug 2018 09:16:06 +0000 (11:16 +0200)]
virnetdevip: Free data.devices in virNetDevIPCheckIPv6Forwarding() too

We are freeing the individual strings (which were filled by
virNetDevIPCheckIPv6ForwardingCallback()) but not the array
itself.

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Erik Skultety <eskultet@redhat.com>
6 years agolxc: Use virCgroupGetMemoryStat
Pavel Hrdina [Fri, 20 Jul 2018 12:48:56 +0000 (14:48 +0200)]
lxc: Use virCgroupGetMemoryStat

Signed-off-by: Pavel Hrdina <phrdina@redhat.com>
6 years agovircgroup: Introduce virCgroupGetMemoryStat
Pavel Hrdina [Fri, 20 Jul 2018 12:47:11 +0000 (14:47 +0200)]
vircgroup: Introduce virCgroupGetMemoryStat

Signed-off-by: Pavel Hrdina <phrdina@redhat.com>
6 years agovircgroup: Remove virCgroupAddTaskController
Pavel Hrdina [Thu, 19 Jul 2018 12:39:43 +0000 (14:39 +0200)]
vircgroup: Remove virCgroupAddTaskController

There is no need for this function, both of the checks are done
later by virCgroupGetControllerPath.

Signed-off-by: Pavel Hrdina <phrdina@redhat.com>
6 years agovircgroup: machinename will never be NULL
Pavel Hrdina [Tue, 31 Jul 2018 10:15:53 +0000 (12:15 +0200)]
vircgroup: machinename will never be NULL

Commit <eaf2c9f89107b9f60cf8db2c919f78b987ff7177> moved machineName
generation before virCgroupNewDetectMachine() is called.

Signed-off-by: Pavel Hrdina <phrdina@redhat.com>
6 years agovircgroup: Introduce virCgroupEnableMissingControllers
Pavel Hrdina [Tue, 31 Jul 2018 10:09:40 +0000 (12:09 +0200)]
vircgroup: Introduce virCgroupEnableMissingControllers

Signed-off-by: Pavel Hrdina <phrdina@redhat.com>
6 years agovircgroup: Use virCgroupMountOptsMatchController in virCgroupDetectPlacement
Pavel Hrdina [Tue, 17 Jul 2018 11:43:55 +0000 (13:43 +0200)]
vircgroup: Use virCgroupMountOptsMatchController in virCgroupDetectPlacement

Signed-off-by: Pavel Hrdina <phrdina@redhat.com>
6 years agovircgroup: Extract mount options matching into function
Pavel Hrdina [Wed, 13 Jun 2018 16:12:18 +0000 (18:12 +0200)]
vircgroup: Extract mount options matching into function

Signed-off-by: Pavel Hrdina <phrdina@redhat.com>
6 years agovircgroup: Remove pointless bool parameter
Pavel Hrdina [Wed, 13 Jun 2018 13:05:57 +0000 (15:05 +0200)]
vircgroup: Remove pointless bool parameter

Signed-off-by: Pavel Hrdina <phrdina@redhat.com>
6 years agovircgroup: Move function used in tests into vircgrouppriv.h
Pavel Hrdina [Wed, 13 Jun 2018 10:55:27 +0000 (12:55 +0200)]
vircgroup: Move function used in tests into vircgrouppriv.h

Signed-off-by: Pavel Hrdina <phrdina@redhat.com>
6 years agovircgroup: Unexport unused function virCgroupRemoveRecursively
Pavel Hrdina [Fri, 20 Jul 2018 12:58:41 +0000 (14:58 +0200)]
vircgroup: Unexport unused function virCgroupRemoveRecursively

Signed-off-by: Pavel Hrdina <phrdina@redhat.com>
6 years agovircgroup: Unexport unused function virCgroupAddTaskController()
Pavel Hrdina [Wed, 13 Jun 2018 10:53:28 +0000 (12:53 +0200)]
vircgroup: Unexport unused function virCgroupAddTaskController()

Signed-off-by: Pavel Hrdina <phrdina@redhat.com>
6 years agovircgroup: Remove unused function virCgroupKill()
Pavel Hrdina [Wed, 13 Jun 2018 10:52:52 +0000 (12:52 +0200)]
vircgroup: Remove unused function virCgroupKill()

Signed-off-by: Pavel Hrdina <phrdina@redhat.com>
6 years agovircgroup: Extract file link resolving into separate function
Pavel Hrdina [Tue, 31 Jul 2018 10:08:08 +0000 (12:08 +0200)]
vircgroup: Extract file link resolving into separate function

Signed-off-by: Pavel Hrdina <phrdina@redhat.com>
6 years agovircgroup: Introduce standard set of typedefs and use them
Pavel Hrdina [Tue, 12 Jun 2018 11:47:10 +0000 (13:47 +0200)]
vircgroup: Introduce standard set of typedefs and use them

Signed-off-by: Pavel Hrdina <phrdina@redhat.com>
6 years agovircgroup: Rename structs to start with underscore
Pavel Hrdina [Tue, 12 Jun 2018 11:46:04 +0000 (13:46 +0200)]
vircgroup: Rename structs to start with underscore

Signed-off-by: Pavel Hrdina <phrdina@redhat.com>
6 years agodocs: Update how we create cgroup directory names
Pavel Hrdina [Thu, 19 Apr 2018 12:45:19 +0000 (14:45 +0200)]
docs: Update how we create cgroup directory names

Commit <c3bd0019c0> changed the way how cgroup directory names are
constructed but the documentation was not updated.

Signed-off-by: Pavel Hrdina <phrdina@redhat.com>
6 years agodocs: List cpuacct in controllers used by QEMU driver
Pavel Hrdina [Thu, 19 Apr 2018 12:42:43 +0000 (14:42 +0200)]
docs: List cpuacct in controllers used by QEMU driver

The cpuacct controller is used to get cpu stats.

Signed-off-by: Pavel Hrdina <phrdina@redhat.com>
6 years agoqemu_migration: Avoid writing to freed memory
Jiri Denemark [Thu, 2 Aug 2018 14:56:02 +0000 (16:56 +0200)]
qemu_migration: Avoid writing to freed memory

When a domain is killed on the source host while it is being migrated
and libvirtd is waiting for the migration to finish (waiting for the
domain condition in qemuMigrationSrcWaitForCompletion), the run-time
state including priv->job.current may already be freed once
virDomainObjWait returns with -1. Thus the priv->job.current pointer
cached in jobInfo is no longer valid and setting jobInfo->status may
crash the daemon.

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

Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
6 years agostorage: add wipeVol to iscsi-direct storage backend
Clementine Hayat [Sun, 12 Aug 2018 22:26:18 +0000 (00:26 +0200)]
storage: add wipeVol to iscsi-direct storage backend

Signed-off-by: Clementine Hayat <clem@lse.epita.fr>
Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
6 years agostorage: add SetConnection to iscsi-direct backend
Clementine Hayat [Sun, 12 Aug 2018 22:26:17 +0000 (00:26 +0200)]
storage: add SetConnection to iscsi-direct backend

The code to set the connection and connect using libiscsi will always be
the same. Add function to avoid code duplication.

Signed-off-by: Clementine Hayat <clem@lse.epita.fr>
Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
6 years agostorage: refactor volume capacity in iscsi-direct backend
Clementine Hayat [Sun, 12 Aug 2018 22:26:16 +0000 (00:26 +0200)]
storage: refactor volume capacity in iscsi-direct backend

The size of blocks inside a volume and the number of blocks are needed
later. Having a function that return thoses information will avoid code
duplication.

Signed-off-by: Clementine Hayat <clem@lse.epita.fr>
Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
6 years agoconf: Introduce virDomainDefPostParseMemtune
Pavel Hrdina [Wed, 8 Aug 2018 15:03:40 +0000 (17:03 +0200)]
conf: Introduce virDomainDefPostParseMemtune

Previously we were ignoring "nodeset" attribute for hugepage pages
if there was no guest NUMA topology configured in the domain XML.
Commit <fa6bdf6afa878b8d7c5ed71664ee72be8967cdc5> partially fixed
that issue but it introduced a somehow valid regression.

In case that there is no guest NUMA topology configured and the
"nodeset" attribute is set to "0" it was accepted and was working
properly even though it was not completely valid XML.

This patch introduces a workaround that it will ignore the nodeset="0"
only in case that there is no guest NUMA topology in order not to
hit the validation error.

After this commit the following XML configuration is valid:

  <memoryBacking>
    <hugepages>
      <page size='2048' unit='KiB' nodeset='0'/>
    </hugepages>
  </memoryBacking>

but this configuration remains invalid:

  <memoryBacking>
    <hugepages>
      <page size='2048' unit='KiB' nodeset='0'/>
      <page size='1048576' unit='KiB'/>
    </hugepages>
  </memoryBacking>

The issue with the second configuration is that it was originally
working, however changing the order of the <page> elements resolved
into using different page size for the guest.  The code is written
in a way that it expect only one page configured and always uses only
the first page in case that there is no guest NUMA topology configured.
See qemuBuildMemPathStr() function for details.

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

Signed-off-by: Pavel Hrdina <phrdina@redhat.com>
6 years agoconf: Move hugepages validation out of XML parser
Pavel Hrdina [Tue, 10 Jul 2018 10:46:53 +0000 (12:46 +0200)]
conf: Move hugepages validation out of XML parser

Signed-off-by: Pavel Hrdina <phrdina@redhat.com>
6 years agoconf: Move hugepage XML validation check out of qemu_command
Pavel Hrdina [Thu, 9 Aug 2018 12:02:16 +0000 (14:02 +0200)]
conf: Move hugepage XML validation check out of qemu_command

We can safely validate the hugepage nodeset attribute at a define time.
This validation is not done for already existing domains when the daemon
is restarted.

All the changes to the tests are necessary because we move the error
from domain start into XML parse.

Signed-off-by: Pavel Hrdina <phrdina@redhat.com>
6 years agotests: introduce hugepages-nodeset
Pavel Hrdina [Wed, 8 Aug 2018 14:53:45 +0000 (16:53 +0200)]
tests: introduce hugepages-nodeset

This use-case was broken by commit
<fa6bdf6afa878b8d7c5ed71664ee72be8967cdc5>.

We allowed this configuration and it was working as expected therefore
we can consider it as regression.  We should have never allowed such
configuration so now the best solution is in case of non-numa guest
silently ignore the 'nodeset' attribute if it's set to '0'.

That will be fixed by following patches.

Signed-off-by: Pavel Hrdina <phrdina@redhat.com>
6 years agotests: introduce hugepages-default-1G-nodeset-2M
Pavel Hrdina [Wed, 8 Aug 2018 13:59:27 +0000 (15:59 +0200)]
tests: introduce hugepages-default-1G-nodeset-2M

This test case is currently working but it uncovers existing issue
in our code that the generated QEMU commandline uses the default 1G
hugepage instead of the 2M hugepage specified for exact node.

The issue in our code is that for non-numa guests we take into account
only the first hugepage.  This will be fixed as invalid configuration
since it doesn't make any sense to set default and specific hugepage
for non-numa guest.

Signed-off-by: Pavel Hrdina <phrdina@redhat.com>
6 years agotests: rename hugepages-pages8 into hugepages-nodeset-nonexist
Pavel Hrdina [Wed, 8 Aug 2018 13:55:37 +0000 (15:55 +0200)]
tests: rename hugepages-pages8 into hugepages-nodeset-nonexist

Remove unnecessary XML elements as well.

Signed-off-by: Pavel Hrdina <phrdina@redhat.com>
6 years agotests: rename hugepages-pages7 into pages-dimm-discard
Pavel Hrdina [Fri, 10 Aug 2018 11:14:58 +0000 (13:14 +0200)]
tests: rename hugepages-pages7 into pages-dimm-discard

Remove unnecessary XML elements as well.

Signed-off-by: Pavel Hrdina <phrdina@redhat.com>
6 years agotests: rename hugepages-pages6 into hugepages-default-system-size
Pavel Hrdina [Fri, 10 Aug 2018 11:13:34 +0000 (13:13 +0200)]
tests: rename hugepages-pages6 into hugepages-default-system-size

Remove unnecessary XML elements as well.

Signed-off-by: Pavel Hrdina <phrdina@redhat.com>
6 years agotests: rename hugepages-pages5 into hugepages-default-2M
Pavel Hrdina [Fri, 10 Aug 2018 11:12:43 +0000 (13:12 +0200)]
tests: rename hugepages-pages5 into hugepages-default-2M

Remove unnecessary XML elements as well.

Signed-off-by: Pavel Hrdina <phrdina@redhat.com>
6 years agotests: rename hugepages-pages4 into hugepages-numa-nodeset-nonexist
Pavel Hrdina [Thu, 9 Aug 2018 11:41:02 +0000 (13:41 +0200)]
tests: rename hugepages-pages4 into hugepages-numa-nodeset-nonexist

Remove unnecessary XML elements as well.

Signed-off-by: Pavel Hrdina <phrdina@redhat.com>
6 years agotests: rename hugepages-pages3 into hugepages-numa-nodeset-part
Pavel Hrdina [Fri, 10 Aug 2018 11:10:29 +0000 (13:10 +0200)]
tests: rename hugepages-pages3 into hugepages-numa-nodeset-part

Remove unnecessary XML elements as well.

Signed-off-by: Pavel Hrdina <phrdina@redhat.com>
6 years agotests: extract pages-discard-hugepages out of hugepages-pages3
Pavel Hrdina [Thu, 9 Aug 2018 11:26:53 +0000 (13:26 +0200)]
tests: extract pages-discard-hugepages out of hugepages-pages3

Similar thing happens as for pages-discard, it is not passed to QEMU.

Signed-off-by: Pavel Hrdina <phrdina@redhat.com>