- 29 12月, 2013 1 次提交
-
-
由 Dario Faggioli 提交于
by, in libxlDomainGetNumaParameters(), calling libxl_bitmap_init() as soon as possible, which avoids getting to 'cleanup:', where libxl_bitmap_dispose() happens, without having initialized the nodemap, and hence crashing after some invalid free()-s: # ./daemon/libvirtd -v *** Error in `/home/xen/libvirt.git/daemon/.libs/lt-libvirtd': munmap_chunk(): invalid pointer: 0x00007fdd42592666 *** ======= Backtrace: ========= /lib64/libc.so.6(+0x7bbe7)[0x7fdd3f767be7] /lib64/libxenlight.so.4.3(libxl_bitmap_dispose+0xd)[0x7fdd2c88c045] /home/xen/libvirt.git/daemon/.libs/../../src/.libs/libvirt_driver_libxl.so(+0x12d26)[0x7fdd2caccd26] /home/xen/libvirt.git/src/.libs/libvirt.so.0(virDomainGetNumaParameters+0x15c)[0x7fdd4247898c] /home/xen/libvirt.git/daemon/.libs/lt-libvirtd(+0x1d9a2)[0x7fdd42ecc9a2] /home/xen/libvirt.git/src/.libs/libvirt.so.0(virNetServerProgramDispatch+0x3da)[0x7fdd424e9eaa] /home/xen/libvirt.git/src/.libs/libvirt.so.0(+0x1a6f38)[0x7fdd424e3f38] /home/xen/libvirt.git/src/.libs/libvirt.so.0(+0xa81e5)[0x7fdd423e51e5] /home/xen/libvirt.git/src/.libs/libvirt.so.0(+0xa783e)[0x7fdd423e483e] /lib64/libpthread.so.0(+0x7c53)[0x7fdd3febbc53] /lib64/libc.so.6(clone+0x6d)[0x7fdd3f7e1dbd] Signed-off-by: NDario Faggili <dario.faggioli@citrix.com> Cc: Jim Fehlig <jfehlig@suse.com> Cc: Ian Jackson <Ian.Jackson@eu.citrix.com> (cherry picked from commit f9ee91d3)
-
- 18 11月, 2013 1 次提交
-
-
由 Jeremy Fitzhardinge 提交于
Rather than casting the virBitmap pointer to uint8_t* and then using the structure contents as a byte array, use the virBitmap API to determine the bitmap size and test each bit. Signed-off-by: NJeremy Fitzhardinge <jeremy@goop.org> (cherry picked from commit ba1bf100)
-
- 05 9月, 2013 2 次提交
-
-
由 Jim Fehlig 提交于
No need to check if privileged when reading hostsysinfo, since that check was already done in libxlDriverShouldLoad(). The libxl driver fails to load if not privileged.
-
由 Jim Fehlig 提交于
John Ferlan reported the following Coverity warning: In libxlDomainCoreDump() Coverity has noted a FORWARD_NULL reference: 2004 if ((flags & VIR_DUMP_CRASH) && !vm->persistent) { 2005 virDomainObjListRemove(driver->domains, vm); (20) Event assign_zero: Assigning: "vm" = "NULL". Also see events: [var_deref_model] 2006 vm = NULL; 2007 } 2008 2009 ret = 0; 2010 2011 cleanup_unpause: (21) Event var_deref_model: Passing null pointer "vm" to function "virDomainObjIsActive(virDomainObjPtr)", which dereferences it. [details] Also see events: [assign_zero] 2012 if (virDomainObjIsActive(vm) && paused) { 2013 if (libxl_domain_unpause(priv->ctx, dom->id) != 0) { 2014 virReportError(VIR_ERR_INTERNAL_ERROR, Removing the vm from domain obj list and setting it to NULL can be done in the previous 'if (flags & VIR_DUMP_CRASH)' conditional. Fix the Coverity warning by ensuring vm is not NULL before testing if it is still active.
-
- 04 9月, 2013 11 次提交
-
-
由 Jim Fehlig 提交于
Change source file copyright notice to prevailing libvirt style.
-
由 Jim Fehlig 提交于
Similar to the QEMU and LXC drivers, add a helper function to lookup a domain, and use it instead of much copy and paste.
-
由 Jim Fehlig 提交于
Now that most fields of libxlDriverPrivate struct are immutable or self-locking, there is no need to acquire the driver lock in much of the libxl driver.
-
由 Jim Fehlig 提交于
Move the libxl driver lock/unlock functions from libxl_driver.c to libxl_conf.h so they can be used by other source files.
-
由 Jim Fehlig 提交于
-
由 Jim Fehlig 提交于
The libxlDriverPrivate struct contains an variety of data with varying access needs. Similar to the QEMU and LXC drivers, move all the static config data into a dedicated libxlDriverConfig object. The only locking requirement is to hold the driver lock while obtaining an instance of libxlDriverConfig. Once a reference is held on the config object, it can be used completely lockless since it is immutable.
-
由 Jim Fehlig 提交于
libxlDomainGetInfo() uses the driver-wide libxl ctx when it would be more appropriate to use the per-domain ctx associated with the domain. Switch to using the per-domain libxl ctx.
-
由 Jim Fehlig 提交于
libxl version info is static data as far as the libxl driver is concerned, so retrieve this info when the driver is initialized and stash it in the libxlDriverPrivate object. Subsequently use the stashed info instead of repeatedly calling libxl_get_version_info().
-
由 Jim Fehlig 提交于
Detect early on in libxl driver initialization if the driver should be loaded at all, avoiding needless initialization steps that only have to be undone later. While at it, move the detection to a helper function to improve readability. After detecting that the driver should be loaded, subsequent failures such as initializing the log stream, allocating libxl ctx, etc. should be treated as failure to initialize the driver.
-
由 Jim Fehlig 提交于
Create libxl_domain.[ch] and move all functions operating on libxlDomainObjPrivate to these files. This will be useful for future patches that e.g. add job support for libxlDomainObjPrivate.
-
由 Jim Fehlig 提交于
Detecting whether or not to autoballoon is configuration related, so move the code to libxl_conf.
-
- 22 8月, 2013 1 次提交
-
-
由 Jim Fehlig 提交于
More fallout from commit d72ef888. When reconnecting to running domains, the libxl_ctx in libxlDomainObjPrivate was used before initializing it, causing a segfault in libxl and consequently crashing libvirtd. Initialize the libxlDomainObjPrivate libxl_ctx in libxlReconnectDomain, and while at it use this ctx in libxlReconnectDomain instead of the driver-wide ctx.
-
- 16 8月, 2013 1 次提交
-
-
由 Jim Fehlig 提交于
There is a potential leak of a newly created libxlDomainObjPrivate when subsequent allocation of the object's chrdev field fails. Unref the object on such an error so that it is properly disposed.
-
- 15 8月, 2013 1 次提交
-
-
由 Jim Fehlig 提交于
As per HACKING, remove some unneeded curly braces in the libxl driver.
-
- 10 8月, 2013 2 次提交
-
-
由 Jim Fehlig 提交于
Commit d72ef888 introduced a bug in the libxl driver that will segfault libvirtd if libxl reports an error message, e.g. when attempting to initialize the driver on a non-Xen system. I assumed it was valid to pass a NULL logger to libxl_ctx_alloc(), but that is not the case since any errors associated with the ctx that are emitted by libxl will dereference the logger and crash libvirtd. Errors associated with the libxl driver-wide ctx could be useful for debugging anyway, so create a 'libxl-driver.log' to capture these errors.
-
由 Dario Faggioli 提交于
introduced by cs 4b9eec50 ("libxl: implement per NUMA node free memory reporting"). What was wrong was that libxl_get_numainfo() put in nr_nodes the actual number of host NUMA nodes, not the highest node ID (like libnuma's numa_max_node() does instead). While at it, turn the failure of libxl_get_numainfo() from a simple warning to a proper error, as requested during the review of another patch of the original series. Signed-off-by: NDario Faggioli <dario.faggioli@citrix.com> Cc: Daniel P. Berrange <berrange@redhat.com>
-
- 09 8月, 2013 1 次提交
-
-
由 Jim Fehlig 提交于
Currently, only one log file is created by the libxl driver, with all output from libxl for all domains going to this one file. Create a per-domain log file based on domain name, making sifting through the logs a bit easier. This required deferring libxl_ctx allocation until starting the domain, which is fine since the ctx is not used when the domain is inactive. Tested-by: NDario Faggioli <dario.faggioli@citrix.com>
-
- 31 7月, 2013 1 次提交
-
-
由 Bamvor Jian Zhang 提交于
this patch introduce the console api in libxl driver for both pv and hvm guest. and import and update the libxlMakeChrdevStr function which was deleted in commit dfa1e1dd. Signed-off-by: NBamvor Jian Zhang <bjzhang@suse.com>
-
- 26 7月, 2013 1 次提交
-
-
由 John Ferlan 提交于
Adjust these drivers to handle their Autostart functionality after each of the drivers has gone through their Initialization functions
-
- 24 7月, 2013 1 次提交
-
-
由 Stefan Bader 提交于
The avail_vcpu bitmap has to be allocated before it can be used (using the maximum allowed value for that). Then for each available VCPU the bit in the mask has to be set (libxl_bitmap_set takes a bit position as an argument, not the number of bits to set). Without this, I would always only get one VCPU for guests created through libvirt/libxl. Signed-off-by: NStefan Bader <stefan.bader@canonical.com>
-
- 18 7月, 2013 2 次提交
-
-
由 Dario Faggioli 提交于
Although, having it depending on Xen >= 4.3 (by using the proper libxl feature flag). Xen currently implements a NUMA placement policy which is basically the same as the 'interleaved' policy of `numactl', although it can be applied on a subset of the available nodes. We therefore hardcode "interleave" as 'numa_mode', and we use the newly introduced libxl interface to figure out what nodes a domain spans ('numa_nodeset'). With this change, it is now possible to query the NUMA node affinity of a running domain: [raistlin@Zhaman ~]$ sudo virsh --connect xen:/// list Id Name State ---------------------------------------------------- 23 F18_x64 running [raistlin@Zhaman ~]$ sudo virsh --connect xen:/// numatune 23 numa_mode : interleave numa_nodeset : 1 Signed-off-by: NDario Faggioli <dario.faggioli@citrix.com>
-
由 Dario Faggioli 提交于
domainGetNumaParameters has a string typed parameter, hence it is necessary for the libxl driver to support this. This change implements the connectSupportsFeature hook for the libxl driver, advertising that VIR_DRV_FEATURE_TYPED_PARAM_STRING is supported. Signed-off-by: NDario Faggioli <dario.faggioli@citrix.com> Cc: Eric Blake <eblake@redhat.com>
-
- 11 7月, 2013 1 次提交
-
-
由 Daniel P. Berrange 提交于
Convert the type of loop iterators named 'i', 'j', k', 'ii', 'jj', 'kk', to be 'size_t' instead of 'int' or 'unsigned int', also santizing 'ii', 'jj', 'kk' to use the normal 'i', 'j', 'k' naming Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
-
- 10 7月, 2013 1 次提交
-
-
由 Michal Privoznik 提交于
-
- 04 7月, 2013 2 次提交
-
-
由 Jiri Denemark 提交于
Caused by 76397360.
-
Use virDomainObjListRemoveLocked instead of virDomainObjListRemove, as driver->domains is already taken by virDomainObjListForEach. Above deadlock can be triggered when libvirtd is started after some domain have been started by hand (in which case driver will not find libvirt-xml domain config). Signed-off-by: NMarek Marczykowski-Górecki <marmarek@invisiblethingslab.com>
-
- 03 7月, 2013 1 次提交
-
-
由 Daniel P. Berrange 提交于
Ensure that all APIs which list domain objects filter them against the access control system. Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
-
- 02 7月, 2013 1 次提交
-
-
由 Dario Faggioli 提交于
By providing the implementation of nodeGetCellsFreeMemory for the driver. This is all just a matter of properly formatting, in a way that libvirt like, what Xen provides via libxl_get_numainfo(). [raistlin@Zhaman ~]$ sudo virsh --connect xen:/// freecell --all 0: 25004 KiB 1: 105848 KiB -------------------- Total: 130852 KiB Signed-off-by: NDario Faggioli <dario.faggioli@citrix.com>
-
- 25 6月, 2013 2 次提交
-
-
由 Ján Tomko 提交于
Since we already have the v1.1.0-rc1 tag in git.
-
由 Jiri Denemark 提交于
-
- 24 6月, 2013 1 次提交
-
-
由 Daniel P. Berrange 提交于
Insert calls to the ACL checking APIs in all libxl driver entrypoints. Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
-
- 22 6月, 2013 1 次提交
-
-
由 Jim Fehlig 提交于
virConnectGetSysinfo was never implemented in the libxl driver. This patch provides an implementation based on the qemu driver.
-
- 21 6月, 2013 1 次提交
-
-
Signed-off-by: NMarek Marczykowski-Górecki <marmarek@invisiblethingslab.com>
-
- 20 6月, 2013 1 次提交
-
-
libxl uses some xenstore entries for hints in memory management (especially when starting new domain). This includes dom0 memory limit and Xen free memory margin, based on current system state. Entries are created at first function usage, so force such call at daemon startup, which most likely will be before any domain startup. Also prevent automatic memory management if dom0_mem= option passed to xen hypervisor - it is known to be incompatible with autoballoon. Signed-off-by: NMarek Marczykowski-Górecki <marmarek@invisiblethingslab.com>
-
- 14 6月, 2013 1 次提交
-
-
由 Frediano Ziglio 提交于
When creating a timer/event handler reference counting is used. So it could be possible (in theory) that libxlDomainObjPrivateFree is called with reference counting >1. The problem is that libxlDomainObjPrivateFree leave the object in an invalid state with ctx freed (but still having dandling pointer). This can lead timer/event handler to core. This patch implements a dispose method for libxlDomainObjPrivate, and moves freeing the libxl ctx to the dispose method, ensuring the ctx is valid while the object's reference count is > 0. Signed-off-by: NFrediano Ziglio <frediano.ziglio@citrix.com>
-
- 12 6月, 2013 1 次提交
-
-
由 Jim Fehlig 提交于
Currently, the libxl driver reports a connection type of "xenlight". To be compatible with the legacy Xen driver, it should return "Xen". Note: I noticed this while testing the libxl driver on OpenStack. After switching my Xen compute nodes to use the libxl stack, I could no longer launch instances on those nodes since hypervisor_type was reported as "xenlight" instead of "xen".
-