- 11 4月, 2013 1 次提交
-
-
由 Osier Yang 提交于
-
- 10 4月, 2013 1 次提交
-
-
由 Laine Stump 提交于
Commit 9a3ff01d (which was ACKed at the end of January, but for some reason didn't get pushed until during the 1.0.4 freeze) fixed the logic in virPCIGetVirtualFunctions(). Unfortunately, a typo in the fix (replacing VIR_REALLOC_N with VIR_ALLOC_N during code movement) caused not only a memory leak, but also resulted in most of the elements of the result array being replaced with NULL. virNetDevGetVirtualFunctions() assumed (and I think rightly so) that virPCIGetVirtualFunctions() wouldn't return any NULL elements in the array, so it ended up segfaulting. This was found when attempting to use a virtual network with an auto-created pool of SRIOV VFs, e.g.: <forward mode='hostdev' managed='yes'> <pf dev='eth4'/> </forward> (the pool of PCI addresses is discovered by calling virNetDevGetVirtualFunctions() on the PF dev).
-
- 09 4月, 2013 1 次提交
-
-
由 Milos Vyletel 提交于
Even though http://libvirt.org/formatdomain.html#elementsMetadata states that it requires RFC4122 compliance UUIDs that are generated by virUUIDGenerate() are not. Following patch modifies generated UUIDs to conform to rules described in RFC. Signed-off-by: NMilos Vyletel <milos.vyletel@sde.cz>
-
- 08 4月, 2013 6 次提交
-
-
由 Daniel P. Berrange 提交于
The virCgroupMounted method is badly named, since a controller can be mounted, but disabled in the current object. Rename the method to be virCgroupHasController. Also make it tolerant to a NULL virCgroupPtr and out-of-range controller index, to avoid duplication of these checks in all callers Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
-
由 Osier Yang 提交于
This finds the parent for vHBA by iterating over all the HBA which supports vport_ops capability on the host, and return the first one which is online, not saturated (vports in use is less than max_vports).
-
由 Osier Yang 提交于
The helper iterates over sysfs, to find out the matched scsi host name by comparing the wwnn,wwpn pair. It will be used by checkPool and refreshPool of storage scsi backend. New helper getAdapterName is introduced in storage_backend_scsi.c, which uses the new util helper virGetFCHostNameByWWN to get the fc_host adapter name.
-
由 Daniel P. Berrange 提交于
The current way virObject instances are allocated using VIR_ALLOC_N causes alignment warnings util/virobject.c: In function 'virObjectNew': util/virobject.c:195:11: error: cast increases required alignment of target type [-Werror=cast-align] Changing to use VIR_ALLOC_VAR will avoid the need todo the casts entirely. Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
-
由 Daniel P. Berrange 提交于
The virNetlinkCommand() method takes an 'unsigned char **' parameter to be filled with the received netlink message. The callers then immediately cast this to 'struct nlmsghdr', triggering (bogus) warnings about increasing alignment requirements util/virnetdev.c: In function 'virNetDevLinkDump': util/virnetdev.c:1300:12: warning: cast increases required alignment of target type [-Wcast-align] resp = (struct nlmsghdr *)*recvbuf; ^ util/virnetdev.c: In function 'virNetDevSetVfConfig': util/virnetdev.c:1429:12: warning: cast increases required alignment of target type [-Wcast-align] resp = (struct nlmsghdr *)recvbuf; Since all callers cast to 'struct nlmsghdr' we can avoid the warning problem entirely by simply changing the signature of virNetlinkCommand to return a 'struct nlmsghdr **' instead of 'unsigned char **'. The way we do the cast inside virNetlinkCommand does not have any alignment issues. Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
-
由 Daniel P. Berrange 提交于
Playing games with field offsets in a struct causes all sorts of alignment warnings on ARM platforms util/virkeycode.c: In function '__virKeycodeValueFromString': util/virkeycode.c:26:7: warning: cast increases required alignment of target type [-Wcast-align] (*(typeof(field_type) *)((char *)(object) + field_offset)) ^ util/virkeycode.c:91:28: note: in expansion of macro 'getfield' const char *name = getfield(virKeycodes + i, const char *, name_offset); ^ util/virkeycode.c:26:7: warning: cast increases required alignment of target type [-Wcast-align] (*(typeof(field_type) *)((char *)(object) + field_offset)) ^ util/virkeycode.c:94:20: note: in expansion of macro 'getfield' return getfield(virKeycodes + i, unsigned short, code_offset); ^ util/virkeycode.c: In function '__virKeycodeValueTranslate': util/virkeycode.c:26:7: warning: cast increases required alignment of target type [-Wcast-align] (*(typeof(field_type) *)((char *)(object) + field_offset)) ^ util/virkeycode.c:127:13: note: in expansion of macro 'getfield' if (getfield(virKeycodes + i, unsigned short, from_offset) == key_value) ^ util/virkeycode.c:26:7: warning: cast increases required alignment of target type [-Wcast-align] (*(typeof(field_type) *)((char *)(object) + field_offset)) ^ util/virkeycode.c:128:20: note: in expansion of macro 'getfield' return getfield(virKeycodes + i, unsigned short, to_offset); There is no compelling reason to use a struct for the keycode tables. It can easily just use an array of arrays instead, avoiding all alignment problems Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
-
- 06 4月, 2013 1 次提交
-
-
由 Osier Yang 提交于
-
- 05 4月, 2013 2 次提交
-
-
由 Daniel P. Berrange 提交于
Currently when getting an instance of virCgroupPtr we will create the path in all cgroup controllers. Only at the virt driver layer are we attempting to filter controllers. This is bad because the mere act of creating the dirs in the controllers can have a functional impact on the kernel, particularly for performance. Update the virCgroupForDriver() method to accept a bitmask of controllers to use. Only create dirs in the controllers that are requested. When creating cgroups for domains, respect the active controller list from the parent cgroup Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
-
由 Daniel P. Berrange 提交于
The virCgroupGetAppRoot is not clear in its meaning. Change to virCgroupForSelf to highlight that this returns the cgroup config for the caller's process Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
-
- 04 4月, 2013 2 次提交
-
-
由 Daniel P. Berrange 提交于
The Raspberry Pi runs the armv6l architecture and apparently people are trying to run libvirt LXC on it. So we should allow that as a valid arch Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
-
由 Daniel P. Berrange 提交于
Implement the bare minimal sysinfo for ARM platforms by reading the CPU models from /proc/cpuinfo Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
-
- 02 4月, 2013 2 次提交
-
-
由 Peter Krempa 提交于
Format the address using the helper instead of having similar code in multiple places. This patch also fixes leak of the MAC address string in ebtablesRemoveForwardAllowIn() and ebtablesAddForwardAllowIn() in src/util/virebtables.c
-
由 Peter Krempa 提交于
The domain XML generator creates the mac addres strings with lowercase strings with a separate piece of code. This patch changes the formating helper to do the same stuff to allow using it to normalize a string provided by the user. After this change some of the tests that are outputing the mac address will need to be changed.
-
- 28 3月, 2013 3 次提交
-
-
由 Michal Privoznik 提交于
There has been a typo in virIsCapbleVport function name.
-
由 Osier Yang 提交于
--- Pushed under build-breaker rule.
-
由 Stefan Seyfried 提交于
iptables-1.4.18 removed the long deprecated "state" match. Use "conntrack" instead in forwarding rules. Fixes openSUSE bug https://bugzilla.novell.com/811251 #811251.
-
- 27 3月, 2013 1 次提交
-
-
由 Jiri Denemark 提交于
When we write a log message into a log, we separate thread ID from timestamp using ": ". However, when storing the message into the ring buffer, we omitted the separator, e.g.: 2013-02-27 11:49:11.852+00003745: ...
-
- 25 3月, 2013 5 次提交
-
-
由 Osier Yang 提交于
The string written to "vport_create" or "vport_delete" should be "wwnn:wwpn", but not "wwpn:wwnn".
-
由 Osier Yang 提交于
virPCIGetVirtualFunctions returns 0 even if there is no "virtfn" entry under the device sysfs path. And virPCIGetVirtualFunctions returns -1 when it fails to get the PCI config space of one VF, however, with keeping the the VFs already detected. That's why udevProcessPCI and gather_pci_cap use logic like: if (!virPCIGetVirtualFunctions(syspath, &data->pci_dev.virtual_functions, &data->pci_dev.num_virtual_functions) || data->pci_dev.num_virtual_functions > 0) data->pci_dev.flags |= VIR_NODE_DEV_CAP_FLAG_PCI_VIRTUAL_FUNCTION; to tag the PCI device with "virtual_function" cap. However, this results in a VF will aslo get "virtual_function" cap. This patch fixes it by: * Ignoring the VF which has failure of getting PCI config space (given that the successfully detected VFs are kept , it makes sense to not give up on the failure of one VF too) with a warning, so virPCIGetVirtualFunctions will not return -1 except out of memory. * Free the allocated *virtual_functions when out of memory And thus the logic can be changed to: /* Out of memory */ int ret = virPCIGetVirtualFunctions(syspath, &data->pci_dev.virtual_functions, &data->pci_dev.num_virtual_functions); if (ret < 0 ) goto out; if (data->pci_dev.num_virtual_functions > 0) data->pci_dev.flags |= VIR_NODE_DEV_CAP_FLAG_PCI_VIRTUAL_FUNCTION;
-
由 Osier Yang 提交于
This abstracts nodeDeviceVportCreateDelete as an util function virManageVport, which can be further used by later storage patches (to support persistent vHBA, I don't want to create the vHBA using the public API, which is not good).
-
由 Osier Yang 提交于
This adds two util functions (virIsCapableFCHost and virIsCapableVport), and rename helper check_fc_host_linux as detect_scsi_host_caps, check_capable_vport_linux is removed, as it's abstracted to the util function virIsCapableVport. detect_scsi_host_caps nows detect both the fc_host and vport_ops capabilities. "stat(2)" is replaced with "access(2)" for saving. * src/util/virutil.h: - Declare virIsCapableFCHost and virIsCapableVport * src/util/virutil.c: - Implement virIsCapableFCHost and virIsCapableVport * src/node_device/node_device_linux_sysfs.c: - Remove check_capable_vport_linux - Rename check_fc_host_linux as detect_scsi_host_caps, and refactor it a bit to detect both fc_host and vport_os capabilities * src/node_device/node_device_driver.h: - Change/remove the related declarations * src/node_device/node_device_udev.c: (Use detect_scsi_host_caps) * src/node_device/node_device_hal.c: (Likewise) * src/node_device/node_device_driver.c (Likewise)
-
由 Osier Yang 提交于
"open_wwn_file" in node_device_linux_sysfs.c is redundant, on one hand it duplicates work of virFileReadAll, on the other hand, it's waste to use a function for it, as there is no other users of it. So I don't see why the file opening work cannot be done in "read_wwn_linux". "read_wwn_linux" can be abstracted as an util function. As what all it does is to read the sysfs entry. So this patch removes "open_wwn_file", and abstract "read_wwn_linux" as an util function "virReadFCHost" (a more general name, because after changes, it can read each of the fc_host entry now). * src/util/virutil.h: (Declare virReadFCHost) * src/util/virutil.c: (Implement virReadFCHost) * src/node_device/node_device_linux_sysfs.c: (Remove open_wwn_file, and read_wwn_linux) src/node_device/node_device_driver.h: (Remove the declaration of read_wwn_linux, and the related macros) src/libvirt_private.syms: (Export virReadFCHost)
-
- 22 3月, 2013 2 次提交
-
-
由 Ján Tomko 提交于
-
由 Michal Privoznik 提交于
If users build with --enable-test-oom configure option, they get this error saying, virAllocTest* functions are not defined within tests/testutils.c.
-
- 21 3月, 2013 2 次提交
-
-
由 Daniel P. Berrange 提交于
Some code mistakenly called virIdentityOnceInit directly instead of virIdentityInitialize(). This meant that one-time initializer was run many times with predictably bad results.
-
由 Gao feng 提交于
We will use virCgroupRemoveRecursively to remove cgroup directories in the coming patch. Signed-off-by: NGao feng <gaofeng@cn.fujitsu.com>
-
- 20 3月, 2013 3 次提交
-
-
由 Daniel P. Berrange 提交于
The virNetSocket & virIdentity classes accidentally got some conditionals using HAVE_SELINUX instead of WITH_SELINUX. Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
-
由 Gao feng 提交于
Intend to reduce the redundant code,use virNumaSetupMemoryPolicy to replace virLXCControllerSetupNUMAPolicy and qemuProcessInitNumaMemoryPolicy. This patch also moves the numa related codes to the file virnuma.c and virnuma.h Signed-off-by: NGao feng <gaofeng@cn.fujitsu.com>
-
由 Gao feng 提交于
qemuGetNumadAdvice will be used by LXC driver, rename it to virNumaGetAutoPlacementAdvice and move it to virnuma.c Signed-off-by: NGao feng <gaofeng@cn.fujitsu.com>
-
- 19 3月, 2013 3 次提交
-
-
由 Daniel P. Berrange 提交于
If no user identity is available, some operations may wish to use the system identity. ie the identity of the current process itself. Add an API to get such an identity. Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
-
由 Daniel P. Berrange 提交于
To allow any internal API to get the current identity, add APIs to associate a virIdentityPtr with the current thread, via a thread local Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
-
由 Daniel P. Berrange 提交于
Introduce a local object virIdentity for managing security attributes used to form a client application's identity. Instances of this object are intended to be used as if they were immutable, once created & populated with attributes Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
-
- 16 3月, 2013 1 次提交
-
-
由 Eric Blake 提交于
We've already scrubbed for comparisons of 'uid_t == -1' (which fail on platforms where uid_t is a u16), but another one snuck in. * src/util/virutil.c (virSetUIDGIDWithCaps): Correct uid comparison. * cfg.mk (sc_prohibit_risky_id_promotion): New rule.
-
- 15 3月, 2013 1 次提交
-
-
由 Laine Stump 提交于
My commit 7a2e845a (and its prerequisites) managed to effectively ignore the clear_emulator_capabilities setting in qemu.conf (visible in the code as the VIR_EXEC_CLEAR_CAPS flag when qemu is being exec'ed), with the result that the capabilities are always cleared regardless of the qemu.conf setting. This patch fixes it by passing the flag through to virSetUIDGIDWithCaps(), which uses it to decide whether or not to clear existing capabilities before adding in those that were requested. Note that the existing capabilities are *always* cleared if the new process is going to run as non-root, since the whole point of running non-root is to have the capabilities removed (it's still possible to maintain individual capabilities as needed using the capBits argument though).
-
- 14 3月, 2013 2 次提交
-
-
由 Ján Tomko 提交于
Commit 027bf2ea used the wrong offset: the text field at the start of the header has 64 bytes, not 68. [1] Bug: https://bugzilla.redhat.com/show_bug.cgi?id=921452 [1] https://forums.virtualbox.org/viewtopic.php?p=29267#p29267
-
由 Guannan Ren 提交于
In debug mode, the bug failed to start vm error: Failed to start domain rhel5u9 error: internal error Out of space while reading console log output: ...
-
- 13 3月, 2013 1 次提交
-
-
由 Daniel P. Berrange 提交于
Add a virThreadCancel function. This functional is inherently dangerous and not something we want to use in general, but integration with SELinux requires that we provide this stub. We leave out any Win32 impl to discourage further use and because obviously SELinux isn't enabled on Win32 Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
-