- 27 4月, 2013 1 次提交
-
-
由 Bamvor Jian Zhang 提交于
this patch fix the wrong sequence for fd and timeout register. the sequence was right in dfa1e1dd for fd register, but it changed in e0622ca2. in this patch, set priv, xl_priv in info and increase info->priv ref count before virEventAddHandle. if do this after virEventAddHandle, the fd callback or fd deregister maybe got the empty priv, xl_priv or wrong ref count. after apply this patch, test more than 100 rounds passed compare to fail within 3 rounds without this patch. each round includes define -> start -> destroy -> create -> suspend -> resume -> reboot -> shutdown -> save -> resotre -> dump -> destroy -> create -> setmem -> setvcpus -> destroy. Signed-off-by: NBamvor Jian Zhang <bjzhang@suse.com>
-
- 24 4月, 2013 2 次提交
-
-
由 Daniel P. Berrange 提交于
Ensure that all drivers implementing public APIs use a naming convention for their implementation that matches the public API name. eg for the public API virDomainCreate make sure QEMU uses qemuDomainCreate and not qemuDomainStart Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
-
由 Daniel P. Berrange 提交于
Ensure that the driver struct field names match the public API names. For an API virXXXX we must have a driver struct field xXXXX. ie strip the leading 'vir' and lowercase any leading uppercase letters. Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
-
- 17 4月, 2013 1 次提交
-
-
由 Osier Yang 提交于
Detected by a simple Shell script: for i in $(git ls-files -- '*.[ch]'); do awk 'BEGIN { fail=0 } /# *include.*\.h/{ match($0, /["<][^">]*[">]/) arr[substr($0, RSTART+1, RLENGTH-2)]++ } END { for (key in arr) { if (arr[key] > 1) { fail=1 printf("%d %s\n", arr[key], key) } } if (fail == 1) exit 1 }' $i if test $? != 0; then echo "Duplicate header(s) in $i" fi done; A later patch will add the syntax-check to avoid duplicate headers.
-
- 05 4月, 2013 5 次提交
-
-
由 Peter Krempa 提交于
This patch refactors various places to allow removing of the defaultConsoleTargetType callback from the virCaps structure. A new console character device target type is introduced - VIR_DOMAIN_CHR_CONSOLE_TARGET_TYPE_NONE - to mark that no type was specified in the XML. This type is at the end converted to the standard VIR_DOMAIN_CHR_CONSOLE_TARGET_TYPE_SERIAL. Other types that are different from this default have to be processed separately in the device post parse callback.
-
由 Peter Krempa 提交于
Use the virDomainXMLConf structure to hold this data and tweak the code to avoid semantic change. Without configuration the KVM mac prefix is used by default. I chose it as it's in the privately administered segment so it should be usable for any purposes.
-
由 Peter Krempa 提交于
Move the xmlopt and caps arguments to the end of the argument list.
-
由 Peter Krempa 提交于
This patch adds instrumentation that will allow hypervisor drivers to fill and validate domain and device definitions after parsed by the XML parser. With this patch, after the XML is parsed, a callback to the driver is issued requesting to fill and validate driver specific details of the configuration. This allows to use sensible defaults and checks on a per driver basis at the time the XML is parsed. Two callback pointers are stored in the new virDomainXMLConf object: * virDomainDeviceDefPostParseCallback (devicesPostParseCallback) - called for a single device parsed and for every single device in a domain config. A virDomainDeviceDefPtr is passed along with the domain definition and virCaps. * virDomainDefPostParseCallback, (domainPostParseCallback) - A callback that is meant to process the domain config after it's parsed. A virDomainDefPtr is passed along with virCaps. Both types of callbacks support arbitrary opaque data passed for the callback functions. Errors may be reported in those callbacks resulting in a XML parsing failure.
-
由 Peter Krempa 提交于
This patch is the result of running: for i in $(git ls-files | grep -v html | grep -v \.po$ ); do sed -i -e "s/virDomainXMLConf/virDomainXMLOption/g" -e "s/xmlconf/xmlopt/g" $i done and a few manual tweaks.
-
- 13 3月, 2013 1 次提交
-
-
由 Peter Krempa 提交于
The virCaps structure gathered a ton of irrelevant data over time that. The original reason is that it was propagated to the XML parser functions. This patch aims to create a new data structure virDomainXMLConf that will contain immutable data that are used by the XML parser. This will allow two things we need: 1) Get rid of the stuff from virCaps 2) Allow us to add callbacks to check and add driver specific stuff after domain XML is parsed. This first attempt removes pointers to private data allocation functions to this new structure and update all callers and function that require them.
-
- 06 3月, 2013 1 次提交
-
-
由 John Ferlan 提交于
1. The virObjectLock() call was unconditional, but Unlock was conditional on vm being valid. Removed the check 2. A call to virDomainEventNewFromObj() isn't guaranteed to return an event - that check needs to be made prior to libxlDomainEventQueue() of the event. Did not add libxlDriverLock/Unlock around the call since some callers already have lock taken 3. Need to initialize fd = -1 in libxlDoDomainSave() since we can jump to cleanup before it's set. 4. Missing break;'s in libxlDomainModifyDeviceFlags() for case LIBXL_DEVICE_UPDATE. The default: case would report an error
-
- 08 2月, 2013 1 次提交
-
-
由 Daniel P. Berrange 提交于
To enable virCapabilities instances to be reference counted, turn it into a virObject. All cases of virCapabilitiesFree turn into virObjectUnref Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
-
- 06 2月, 2013 1 次提交
-
-
由 Daniel P. Berrange 提交于
The duplicate VM checking should be done atomically with virDomainObjListAdd, so shoud not be a separate function. Instead just use flags to indicate what kind of checks are required. This pair, used in virDomainCreateXML: if (virDomainObjListIsDuplicate(privconn->domains, def, 1) < 0) goto cleanup; if (!(dom = virDomainObjListAdd(privconn->domains, privconn->caps, def, false))) goto cleanup; Changes to if (!(dom = virDomainObjListAdd(privconn->domains, privconn->caps, def, VIR_DOMAIN_OBJ_LIST_ADD_CHECK_LIVE, NULL))) goto cleanup; This pair, used in virDomainRestoreFlags: if (virDomainObjListIsDuplicate(privconn->domains, def, 1) < 0) goto cleanup; if (!(dom = virDomainObjListAdd(privconn->domains, privconn->caps, def, true))) goto cleanup; Changes to if (!(dom = virDomainObjListAdd(privconn->domains, privconn->caps, def, VIR_DOMAIN_OBJ_LIST_ADD_LIVE | VIR_DOMAIN_OBJ_LIST_ADD_CHECK_LIVE, NULL))) goto cleanup; This pair, used in virDomainDefineXML: if (virDomainObjListIsDuplicate(privconn->domains, def, 0) < 0) goto cleanup; if (!(dom = virDomainObjListAdd(privconn->domains, privconn->caps, def, false))) goto cleanup; Changes to if (!(dom = virDomainObjListAdd(privconn->domains, privconn->caps, def, 0, NULL))) goto cleanup;
-
- 05 2月, 2013 2 次提交
-
-
由 Daniel P. Berrange 提交于
As a step towards making virDomainObjList thread-safe turn it into an opaque virObject, preventing any direct access to its internals. As part of this a new method virDomainObjListForEach is introduced to replace all existing usage of virHashForEach
-
由 Daniel P. Berrange 提交于
The APIs names for accessing the domain list object are very inconsistent. Rename them all to have a standard virDomainObjList prefix.
-
- 26 1月, 2013 6 次提交
-
-
由 Jim Fehlig 提交于
Since libxl provides the domain ID in the event handler callback, find the domain object based on the ID. This approach prevents processing the callback on a domain that has already been reaped. Also, similar to the xl implementation, ignore the SUSPEND shutdown reason. By calling libxl_domain_suspend(), we know a shutdown event with SUSPEND reason will be generated, but it can be safely ignored since any subsequent cleanup will be done by the callers.
-
由 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>
-