- 15 6月, 2012 22 次提交
-
-
由 Daniel P. Berrange 提交于
Currently each USB2 companion controller gets put on a separate PCI slot. Not only is this wasteful of PCI slots, but it is not in compliance with the spec for USB2 controllers. The master echi1 and all companion controllers should be in the same slot, with echi1 in function 7, and uhci1-3 in functions 0-2 respectively. * src/qemu/qemu_command.c: Special case handling of USB2 controllers to apply correct pci slot assignment * tests/qemuxml2argvdata/qemuxml2argv-usb-ich9-ehci-addr.args, tests/qemuxml2argvdata/qemuxml2argv-usb-ich9-ehci-addr.xml: Expand test to cover automatic slot assignment (cherry picked from commit 1ebd52cb) Conflicts: tests/qemuxml2xmltest.c
-
由 Daniel P. Berrange 提交于
The virDomainDeviceInfoIsSet API was only checking if an address or alias was set in the struct. Thus if only a rom bar setting / filename, boot index, or USB master value was set, they could be accidentally dropped when formatting XML (cherry picked from commit 2c195fdb)
-
由 Daniel P. Berrange 提交于
Sometimes it is useful to see the callpath for log messages. This change enhances the log filter syntax so that stack traces can be show by setting '1:+NAME' instead of '1:NAME'. This results in output like: 2012-05-09 14:18:45.136+0000: 13314: debug : virInitialize:414 : register drivers /home/berrange/src/virt/libvirt/src/.libs/libvirt.so.0(virInitialize+0xd6)[0x7f89188ebe86] /home/berrange/src/virt/libvirt/tools/.libs/lt-virsh[0x431921] /lib64/libc.so.6(__libc_start_main+0xf5)[0x3a21e21735] /home/berrange/src/virt/libvirt/tools/.libs/lt-virsh[0x40a279] 2012-05-09 14:18:45.136+0000: 13314: debug : virRegisterDriver:775 : driver=0x7f8918d02760 name=Test /home/berrange/src/virt/libvirt/src/.libs/libvirt.so.0(virRegisterDriver+0x6b)[0x7f89188ec717] /home/berrange/src/virt/libvirt/src/.libs/libvirt.so.0(+0x11b3ad)[0x7f891891e3ad] /home/berrange/src/virt/libvirt/src/.libs/libvirt.so.0(virInitialize+0xf3)[0x7f89188ebea3] /home/berrange/src/virt/libvirt/tools/.libs/lt-virsh[0x431921] /lib64/libc.so.6(__libc_start_main+0xf5)[0x3a21e21735] /home/berrange/src/virt/libvirt/tools/.libs/lt-virsh[0x40a279] * docs/logging.html.in: Document new syntax * configure.ac: Check for execinfo.h * src/util/logging.c, src/util/logging.h: Add support for stack traces * tests/testutils.c: Adapt to API change Signed-off-by: NDaniel P. Berrange <berrange@redhat.com> (cherry picked from commit 54856395)
-
由 Daniel P. Berrange 提交于
According to Fedora guidelines, because we bundle gnulib we need to add a virtual Provides: bundled(gnulib). https://fedoraproject.org/wiki/Packaging:No_Bundled_Libraries#Requirement_if_you_bundle (cherry picked from commit 3247b63b)
-
由 Osier Yang 提交于
$LISTFILE is created even no domain is running, and the empty $LISTFILE could cause improper service status. stopped ,with saved guests Which is not right, as there is no domain was saved. (cherry picked from commit c086af6b)
-
由 Osier Yang 提交于
On some of the NUMA platforms, the CPU index in each NUMA node grows non-consecutive. While on other platforms, it can be inconsecutive, E.g. % numactl --hardware available: 4 nodes (0-3) node 0 cpus: 0 4 8 12 16 20 24 28 node 0 size: 131058 MB node 0 free: 86531 MB node 1 cpus: 1 5 9 13 17 21 25 29 node 1 size: 131072 MB node 1 free: 127070 MB node 2 cpus: 2 6 10 14 18 22 26 30 node 2 size: 131072 MB node 2 free: 127758 MB node 3 cpus: 3 7 11 15 19 23 27 31 node 3 size: 131072 MB node 3 free: 127226 MB node distances: node 0 1 2 3 0: 10 20 20 20 1: 20 10 20 20 2: 20 20 10 20 3: 20 20 20 10 This patch is to fix the problem by using the CPU index in caps->host.numaCell[i]->cpus[i] to set the bitmask instead of assuming the CPU index of the NUMA nodes are always sequential. (cherry picked from commit d1bdeca8)
-
由 Li Zhang 提交于
For pseries guest, the default controller model is ibmvscsi controller, this controller only can work on spapr-vio address. This patch is to assign spapr-vio address type to ibmvscsi controller and correct vscsi test case. Signed-off-by: NLi Zhang <zhlcindy@linux.vnet.ibm.com> (cherry picked from commit bb725ac1)
-
由 Matthias Bolte 提交于
Appending an item to a list transfers ownership of that item to the list owner. But an error can occur in between item allocation and appending it to the list. In this case the item has to be freed explicitly. This was not done in some special cases resulting in possible memory leaks. Reported by Coverity. (cherry picked from commit 3b9a1295)
-
由 Peter Krempa 提交于
This patch lifts the limit of calling thread detection code only on KVM guests. With upstream qemu the thread mappings are reported also on non-KVM machines. QEMU adopted the thread_id information from the kvm branch. To remain compatible with older upstream versions of qemu the check is attempted but the failure to detect threads (or even run the monitor command - on older versions without SMP support) is treated non-fatal and the code reports one vCPU with pid of the hypervisor (in same fashion this was done on non-KVM guests). (cherry picked from commit c8335269)
-
由 Peter Krempa 提交于
After a cpu hotplug the qemu driver did not refresh information about virtual processors used by qemu and their corresponding threads. This patch forces a re-detection as is done on start of QEMU. This ensures that correct information is reported by the virDomainGetVcpus API and "virsh vcpuinfo". A failure to obtain the thread<->vcpu mapping is treated non-fatal and the mapping is not updated in a case of failure as not all versions of QEMU report this in the info cpus command. (cherry picked from commit 3163682b)
-
由 Peter Krempa 提交于
This patch changes a switch statement into ifs when handling live vs. configuration modifications getting rid of redundant code in case when both live and persistent configuration gets changed. (cherry picked from commit e99ad93d)
-
由 Guannan Ren 提交于
when failing to attach another usb device to a domain for some reason which has one use device attached before, the libvirtd crashed. The crash is caused by null-pointer dereference error in invoking usbDeviceListSteal passed in NULL value usb variable. commit 05abd150 introduces the bug. (cherry picked from commit ab5fb8f3)
-
由 Eric Blake 提交于
Based on a report by Seth Vidal. Just because _you_ can use virsh to connect to both source and destinations does not mean that libvirtd on the source (aka _root_) can likewise connect to the destination; this matters when setting up a peer-to-peer migration instead of a native one. * docs/migration.html.in: Mention that in peer-to-peer, the owner of the source libvirtd (usually root) must be able to connect to the destination. (cherry picked from commit 38bd605b)
-
由 Osier Yang 提交于
s/nuamd/numad/, (cherry picked from commit eecee94c)
-
由 Eric Blake 提交于
Commit 97010eb1 forgot to change the other side of an #ifdef. * src/qemu/qemu_process.c (qemuProcessInitNumaMemoryPolicy): Add argument. (cherry picked from commit 5c650b98)
-
由 Jim Fehlig 提交于
No useful error was being reported when an invalid character device target type is specified in the domainXML. E.g. ... <console type="pty"> <source path="/dev/pts/2"/> <target type="kvm" port="0"/> </console> ... resulted in error: Failed to define domain from x.xml error: An error occurred, but the cause is unknown With this small patch, the error is more helpful error: Failed to define domain from x.xml error: XML error: unknown target type 'kvm' specified for character device (cherry picked from commit 10a87145)
-
由 Osier Yang 提交于
Not only support CPU placement now. (cherry picked from commit b736e722)
-
由 Osier Yang 提交于
Since now we pre-set memory policy using libnuma to fully drive numad, it needs to check numactl-devel if "with_numad" is "yes". configure with groups "--with-numad=yes --with-numactl=yes", "--with-numad=no --with-numactl=yes", "--with-numad=yes --with-numactl=yes" works fine after the change. (cherry picked from commit b0f32445)
-
由 Eric Blake 提交于
It turns out that when cgroups are enabled, the use of a block device for a snapshot target was failing with EPERM due to libvirt failing to add the block device to the cgroup whitelist. See also https://bugzilla.redhat.com/show_bug.cgi?id=810200 * src/qemu/qemu_driver.c (qemuDomainSnapshotCreateSingleDiskActive) (qemuDomainSnapshotUndoSingleDiskActive): Account for cgroup. (qemuDomainSnapshotCreateDiskActive): Update caller. (cherry picked from commit 8be304ec)
-
由 Alon Levy 提交于
Alon tried './qemuxml2argvtest --help' to figure out a test failure, but it didn't help. The information is in HACKING, but it doesn't hurt to make the tests also provide their own help. Signed-off-by: NAlon Levy <alevy@redhat.com> Signed-off-by: NEric Blake <eblake@redhat.com> (cherry picked from commit 75d155ec)
-
由 Eric Blake 提交于
We only know -lpthread exists on platforms where we build threads-pthread.c; but when we build threads-win32.c, LIB_PTHREAD is empty. * tests/Makefile.am (shunloadtest_LDADD): Use correct library. (cherry picked from commit 0ca336b3)
-
由 Jim Meyering 提交于
* tools/virsh.c (vshParseSnapshotDiskspec): Fix off-by-3 memmove that would corrupt heap when parsing escaped --diskspec comma. Bug introduced via commit v0.9.4-260-g35d52b56. (cherry picked from commit c6694ab8)
-
- 14 6月, 2012 18 次提交
-
-
由 Laine Stump 提交于
Until now, the nl_pid of the source address of every message sent by virNetlinkCommand has been set to the value of getpid(). Most of the time this doesn't matter, and in the one case where it does (communication with lldpad), it previously was the proper thing to do, because the netlink event service (which listens on a netlink socket for unsolicited messages from lldpad) coincidentally always happened to bind with a local nl_pid == getpid(). With the fix for: https://bugzilla.redhat.com/show_bug.cgi?id=816465 that particular nl_pid is now effectively a reserved value, so the netlink event service will always bind to something else (coincidentally "getpid() + (1 << 22)", but it really could be anything). The result is that communication between lldpad and libvirtd is broken (lldpad gets a "disconnected" error when it tries to send a directed message). The solution to this problem caused by a solution, is to query the netlink event service's nlhandle for its "local_port", and send that as the source nl_pid (but only when sending to lldpad, of course - in other cases we maintain the old behavior of sending getpid()). There are two cases where a message is being directed at lldpad - one in virNetDevLinkDump, and one in virNetDevVPortProfileOpSetLink. The case of virNetDevVPortProfileOpSetLink is simplest to explain - only if !nltarget_kernel, i.e. the message isn't targetted for the kernel, is the dst_pid set (by calling virNetDevVPortProfileGetLldpadPid()), so only in that case do we call virNetlinkEventServiceLocalPid() to set src_pid. For virNetDevLinkDump, it's a bit more complicated. The call to virNetDevVPortProfileGetLldpadPid() was effectively up one level (in virNetDevVPortProfileOpCommon), although obscured by an unnecessary passing of a function pointer. This patch removes the function pointer, and calls virNetDevVPortProfileGetLldpadPid() directly in virNetDevVPortProfileOpCommon - if it's doing this, it knows that it should also call virNetlinkEventServiceLocalPid() to set src_pid too; then it just passes src_pid and dst_pid down to virNetDevLinkDump. Since (src_pid == 0 && dst_pid == 0) implies that the kernel is the destination, there is no longer any need to send nltarget_kernel as an arg to virNetDevLinkDump, so it's been removed. The disparity between src_pid being int and dst_pid being uint32_t may be a bit disconcerting to some, but I didn't want to complicate virNetlinkEventServiceLocalPid() by having status returned separately from the value. (cherry picked from commit cc073771)
-
由 Laine Stump 提交于
This value will be needed to set the src_pid when sending netlink messages to lldpad. It is part of the solution to: https://bugzilla.redhat.com/show_bug.cgi?id=816465 Note that libnl's port generation algorithm guarantees that the nl_socket_get_local_port() will always be > 0 (since it is "getpid() + (n << 22>" where n is always < 1024), so it is okay to cast the uint32_t to int (thus allowing us to use -1 as an error sentinel). (cherry picked from commit c99e9375)
-
由 Laine Stump 提交于
Until now, virNetlinkCommand has assumed that the nl_pid in the source address of outgoing netlink messages should always be the return value of getpid(). In most cases it actually doesn't matter, but in the case of communication with lldpad, lldpad saves this info and later uses it to send netlink messages back to libvirt. A recent patch to fix Bug 816465 changed the order of the universe such that the netlink event service socket is no longer bound with nl_pid == getpid(), so lldpad could no longer send unsolicited messages to libvirtd. Adding src_pid as an argument to virNetlinkCommand() is the first step in notifying lldpad of the proper address of the netlink event service socket. (cherry picked from commit cca7bb1f)
-
由 Laine Stump 提交于
This is part of the solution to the problem detailed in: https://bugzilla.redhat.com/show_bug.cgi?id=816465 and further detailed in https://www.redhat.com/archives/libvir-list/2012-May/msg00202.htm A short explanation is included in the comments of the patch itself. Note that this patch by itself breaks communication between lldpad and libvirtd, so the other 3 patches in the series must be applied at the same time as this patch. (cherry picked from commit 64297313) Conflicts: daemon/libvirtd.c
-
由 Guannan Ren 提交于
src/qemu/qemu_hostdev.c: refactor qemuPrepareHostdevUSBDevices function, make it focus on adding usb device to activeUsbHostdevs after check. After that, the usb hotplug function qemuDomainAttachHostDevice also could use it. expand qemuPrepareHostUSBDevices to perform the usb search, rollback on failure. src/qemu/qemu_hotplug.c: If there are multiple usb devices available with same vendorID and productID, but with different value of "bus, device", we give an error to let user use <address> to specify the desired one. (cherry picked from commit 05abd150)
-
由 Guannan Ren 提交于
usbFindDevice():get usb device according to idVendor, idProduct, bus, device it is the exact match of the four parameters usbFindDeviceByBus():get usb device according to bus, device it returns only one usb device same as usbFindDevice usbFindDeviceByVendor():get usb device according to idVendor,idProduct it probably returns multiple usb devices. usbDeviceSearch(): a helper function to do the actual search (cherry picked from commit 9914477e)
-
由 Cole Robinson 提交于
(cherry picked from commit f4345ac2) Conflicts: libvirt.spec.in
-
由 Jiri Denemark 提交于
When we added the default USB controller into domain XML, we efficiently broke migration to older versions of libvirt that didn't support USB controllers at all (0.9.4 and earlier) even for domains that don't use anything that the older libvirt can't provide. We still want to present the default USB controller in any XML seen by a user/app but we can safely remove it from the domain XML used during migration. If we are migrating to a new enough libvirt, it will add the controller XML back, while older libvirt won't be confused with it although it will still tell qemu to create the controller. Similar approach can be used in the future whenever we find out we always enabled some kind of device without properly advertising it in domain XML. (cherry picked from commit 409b5f54)
-
由 Jiri Denemark 提交于
Always use appropriate qemuDomain{,Def}Format wrapper since it may do some additional magic based on the flags. (cherry picked from commit cd603008)
-
由 Eric Blake 提交于
Commit 4c82f09e added a capability check for qemu per-device io throttling, but only applied it to domain startup. As mentioned in the previous commit (98cec052), the user can still get an 'internal error' message during a hotplug attempt, when the monitor command doesn't exist. It is confusing to allow tuning on inactive domains only to then be rejected when starting the domain. * src/qemu/qemu_driver.c (qemuDomainSetBlockIoTune): Reject offline tuning if online can't match it. (cherry picked from commit 13f9a193)
-
由 Eric Blake 提交于
If you have a qemu build that lacks the blockio tune monitor command, then this command: $ virsh blkdeviotune rhel6u2 hda --total_bytes_sec 1000 error: Unable to change block I/O throttle error: internal error Unexpected error fails as expected (well, the error message is lousy), but the next dumpxml shows that the domain was modified anyway. Worse, that means if you save the domain then restore it, the restore will likely fail due to throttling being unsupported, even though no throttling should even be active because the monitor command failed in the first place. * src/qemu/qemu_driver.c (qemuDomainSetBlockIoTune): Check for error before making modification permanent. (cherry picked from commit 98cec052)
-
由 Laine Stump 提交于
These two functions are called from main() on all platforms, and always return success on platforms that don't support libnl. They still log an error message, though, which doesn't make sense - they should just be NOPs on those platforms. (Per a suggestion during review, I've turned the logs into debug messages rather than removing them completely). (cherry picked from commit bae4ff28)
-
由 Stefan Berger 提交于
Error: STRING_NULL: /libvirt/src/node_device/node_device_linux_sysfs.c:80: string_null_argument: Function "saferead" does not terminate string "*buf". /libvirt/src/util/util.c:101: string_null_argument: Function "read" fills array "*buf" with a non-terminated string. /libvirt/src/node_device/node_device_linux_sysfs.c:87: string_null: Passing unterminated string "buf" to a function expecting a null-terminated string. (cherry picked from commit 43d1616f)
-
由 Stefan Berger 提交于
Error: STRING_NULL: /libvirt/src/util/uuid.c:273: string_null_argument: Function "getDMISystemUUID" does not terminate string "*dmiuuid". /libvirt/src/util/uuid.c:241: string_null_argument: Function "saferead" fills array "*uuid" with a non-terminated string. /libvirt/src/util/util.c:101: string_null_argument: Function "read" fills array "*buf" with a non-terminated string. /libvirt/src/util/uuid.c:274: string_null: Passing unterminated string "dmiuuid" to a function expecting a null-terminated string. /libvirt/src/util/uuid.c:138: var_assign_parm: Assigning: "cur" = "uuidstr". They now point to the same thing. /libvirt/src/util/uuid.c:164: string_null_sink_loop: Searching for null termination in an unterminated array "cur". (cherry picked from commit b4586051)
-
由 Stefan Berger 提交于
Error: RESOURCE_LEAK: /libvirt/tests/qemuxml2argvtest.c:47: alloc_arg: Calling allocation function "virAlloc" on "ret". /libvirt/src/util/memory.c:101: alloc_fn: Storage is returned from allocation function "calloc". /libvirt/src/util/memory.c:101: var_assign: Assigning: "*((void **)ptrptr)" = "calloc(1UL, size)". /libvirt/tests/qemuxml2argvtest.c:54: leaked_storage: Variable "ret" going out of scope leaks the storage it points to. (cherry picked from commit a01e6721)
-
由 Stefan Berger 提交于
Error: RESOURCE_LEAK: /libvirt/src/qemu/qemu_driver.c:6968: alloc_fn: Calling allocation function "calloc". /libvirt/src/qemu/qemu_driver.c:6968: var_assign: Assigning: "nodeset" = storage returned from "calloc(1UL, 1UL)". /libvirt/src/qemu/qemu_driver.c:6977: noescape: Variable "nodeset" is not freed or pointed-to in function "virTypedParameterAssign". /libvirt/src/qemu/qemu_driver.c:6997: leaked_storage: Variable "nodeset" going out of scope leaks the storage it points to. (cherry picked from commit c0774482)
-
由 Stefan Berger 提交于
Error: RESOURCE_LEAK: /libvirt/src/vmx/vmx.c:2431: alloc_fn: Calling allocation function "calloc". /libvirt/src/vmx/vmx.c:2431: var_assign: Assigning: "networkName" = storage returned from "calloc(1UL, 1UL)". /libvirt/src/vmx/vmx.c:2495: leaked_storage: Variable "networkName" going out of scope leaks the storage it points to. (cherry picked from commit 409a637e)
-
由 Osier Yang 提交于
(cherry picked from commit fd2b4157)
-