- 23 6月, 2014 10 次提交
-
-
由 Michal Privoznik 提交于
One of previous commits (e6258a33) tried to build the huge page code only on Linux since it's Linux centric indeed. But it failed miserably as it used 'WITH_LINUX' which is an automake conditional not a gcc one. In the sources we need to use __linux__. Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
-
由 Laine Stump 提交于
There are no options to parse here other than the name of the device, and all three possible device names have the same prefix ("virtio-balloon" with "-ccw", "-pci", or "-device" appended), so the code is fairly simple. It has been implemented such that it will be easier to add handling for other -device entries that aren't otherwise recognized - just add another "else if (STRPREFIX(opts, ....)" clause. qemuParseCommandLineString() previously would always add a <memballoon model='virtio'/> to every result (the comments erroneously say that it is adding a <memballoon model='none'/>) This has been changed to add model='none', and 84 test case xml's updated accordingly (so that qemuxml2argvtest won't fail). Now that the memballoon device is properly parsed, we can safely add a test for properly ignoring -nodefconfig and -nodefaults. Rather than adding an entire new test case for this (and memballoon), we just randomly pick the clock-utc test and modify it slightly to fulfill the purpose.
-
由 Ján Tomko 提交于
ioctl returns -1, not the errno value
-
由 Ján Tomko 提交于
Only three other callers possibly call closedir on a NULL argument. Even though these probably won't be used on FreeBSD where this crashes, let's be nice and only call closedir on an actual directory stream.
-
由 Ján Tomko 提交于
==== Invalid write of size 4 ==== at 0x52E678C: virNumaGetDistances (virnuma.c:479) ==== by 0x5396890: nodeCapsInitNUMA (nodeinfo.c:1796) ==== by 0x203C2B: virQEMUCapsInit (qemu_capabilities.c:960) ==== Address 0xe10a1e0 is 0 bytes after a block of size 0 alloc'd ==== at 0x4C2A6D0: calloc (in /usr/lib64/valgrind/vgpreload_memcheck-amd64-linux.so) ==== by 0x52A10D6: virAllocN (viralloc.c:191) ==== by 0x52E674D: virNumaGetDistances (virnuma.c:470) ==== by 0x5396890: nodeCapsInitNUMA (nodeinfo.c:1796) ==== by 0x203C2B: virQEMUCapsInit (qemu_capabilities.c:960)
-
由 Peter Krempa 提交于
The hugepage sizing and counting code gathers the information from sysfs and thus isn't portable. Stub it out for non-Linux so that we can report a better error. This patch also avoids calling sysinfo() on Mingw where it isn't supported.
-
由 Peter Krempa 提交于
Don't return possibly incomplete result if virDirRead fails.
-
由 Peter Krempa 提交于
makefile_conditionals tests/Makefile.am:293:endif maint.mk: match "if FOO" with "endif FOO" in Makefiles make: *** [sc_makefile_conditionals] Error 1
-
由 Peter Krempa 提交于
'virstoragetest' accesses backing chains of files on local storage with the help of the storage driver. Disable the test on builds without the storage driver as the test is crashing otherwise. Reported by: Roman Bogorodskiy
-
由 Ján Tomko 提交于
It returns NULL on failure. Checking if the negation of it is less than zero makes no sense. (Found by coverity after moving the code) In another case, the return value wasn't checked at all.
-
- 21 6月, 2014 2 次提交
-
-
由 Ján Tomko 提交于
Just code movement and rename.
-
由 Jason Andryuk 提交于
Migration code specifies the problematic non-cooperative resume mode which is a known issue with Xen's libxl [1]. Instead, use the better supported cooperative mode. Without this, guests BUG() in xen_irq_resume after failing to bind still-bound event channels. [1] http://bugs.xenproject.org/xen/bug/30
-
- 20 6月, 2014 17 次提交
-
-
由 Michal Privoznik 提交于
So far three ARM processor families are known to libvirt, however the cpu driver knows only about one of them. This make host initialization on the other two fail: 2014-06-17 13:35:41.419+0000: 6840: info : libvirt version: 1.2.6 2014-06-17 13:35:41.419+0000: 6840: error : cpuNodeData:342 : this function is not supported by the connection driver: cannot get node CPU data for armv6l architecture 2014-06-17 13:35:41.433+0000: 6840: warning : virQEMUCapsInit:943 : Failed to get host CPU Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
-
由 Michal Privoznik 提交于
The virNodeParseSocket() function tries to get socked ID from 'topology/physical_package_id' file. However, on some architectures the file contains the -1 constant which makes in turn libvirt think the info extraction was unsuccessful. If that's the case, we need to overwrite the obtained integer with zero like we are doing for other architectures. Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
-
由 Michal Privoznik 提交于
Currently, we are opening the cpuinfo file via fopen() which if fails doesn't print any error message. We should do that instead. Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
-
由 Michal Privoznik 提交于
As in previous commit, there are again some places where we can do runtime decision instead of compile time. This time it's whether the 'topology/physical_package_id' is allowed to have '-1' within or not. Then, core ID is pared differently on s390(x) than on the rest of architectures. Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
-
由 Michal Privoznik 提交于
So far, we are doing compile time decisions on which architecture is used. However, for testing purposes it's much easier if we pass host architecture as parameter and then let the function decide which code snippet for extracting host CPU info will be used. Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
-
由 Laine Stump 提交于
This modifies the formatting function of virInterface to be a proper mirror of the parse function, including the addition of a "parentIfType" arg so that we can decide whether or not it is appropriate to emit the elements that are only in toplevel interfaces, as well as the <link> element (which isn't allowed for bridge interfaces). Since the restructuring of the code necessarily changes the order of some of the elements, some test case data had to be updated.
-
由 Laine Stump 提交于
the switch cases for the 4 different interface types had repetitive code which has now been pulled out as common. While touching those lines, some extra usage of "!= NULL" etc has been eliminated to make things more compact and inline with current coding practices. NB: parentIfType == VIR_INTERFACE_TYPE_LAST means that this is a toplevel interface (not a subordinate of a bridge or bond). Only toplevel interfaces can have a start mode, mtu, or IP address element.
-
由 Laine Stump 提交于
For some reason the bridge stp mode and delay were put directly into the "bridge" case of the switch in virInterfaceDefParseXML(), although they are inside the <bridge> element, and so should be parsed in the function created for that purpose - virInterfaceBridgeDefFormat().
-
由 Laine Stump 提交于
The interface state for bonds and vlans does seem to reflect the state of the underlying physical devices, at least in some cases, so it makes sense to allow reporting it (netcf now does). The link state/speed for bridge devices is meaningless though, so we don't even look for it.
-
由 Peter Krempa 提交于
I'm going to add functions that will deal with individual image files rather than whole disks. Rename the security function to make room for the new one.
-
由 Peter Krempa 提交于
Also remove one spurious ATTRIBUTE_UNUSED guarding the @migrated argument.
-
由 Peter Krempa 提交于
The image labels are stored in the virStorageSource struct. Convert the virDomainDiskDefGetSecurityLabelDef helper not to use the full disk def and move it appropriately.
-
由 Peter Krempa 提交于
It will also be reused later.
-
由 Peter Krempa 提交于
-
由 Peter Krempa 提交于
-
由 Jim Fehlig 提交于
Generally, <interface> ... <script> is only supported for type='ethernet'. Due to the long and pervasive use of <interface type='bridge'> ... <script path='foo'/> </interface> in Xen domain configuration, it was agreed to allow the use of <script> with type='bridge' for backwards compatibility. See the following discussion thread http://www.redhat.com/archives/libvir-list/2013-April/msg00755.html This patch limits the use of <script> to interface types ethernet and bridge, raising an unsupported config error if <script> is specified for all other interface types. While at it, use VIR_ERR_CONFIG_UNSUPPORTED instead of VIR_ERR_INTERNAL_ERROR when reporting unsupported interface types.
-
由 Jim Fehlig 提交于
Add support for <interface type='network'> in the libxl driver.
-
- 19 6月, 2014 11 次提交
-
-
由 Eric Blake 提交于
Commit 9e3efe53 broke the build under valgrind or clang, by writing 8 bytes through an allocation of 4 bytes. It also risks multiplication overflow when mallocing (that's a pervasive problem that needs an audit in the rest of the code, but we might as well fix this one while we are here), and had a typo. * tools/virsh-host.c (cmdFreepages): Avoid integer overflow and undefined behavior. Signed-off-by: NEric Blake <eblake@redhat.com>
-
由 Laine Stump 提交于
The interface xml schema was written with strict rules about the ordering of the elements. This was never intentional, but just due to omission of <interleave> in the appropriate places. This patch just adds in <interleave> wherever there is more than one element, and re-indents everything else appropriately.
-
由 Jincheng Miao 提交于
In section "Block / character devices" of "Host device assignment", the description of hostdev element has some error: For a block device, the type should be "storage", not "block"; For a character device, the type should be "misc", not "char". Signed-off-by: NJincheng Miao <jmiao@redhat.com>
-
由 Michal Privoznik 提交于
And add stubs to other drivers like: lxc, qemu, uml and vbox. Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
-
由 Michal Privoznik 提交于
The new API is exposed under 'freepages' command. Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
-
由 Michal Privoznik 提交于
The aim of the API is to get information on number of free pages on the system. The API behaves similar to the virNodeGetCellsFreeMemory(). User passes starting NUMA cell, the count of nodes that he's interested in, pages sizes (yes, multiple sizes can be queried at once) and the counts are returned in an array. Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
-
由 Michal Privoznik 提交于
There are two places where you'll find info on page sizes. The first one is under <cpu/> element, where all supported pages sizes are listed. Then the second one is under each <cell/> element which refers to concrete NUMA node. At this place, the size of page's pool is reported. So the capabilities XML looks something like this: <capabilities> <host> <uuid>01281cda-f352-cb11-a9db-e905fe22010c</uuid> <cpu> <arch>x86_64</arch> <model>Westmere</model> <vendor>Intel</vendor> <topology sockets='1' cores='1' threads='1'/> ... <pages unit='KiB' size='4'/> <pages unit='KiB' size='2048'/> <pages unit='KiB' size='1048576'/> </cpu> ... <topology> <cells num='4'> <cell id='0'> <memory unit='KiB'>4054408</memory> <pages unit='KiB' size='4'>1013602</pages> <pages unit='KiB' size='2048'>3</pages> <pages unit='KiB' size='1048576'>1</pages> <distances/> <cpus num='1'> <cpu id='0' socket_id='0' core_id='0' siblings='0'/> </cpus> </cell> <cell id='1'> <memory unit='KiB'>4071072</memory> <pages unit='KiB' size='4'>1017768</pages> <pages unit='KiB' size='2048'>3</pages> <pages unit='KiB' size='1048576'>1</pages> <distances/> <cpus num='1'> <cpu id='1' socket_id='0' core_id='0' siblings='1'/> </cpus> </cell> ... </cells> </topology> ... </host> <guest/> </capabilities> Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
-
由 Michal Privoznik 提交于
For future work we need two functions that fetches total number of pages and number of free pages for given NUMA node and page size (virNumaGetPageInfo()). Then we need to learn pages of what sizes are supported on given node (virNumaGetPages()). Note that system page size is disabled at the moment as there's one issue connected. If you have a NUMA node with huge pages allocated the kernel would return the normal size of memory for that node. It basically ignores the fact that huge pages steal size from the system memory. Until we resolve this, it's safer to not confuse users and hence not report any system pages yet. Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
-
由 Michal Privoznik 提交于
For future work we want to get info for not only the free memory but overall memory size too. That's why the function must have new signature too. Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
-
由 Michal Privoznik 提交于
Not on all hosts the set of NUMA nodes IDs is continuous. This is critical, because our code currently assumes the set doesn't contain holes. For instance in nodeGetFreeMemory() we can see the following pattern: if ((max_node = virNumaGetMaxNode()) < 0) return 0; for (n = 0; n <= max_node; n++) { ... } while it should be something like this: if ((max_node = virNumaGetMaxNode()) < 0) return 0; for (n = 0; n <= max_node; n++) { if (!virNumaNodeIsAvailable(n)) continue; ... } Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
-
由 Eric Blake 提交于
Add knobs to virsh to manage a 2-phase active commit of the top layer, similar to knobs already present on blockcopy. While this code will fail until later patches actually implement the new knobs in the qemu driver, doing it now proves that the API is usable and also makes it easier for testing the qemu changes as they are made. * tools/virsh-domain.c (cmdBlockCommit): Add --active, --pivot, and --keep-overlay options, modeled after blockcopy. (blockJobImpl): Support --active flag. * tools/virsh.pod (blockcommit): Document new flags. (blockjob): Mention 2-phase commit interaction. Signed-off-by: NEric Blake <eblake@redhat.com>
-