- 26 1月, 2013 5 次提交
-
-
由 Jim Fehlig 提交于
libxlDoDomainSave() was removing non-persistent domains, but required callers to have the virDomainObj locked. Callers could potentially unlock an already freed virDomainObj. Move this logic to the callers of libxlDoDomainSave().
-
由 Jim Fehlig 提交于
I've noticed that libxl can invoke timeout reregister/modify hooks after returning from libxl_ctx_free. Explicitly remove the timeouts before freeing the libxl ctx to avoid executing hooks on stale objects.
-
由 Jim Fehlig 提交于
It is possible to destroy and cleanup a VM, resulting in freeing the libxlDomainObjPrivate object and associated libxl ctx, before all fds and timeouts have been deregistered and destroyed. Fix this race by incrementing the reference count on libxlDomainObjPrivate for each fd and timeout registration. Only when all fds and timeouts are deregistered and destroyed will the libxlDomainObjPrivate be destroyed.
-
由 Jim Fehlig 提交于
The libxl driver is racy in it's interactions with libxl and libvirt's event loop. The event loop can invoke callbacks after libxl has deregistered the event, and possibly access freed data associated with the event. This patch fixes the race by converting libxlDomainObjPrivate to a virObjectLockable, and locking it while executing libxl upcalls and libvirt event loop callbacks. Note that using the virDomainObj lock is not satisfactory since it may be desirable to hold the virDomainObj lock even when libxl events such as reading and writing to xenstore need processed.
-
由 Jim Fehlig 提交于
xen-unstable changeset 26469 makes changes wrt modifying and deregistering timeouts. First, timeout modify callbacks will only be invoked with an abs_t of {0,0}, i.e. make the timeout fire immediately. Prior to this commit, timeout modify callbacks were never invoked. Second, timeout deregister hooks will no longer be called. This patch makes changes in the libvirt libxl driver that should be compatible before and after changeset 26469. While at it, fix a potential overflow in the timeout register callback.
-
- 17 1月, 2013 5 次提交
-
-
由 Jim Fehlig 提交于
If building the libxl domain config fails, cleanup before returning failure.
-
由 Jim Fehlig 提交于
-
由 Jim Fehlig 提交于
Callers should not free death events provided by libxl_evdisable_FOO().
-
由 Jim Fehlig 提交于
Use consistent parameter names throughout the libxl timeout and fd event functions.
-
由 Jim Fehlig 提交于
Commit dfa1e1dd added functions whose definitions do not conform to the style used in the libxl driver. Change these functions to be consistent throughout the driver.
-
- 16 1月, 2013 2 次提交
-
-
由 Daniel P. Berrange 提交于
Replace the current libxl driver code for managing port reservations with the new virPortAllocator APIs.
-
由 Daniel P. Berrange 提交于
The virDomainObj, qemuAgent, qemuMonitor, lxcMonitor classes all require a mutex, so can be switched to use virObjectLockable Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
-
- 21 12月, 2012 6 次提交
-
-
由 Daniel P. Berrange 提交于
-
由 Daniel P. Berrange 提交于
-
由 Daniel P. Berrange 提交于
-
由 Daniel P. Berrange 提交于
-
由 Daniel P. Berrange 提交于
-
由 Daniel P. Berrange 提交于
-
- 19 12月, 2012 2 次提交
-
-
由 Martin Kletzander 提交于
This patch fixes just the word Affinites to Affinities (it's really painful to search in TAGS without being able to find the right function).
-
由 Daniel P. Berrange 提交于
Convert the host capabilities and domain config structs to use the virArch datatype. Update the parsers and all drivers to take account of datatype change Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
-
- 07 12月, 2012 1 次提交
-
-
由 Jim Fehlig 提交于
Based on a patch originally authored by Daniel De Graaf http://lists.xen.org/archives/html/xen-devel/2012-05/msg00565.html This patch converts the Xen libxl driver to support only Xen >= 4.2. Support for Xen 4.1 libxl is dropped since that version of libxl is designated 'technology preview' only and is incompatible with Xen 4.2 libxl. Additionally, the default toolstack in Xen 4.1 is still xend, for which libvirt has a stable, functional driver.
-
- 04 12月, 2012 1 次提交
-
-
由 Daniel P. Berrange 提交于
Currently to deal with auto-shutdown libvirtd must periodically poll all stateful drivers. Thus sucks because it requires acquiring both the driver lock and locks on every single virtual machine. Instead pass in a "inhibit" callback to virStateInitialize which drivers can invoke whenever they want to inhibit shutdown due to existance of active VMs. Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
-
- 30 11月, 2012 1 次提交
-
-
由 Daniel P. Berrange 提交于
The virStateInitialize method and several cgroups methods were using an 'int privileged' parameter or similar for dual-state values. These are better represented with the bool type. Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
-
- 02 11月, 2012 1 次提交
-
-
由 Daniel P. Berrange 提交于
The libvirt coding standard is to use 'function(...args...)' instead of 'function (...args...)'. A non-trivial number of places did not follow this rule and are fixed in this patch. Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
-
- 20 10月, 2012 1 次提交
-
-
由 Eric Blake 提交于
Actually use the enum in the domain conf structure. * src/conf/domain_conf.h (_virDomainDiskDef): Store enum rather than string for disk type. * src/conf/domain_conf.c (virDomainDiskDefFree) (virDomainDiskDefParseXML, virDomainDiskDefFormat) (virDomainDiskDefForeachPath): Adjust users. * src/xenxs/xen_sxpr.c (xenParseSxprDisks, xenFormatSxprDisk): Likewise. * src/xenxs/xen_xm.c (xenParseXM, xenFormatXMDisk): Likewise. * src/vbox/vbox_tmpl.c (vboxAttachDrives): Likewise. * src/libxl/libxl_conf.c (libxlMakeDisk): Likewise.
-
- 21 9月, 2012 1 次提交
-
-
由 Eric Blake 提交于
https://www.gnu.org/licenses/gpl-howto.html recommends that the 'If not, see <url>.' phrase be a separate sentence. * tests/securityselinuxhelper.c: Remove doubled line. * tests/securityselinuxtest.c: Likewise. * globally: s/; If/. If/
-
- 18 9月, 2012 1 次提交
-
-
由 Hu Tao 提交于
Add a new member variable map_len to store map len of bitmap. and rename size to max_bit accordingly. rename virBitmapAlloc to virBitmapNew.
-
- 30 8月, 2012 1 次提交
-
-
由 Peter Krempa 提交于
virDomainVcpuPinAdd does a realloc on vcpupin_list if the new vcpu pin definition doesn't fit into the array. The list is an array of pointers but the function definition didn't support returning the changed pointer to the caller if it was realloced. This caused segfaults if realloc would change the base pointer.
-
- 22 8月, 2012 1 次提交
-
-
由 Hu Tao 提交于
-
- 14 8月, 2012 1 次提交
-
-
由 Osier Yang 提交于
As the consensus in: https://www.redhat.com/archives/libvir-list/2012-July/msg01692.html, this patch is to destroy conf/virdomainlist.[ch], folding the helpers into conf/domain_conf.[ch]. * src/Makefile.am: - Various indention fixes incidentally - Add macro DATATYPES_SOURCES (datatypes.[ch]) - Link datatypes.[ch] for libvirt_lxc * src/conf/domain_conf.c: - Move all the stuffs from virdomainlist.c into it - Use virUnrefDomain and virUnrefDomainSnapshot instead of virDomainFree and virDomainSnapshotFree, which are defined in libvirt.c, and we don't want to link to it. - Remove "if" before "free" the object, as virObjectUnref is in the list "useless_free_options". * src/conf/domain_conf.h: - Move all the stuffs from virdomainlist.h into it - s/LIST_FILTER/LIST_DOMAINS_FILTER/ * src/libxl/libxl_driver.c: - s/LIST_FILTER/LIST_DOMAINS_FILTER/ - no (include "virdomainlist.h") * src/libxl/libxl_driver.c: Likewise * src/lxc/lxc_driver.c: Likewise * src/openvz/openvz_driver.c: Likewise * src/parallels/parallels_driver.c: Likewise * src/qemu/qemu_driver.c: Likewise * src/test/test_driver.c: Likewise * src/uml/uml_driver.c: Likewise * src/vbox/vbox_tmpl.c: Likewise * src/vmware/vmware_driver.c: Likewise * tools/virsh-domain-monitor.c: Likewise * tools/virsh.c: Likewise
-
- 07 8月, 2012 1 次提交
-
-
由 Daniel P. Berrange 提交于
Switch virDomainObjPtr to use the virObject APIs for reference counting. The main change is that virObjectUnref does not return the reference count, merely a bool indicating whether the object still has any refs left. Checking the return value is also not mandatory. Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
-
- 23 7月, 2012 1 次提交
-
-
由 Osier Yang 提交于
Per the FSF address could be changed from time to time, and GNU recommends the following now: (http://www.gnu.org/licenses/gpl-howto.html) You should have received a copy of the GNU General Public License along with Foobar. If not, see <http://www.gnu.org/licenses/>. This patch removes the explicit FSF address, and uses above instead (of course, with inserting 'Lesser' before 'General'). Except a bunch of files for security driver, all others are changed automatically, the copyright for securify files are not complete, that's why to do it manually: src/security/security_selinux.h src/security/security_driver.h src/security/security_selinux.c src/security/security_apparmor.h src/security/security_apparmor.c src/security/security_driver.c
-
- 20 7月, 2012 2 次提交
-
-
由 Daniel P. Berrange 提交于
Update the libxl driver to use virReportError instead of the libxlError custom macro Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
-
由 Jiri Denemark 提交于
Updates the libxl driver code so that it passes "%s" as the format string whenever raising an error message with a const string.
-
- 20 6月, 2012 1 次提交
-
-
由 Peter Krempa 提交于
This patch adds support for listing all domains into drivers that use the common virDomainObj implementation: libxl, lxc, openvz, qemu, test, uml, vmware. For drivers that don't support managed save images the guests are treated as if they had none, so filtering guests that do have such an image on this driver succeeds and produces 0 results.
-
- 19 6月, 2012 1 次提交
-
-
由 Peter Krempa 提交于
This patch stores existence of the image in the object. At start of the daemon the state is checked and then updated in key moments in domain lifecycle.
-
- 22 5月, 2012 2 次提交
-
-
由 Eric Blake 提交于
The previous commit (2cb0899e) left a dead variable behind. * src/libxl/libxl_driver.c (libxlClose): Drop dead variable.
-
由 Daniel P. Berrange 提交于
When the last reference to a virConnectPtr is released by libvirtd, it was possible for a deadlock to occur in the virDomainEventState functions. The virDomainEventStatePtr holds a reference on virConnectPtr for each registered callback. When removing a callback, the virUnrefConnect function is run. If this causes the last reference on the virConnectPtr to be released, then virReleaseConnect can be run, which in turns calls qemudClose. This function has a call to virDomainEventStateDeregisterConn which is intended to remove all callbacks associated with the virConnectPtr instance. This will try to grab a lock on virDomainEventState but this lock is already held. Deadlock ensues Thread 1 (Thread 0x7fcbb526a840 (LWP 23185)): Since each callback associated with a virConnectPtr holds a reference on virConnectPtr, it is impossible for the qemudClose method to be invoked while any callbacks are still registered. Thus the call to virDomainEventStateDeregisterConn must in fact be a no-op. Thus it is possible to just remove all trace of virDomainEventStateDeregisterConn and avoid the deadlock. * src/conf/domain_event.c, src/conf/domain_event.h, src/libvirt_private.syms: Delete virDomainEventStateDeregisterConn * src/libxl/libxl_driver.c, src/lxc/lxc_driver.c, src/qemu/qemu_driver.c, src/uml/uml_driver.c: Remove calls to virDomainEventStateDeregisterConn
-
- 30 3月, 2012 1 次提交
-
-
由 Daniel P. Berrange 提交于
The code is splattered with a mix of sizeof foo sizeof (foo) sizeof(foo) Standardize on sizeof(foo) and add a syntax check rule to enforce it Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
-
- 27 3月, 2012 1 次提交
-
-
由 Laine Stump 提交于
libvirt always adds -Werror-frame-larger-than=4096 to the flags when it builds. When building on Fedora 17, two functions with multiple 1024 buffers declared inside if {} blocks would generate frame size errors; apparently the version of gcc on Fedora 16 will merge these multiple buffers into a single buffer even when optimization is off, but Fedora 17 won't. The fix is to declare a single 1024 buffer at the top of the two offending functions, and reuse the single buffer throughout the functions.
-