- 03 1月, 2012 2 次提交
-
-
由 Eric Blake 提交于
Most severe here is a latent (but currently untriggered) memory leak if any hypervisor ever adds a string interface property; the remainder are mainly cosmetic. * include/libvirt/libvirt.h.in (VIR_DOMAIN_BANDWIDTH_*): Move macros closer to interface that uses them, and document type. * src/libvirt.c (virDomainSetInterfaceParameters) (virDomainGetInterfaceParameters): Formatting tweaks. * daemon/remote.c (remoteDispatchDomainGetInterfaceParameters): Avoid memory leak. * src/libvirt_public.syms (LIBVIRT_0.9.9): Sort lines. * src/libvirt_private.syms (domain_conf.h): Likewise. * src/qemu/qemu_driver.c (qemuDomainSetInterfaceParameters): Fix comments, break long lines.
-
由 Peter Krempa 提交于
-
- 02 1月, 2012 1 次提交
-
-
由 Michal Novotny 提交于
Hi, this is the fifth version of my SRV record for DNSMasq patch rebased for the current codebase to the bridge driver and libvirt XML file to include support for the SRV records in the DNS. The syntax is based on DNSMasq man page and tests for both xml2xml and xml2argv were added as well. There are some things written a better way in comparison with version 4, mainly there's no hack in tests/networkxml2argvtest.c and also the xPath context is changed to use a simpler query using the virXPathInt() function relative to the current node. Also, the patch is also fixing the networkxml2argv test to pass both checks, i.e. both unit tests and also syntax check. Please review, Michal Signed-off-by: NMichal Novotny <minovotn@redhat.com>
-
- 01 1月, 2012 2 次提交
-
-
由 Alex Jia 提交于
Detected by Coverity. Leaks introduced in commit e8d6b293. Signed-off-by: NAlex Jia <ajia@redhat.com>
-
由 Eric Blake 提交于
Leak detected by Coverity, and introduced in commit 93ab5859. Reported by Alex Jia. * src/qemu/qemu_driver.c (qemuDomainSetBlkioParameters): Free devices array on error.
-
- 30 12月, 2011 5 次提交
-
-
由 Daniel Veillard 提交于
The blocks to extract node information on a per-arch basis wasn't well balanced leading to a compilation failure if not on one of the handled arches (PCs and PPCs)
-
由 Eric Blake 提交于
This wires up the XML changes in the previous patch to let SELinux labeling honor user overrides, as well as affecting the live XML configuration in one case where the user didn't specify anything in the offline XML. I noticed that the logs contained messages like this: 2011-12-05 23:32:40.382+0000: 26569: warning : SELinuxRestoreSecurityFileLabel:533 : cannot lookup default selinux label for /nfs/libvirt/images/dom.img for all my domain images living on NFS. But if we would just remember that on domain creation that we were unable to set a SELinux label (due to NFSv3 lacking labels, or NFSv4 not being configured to expose attributes), then we could avoid wasting the time trying to clear the label on domain shutdown. This in turn is one less point of NFS failure, especially since there have been documented cases of virDomainDestroy hanging during an attempted operation on a failed NFS connection. * src/security/security_selinux.c (SELinuxSetFilecon): Move guts... (SELinuxSetFileconHelper): ...to new function. (SELinuxSetFileconOptional): New function. (SELinuxSetSecurityFileLabel): Honor override label, and remember if labeling failed. (SELinuxRestoreSecurityImageLabelInt): Skip relabeling based on override.
-
由 Eric Blake 提交于
Implement the parsing and formatting of the XML addition of the previous commit. The new XML doesn't affect qemu command line, so we can now test round-trip XML->memory->XML handling. I chose to reuse the existing structure, even though per-device override doesn't use all of those fields, rather than create a new structure, in order to reuse more code. * src/conf/domain_conf.h (_virDomainDiskDef): Add seclabel member. * src/conf/domain_conf.c (virDomainDiskDefFree): Free it. (virSecurityLabelDefFree): New function. (virDomainDiskDefFormat): Print it. (virSecurityLabelDefFormat): Reduce output if model not present. (virDomainDiskDefParseXML): Alter signature, and parse seclabel. (virSecurityLabelDefParseXML): Split... (virSecurityLabelDefParseXMLHelper): ...into new helper. (virDomainDeviceDefParse, virDomainDefParseXML): Update callers. * tests/qemuxml2argvdata/qemuxml2argv-seclabel-dynamic-override.args: New file. * tests/qemuxml2xmltest.c (mymain): Enhance test. * tests/qemuxml2argvtest.c (mymain): Likewise.
-
由 Eric Blake 提交于
Pure code motion; no semantic change. * src/conf/domain_conf.h (virDomainSeclabelType) (virSecurityLabelDefPtr): Declare earlier. * src/conf/domain_conf.c (virSecurityLabelDefClear) (virSecurityLabelDefParseXML): Move earlier. (virDomainDefParseXML): Move seclabel parsing earlier.
-
由 Eric Blake 提交于
A future patch will parse and output <seclabel> in more than one location in a <domain> xml; make it easier to reuse code. * src/conf/domain_conf.c (virSecurityLabelDefFree): Rename... (virSecurityLabelDefClear): ...and make static. (virSecurityLabelDefParseXML): Alter signature. (virDomainDefParseXML, virDomainDefFree): Adjust callers. (virDomainDefFormatInternal): Split output... (virSecurityLabelDefFormat): ...into new helper.
-
- 29 12月, 2011 5 次提交
-
-
由 Hu Tao 提交于
* src/qemu/qemu_driver.c: implement the qemu driver support
-
由 Hu Tao 提交于
Add a util function virDomainNetFind to find a domain's net def.
-
由 Hu Tao 提交于
* daemon/remote.c: implement the server side support * src/remote/remote_driver.c: implement the client side support * src/remote/remote_protocol.x: definitions for the new entry points * src/remote_protocol-structs: structure definitions
-
由 Hu Tao 提交于
* src/libvirt.c: implement the main entry points
-
由 Hu Tao 提交于
The APIs are used to set/get domain's network interface's parameters. Currently supported parameters are bandwidth settings. * include/libvirt/libvirt.h.in: new API and parameters definition * python/generator.py: skip the Python API generation * src/driver.h: add new entry to the driver structure * src/libvirt_public.syms: export symbols
-
- 28 12月, 2011 1 次提交
-
-
由 Eric Blake 提交于
https://bugzilla.redhat.com/show_bug.cgi?id=770520 We had two nested loops both trying to use 'i' as the iteration variable, which can result in an infinite loop when the inner loop interferes with the outer loop. Introduced in commit 93ab5859. * src/qemu/qemu_driver.c (qemuDomainSetBlkioParameters): Don't reuse iteration variable across two loops.
-
- 25 12月, 2011 1 次提交
-
-
由 Michal Privoznik 提交于
In order to avoid situation where a USB device is in use by two domains, we must keep a list of already attached devices like we do for PCI.
-
- 23 12月, 2011 1 次提交
-
-
由 Michal Privoznik 提交于
This patch adds max_files option to qemu.conf which can be used to override system default limit on number of opened files that are allowed for qemu user.
-
- 22 12月, 2011 1 次提交
-
-
由 Osier Yang 提交于
Upstream QEMU starts to support it from commit 2c74c2cb.
-
- 21 12月, 2011 10 次提交
-
-
由 Stefan Berger 提交于
Remove the requirement that DHCP messages have to be broadcasted. DHCP requests are most often sent via broadcast but can be directed towards a specific DHCP server. For example 'dhclient' takes '-s <server>' as a command line parameter thus allowing DHCP requests to be sent to a specific DHCP server.
-
由 Osier Yang 提交于
-
由 Michael Ellerman 提交于
Add logic to assign addresses for devices with spapr-vio addresses. We also do validation of addresses specified by the user, ie. ensuring that there are not duplicate addresses on the bus. Signed-off-by: NMichael Ellerman <michael@ellerman.id.au>
-
由 Michael Ellerman 提交于
For QEMU PPC64 we have a machine type ("pseries") which has a virtual bus called "spapr-vio". We need to be able to create devices on this bus, and as such need a way to specify the address for those devices. This patch adds a new address type "spapr-vio", which achieves this. The addressing is specified with a "reg" property in the address definition. The reg is optional, if it is not specified QEMU will auto-assign an address for the device. Signed-off-by: NMichael Ellerman <michael@ellerman.id.au>
-
由 Michael Ellerman 提交于
Currently non-x86 guests must have <acpi/> defined in <features> to prevent libvirt from running qemu with -no-acpi. Although it works, it is a hack. Instead add a capability flag which indicates whether qemu understands the -no-acpi option. Use it to control whether libvirt emits -no-acpi. Current versions of qemu always display -no-acpi in their help output, so this patch has no effect. However the development version of qemu has been modified such that -no-acpi is only displayed when it is actually supported. Signed-off-by: NMichael Ellerman <michael@ellerman.id.au>
-
由 Hu Tao 提交于
-
由 Hu Tao 提交于
-
由 Hu Tao 提交于
Set up the types for the numa functions and insert them into the virDriver structure definition.
-
由 Hu Tao 提交于
This patch also sets cgroup cpuset parameters for numatune.
-
由 Hu Tao 提交于
-
- 20 12月, 2011 1 次提交
-
-
由 Eric Blake 提交于
The RPC code had several latent memory leaks and an attempt to free the wrong string, but thankfully nothing triggered them (blkiotune was the only one returning a string, and always as the last parameter). Also, our cleanups for rpcgen ended up nuking a line of code that renders VIR_TYPED_PARAM_INT broken, because it was the only use of 'i' in a function, even though it was a member usage rather than a standalone declaration. * daemon/remote.c (remoteSerializeTypedParameters): Free the correct array element. (remoteDispatchDomainGetSchedulerParameters) (remoteDispatchDomainGetSchedulerParametersFlags) (remoteDispatchDomainBlockStatsFlags) (remoteDispatchDomainGetMemoryParameters): Don't leak strings. * src/rpc/genprotocol.pl: Don't nuke member-usage of 'buf' or 'i'.
-
- 19 12月, 2011 8 次提交
-
-
由 Daniel P. Berrange 提交于
The lifetime of the virDomainEventState object is tied to the lifetime of the driver, which in stateless drivers is tied to the lifetime of the virConnectPtr. If we add & remove a timer when allocating/freeing the virDomainEventState object, we can get a situation where the timer still triggers once after virDomainEventState has been freed. The timeout callback can't keep a ref on the event state though, since that would be a circular reference. The trick is to only register the timer when a callback is registered with the event state & remove the timer when the callback is unregistered. The demo for the bug is to run while true ; do date ; ../tools/virsh -q -c test:///default 'shutdown test; undefine test; dominfo test' ; done prior to this fix, it will frequently hang and / or crash, or corrupt memory
-
由 Daniel P. Berrange 提交于
Currently all drivers using domain events need to provide a callback for handling a timer to dispatch events in a clean stack. There is no technical reason for dispatch to go via driver specific code. It could trivially be dispatched directly from the domain event code, thus removing tedious boilerplate code from all drivers Also fix the libxl & xen drivers to pass 'true' when creating the virDomainEventState, since they run inside the daemon & thus always expect events to be present. * src/conf/domain_event.c, src/conf/domain_event.h: Internalize dispatch of events from timer callback * src/libxl/libxl_driver.c, src/lxc/lxc_driver.c, src/qemu/qemu_domain.c, src/qemu/qemu_driver.c, src/remote/remote_driver.c, src/test/test_driver.c, src/uml/uml_driver.c, src/vbox/vbox_tmpl.c, src/xen/xen_driver.c: Remove all timer dispatch functions
-
由 Daniel P. Berrange 提交于
The virDomainEventCallbackList and virDomainEventQueue APIs are now solely helpers used internally by virDomainEventState APIs. Remove their decls from domain_event.h since no driver code should need to use them any more. * src/conf/domain_event.c: Make virDomainEventCallbackList and virDomainEventQueue APIs static & remove some unused APIs * src/conf/domain_event.h, src/libvirt_private.syms: Remove virDomainEventCallbackList and virDomainEventQueue APIs
-
由 Daniel P. Berrange 提交于
No caller of the domain events APIs should need to poke at the struct internals. Thus they should all be removed from the header file * src/conf/domain_event.h: Remove struct definitions * src/conf/domain_event.c: Add struct definitions
-
由 Daniel P. Berrange 提交于
* src/libxl/libxl_driver.c, src/lxc/lxc_driver.c, src/qemu/qemu_driver.c, src/remote/remote_driver.c, src/test/test_driver.c, src/uml/uml_driver.c, src/vbox/vbox_tmpl.c, src/xen/xen_driver.c: Convert to threadsafe APIs
-
由 Daniel P. Berrange 提交于
While virDomainEventState has APIs for managing removal of callbacks, while locked, adding callbacks in the first place requires direct access to the virDomainEventCallbackList structure. This is not threadsafe since it is bypassing the virDomainEventState locks * src/conf/domain_event.c, src/conf/domain_event.h, src/libvirt_private.syms: Add APIs for managing callbacks via virDomainEventState.
-
由 Daniel P. Berrange 提交于
When registering a callback for a particular event some callers need to know how many callbacks already exist for that event. While it is possible to ask for a count, this is not free from race conditions when threaded. Thus the API for registering callbacks should return the count of callbacks. Also rename virDomainEventStateDeregisterAny to virDomainEventStateDeregisterID * src/conf/domain_event.c, src/conf/domain_event.h, src/libvirt_private.syms: Return count of callbacks when registering callbacks * src/libxl/libxl_driver.c, src/libxl/libxl_driver.c, src/qemu/qemu_driver.c, src/remote/remote_driver.c, src/remote/remote_driver.c, src/uml/uml_driver.c, src/vbox/vbox_tmpl.c, src/xen/xen_driver.c: Update for change in APIs
-
由 Daniel P. Berrange 提交于
The Xen & VBox drivers deal with callbacks & dispatching of events directly. All the other drivers use a timer to dispatch events from a clean stack state, rather than deep inside the drivers. Convert Xen & VBox over to virDomainEventState so that they match behaviour of other drivers * src/conf/domain_event.c: Return count of remaining callbacks when unregistering event callback * src/vbox/vbox_tmpl.c, src/xen/xen_driver.c, src/xen/xen_driver.h: Convert to virDomainEventState
-
- 17 12月, 2011 1 次提交
-
-
由 Stefan Berger 提交于
If only iptables rules are created then two unnecessary ebtables chains are also created. This patch fixes this and prevents these chains from being created. They have been cleaned up properly, though.
-
- 16 12月, 2011 1 次提交
-
-
由 Peter Krempa 提交于
A generic error code was returned, if the user aborted a migration job. This made it hard to distinguish between a user requested abort and an error that might have occured. This patch introduces a new error code, which is returned in the specific case of a user abort, while leaving all other failures with their existing code. This makes it easier to distinguish between failure while mirgrating and an user requested abort. * include/libvirt/virterror.h: - add new error code * src/util/virterror.c: - add message for the new error code * src/qemu/qemu_migration.h: - Emit operation aborted error instead of operation failed, on migration abort
-