- 30 12月, 2011 2 次提交
-
-
由 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 1 次提交
-
-
由 Hu Tao 提交于
Add a util function virDomainNetFind to find a domain's net def.
-
- 21 12月, 2011 2 次提交
-
-
由 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>
-
由 Hu Tao 提交于
Set up the types for the numa functions and insert them into the virDriver structure definition.
-
- 19 12月, 2011 7 次提交
-
-
由 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 提交于
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
-
- 14 12月, 2011 1 次提交
-
-
由 Lei Li 提交于
This chunk of code below repeated in several functions, factor it into a helper method virDomainLiveConfigHelperMethod to eliminate duplicated code based on Eric and Adam's suggestion. I have tested it for all the relevant APIs changed. Signed-off-by: NEric Blake <eblake@redhat.com> Signed-off-by: NLei Li <lilei@linux.vnet.ibm.com>
-
- 10 12月, 2011 1 次提交
-
-
由 Eric Blake 提交于
In QEMU PPC64 we have a network device called "spapr-vlan". We can specify this using the existing syntax for network devices, however libvirt currently rejects "spapr-vlan" in virDomainNetDefParseXML() because of the "-". Fix the code to accept "-". * src/conf/domain_conf.c (virDomainNetDefParseXML): Allow '-' in model name, and be more efficient. * docs/schemas/domaincommon.rng: Limit valid model names to match code. Based on a patch by Michael Ellerman.
-
- 09 12月, 2011 2 次提交
-
-
由 Stefan Berger 提交于
A preparatory patch for DHCP snooping where we want to be able to differentiate between a VM's interface using the tuple of <VM UUID, Interface MAC address>. We assume that MAC addresses could possibly be re-used between different networks (VLANs) thus do not only want to rely on the MAC address to identify an interface. At the current 'final destination' in virNWFilterInstantiate I am leaving the vmuuid parameter as ATTRIBUTE_UNUSED until the DHCP snooping patches arrive. (we may not post the DHCP snooping patches for 0.9.9, though) Mostly this is a pretty trivial patch. On the lowest layers, in lxc_driver and uml_conf, I am passing the virDomainDefPtr around until I am passing only the VM's uuid into the NWFilter calls.
-
由 Stefan Berger 提交于
This patch cleans up return codes in the nwfilter subsystem. Some functions in nwfilter_conf.c (validators and formatters) are keeping their bool return for now and I am converting their return code to true/false. All other functions now have failure return codes of -1 and success of 0. [I searched for all occurences of ' 1;' and checked all 'if ' and adapted where needed. After that I did a grep for 'NWFilter' in the source tree.]
-
- 07 12月, 2011 1 次提交
-
-
由 Osier Yang 提交于
This patch is to expose the fabric_name of fc_host class, which might be useful for users who wants to known which fabric the (v)HBA connects to. The patch also adds the missed capabilities' XML schema of scsi_host, (of course, with fabric_wwn added), and update the documents (docs/formatnode.html.in)
-
- 04 12月, 2011 1 次提交
-
-
由 Eric Blake 提交于
https://bugzilla.redhat.com/show_bug.cgi?id=648855 mentioned a misuse of 'an' where 'a' is proper; that has since been fixed, but a search found other problems (some were a spelling error for 'and', while most were fixed by 'a'). * daemon/stream.c: Fix grammar. * src/conf/domain_conf.c: Likewise. * src/conf/domain_event.c: Likewise. * src/esx/esx_driver.c: Likewise. * src/esx/esx_vi.c: Likewise. * src/rpc/virnetclient.c: Likewise. * src/rpc/virnetserverprogram.c: Likewise. * src/storage/storage_backend_fs.c: Likewise. * src/util/conf.c: Likewise. * src/util/dnsmasq.c: Likewise. * src/util/iptables.c: Likewise. * src/xen/xen_hypervisor.c: Likewise. * src/xen/xend_internal.c: Likewise. * src/xen/xs_internal.c: Likewise. * tools/virsh.c: Likewise.
-
- 02 12月, 2011 1 次提交
-
-
由 Eric Blake 提交于
Many of these were mentioned by Yuri Chornoivan in: https://bugzilla.redhat.com/show_bug.cgi?id=669506 * src/esx/esx_vi.c (esxVI_WaitForTaskCompletion): Fix spelling. * src/conf/netdev_vport_profile_conf.c (virNetDevVPortProfileParse): Likewise. * src/xen/xend_internal.c (xenDaemonDomainSetVcpusFlags): Likewise. * src/xen/xm_internal.c (xenXMDomainSetVcpusFlags): Likewise. * src/esx/esx_util.c (esxUtil_ResolveHostname): Likewise. * src/storage/storage_backend_fs.c (virStorageBackendFileSystemBuild): Likewise. * daemon/libvirtd.conf: Likewise. * src/util/logging.c (virLogMessage): Likewise. * src/uml/uml_conf.c (umlBuildCommandLineNet): Likewise. * src/vmx/vmx.c (virVMXFormatEthernet): Likewise.
-
- 01 12月, 2011 3 次提交
-
-
由 Alex Jia 提交于
Detected by Coverity. Leak introduced in commit 0873b688. Signed-off-by: NAlex Jia <ajia@redhat.com>
-
由 Eric Blake 提交于
The next patch will make it possible to have virDomainSetBlkioParameters leave device weights unchanged if they are not mentioned in the incoming string, but this only works if the list of block weights does not allow duplicate paths. Technically, a user can still confuse libvirt by passing alternate spellings that resolve to the same device, but it is not worth worrying about working around that kind of abuse. * src/conf/domain_conf.c (virDomainDefParseXML): Require unique paths.
-
由 Lei Li 提交于
Enable block I/O throttle for per-disk in XML, as the first per-disk IO tuning parameter. Signed-off-by: NLei Li <lilei@linux.vnet.ibm.com> Signed-off-by: NZhi Yong Wu <wuzhy@linux.vnet.ibm.com> Signed-off-by: NEric Blake <eblake@redhat.com>
-
- 30 11月, 2011 5 次提交
-
-
由 Daniel P. Berrange 提交于
If we ensure that virNodeSuspendGetTargetMask always resets *bitmask to zero upon failure, there is no need for the powerMgmt_valid field. * src/util/virnodesuspend.c: Ensure *bitmask is zero upon failure * src/conf/capabilities.c, src/conf/capabilities.h: Remove powerMgmt_valid field * src/qemu/qemu_capabilities.c: Remove powerMgmt_valid
-
由 Daniel P. Berrange 提交于
The virHostPMCapability enum helper was declared in util.h but implemented in capabilities.c, which is in a completely separate library at link time. Move the declaration into the capabilities.c file and rename it to match normal conventions * src/util/util.h: Remove virHostPMCapability enum decl * src/conf/capabilities.c: Add virCapsHostPMTarget enum
-
由 Daniel P. Berrange 提交于
The capabilities XML uses the x86 specific terms 'S3', 'S4' and 'Hybrid-Syspend'. Switch it to use the same terminology as the API constants and virsh options, eg 'suspend_mem' 'suspend_disk' and 'suspend_hybrid' * docs/formatcaps.html.in, docs/schemas/capability.rng, src/conf/capabilities.c: Rename suspend constants
-
由 Daniel P. Berrange 提交于
The internal virHostPMCapability enum just duplicates the public virNodeSuspendTarget enum, but with different names. * src/util/util.c: Use VIR_NODE_SUSPEND_TARGET constants * src/util/util.h: Remove virHostPMCapability enum * src/conf/capabilities.c: Use VIR_NODE_SUSPEND_TARGET_LAST
-
由 Hu Tao 提交于
This adds per-device weights to <blkiotune>. Note that the cgroups implementation only supports weights per block device, and not per-file within the device; hence this option must be global to the domain definition rather than tied to individual <devices>/<disk> entries: <domain ...> <blkiotune> <device> <path>/path/to/block</path> <weight>1000</weight> </device> </blkiotune> .. This patch also adds a parameter --device-weights to virsh command blkiotune for setting/getting blkiotune.weight_device for any hypervisor that supports it. All <device> entries under <blkiotune> are concatenated into a single string attribute under virDomain{Get,Set}BlkioParameters, named "device_weight". Signed-off-by: NHu Tao <hutao@cn.fujitsu.com> Signed-off-by: NEric Blake <eblake@redhat.com>
-
- 29 11月, 2011 2 次提交
-
-
由 Srivatsa S. Bhat 提交于
Some systems support a feature known as 'Hybrid-Suspend', apart from the usual system-wide sleep states such as Suspend-to-RAM (S3) or Suspend-to-Disk (S4). Add the functionality to discover this power management feature and export it in the capabilities XML under the <power_management> tag.
-
由 Lorin Hochstein 提交于
virt-xml-validate fails when run on a domain XML file of type 'vbox'. For failing test case, see https://bugzilla.redhat.com/show_bug.cgi?id=757097 This patch updates the XML schema to accept all valid hypervisor types, as well as dropping hypervisor types that are not in use by the current code base. Signed-off-by: NEric Blake <eblake@redhat.com>
-
- 28 11月, 2011 1 次提交
-
-
由 Michal Privoznik 提交于
When user pass wrong root element, it is not 'internal error' and we can give him hint what we are expecting.
-
- 25 11月, 2011 1 次提交
-
-
由 Michal Privoznik 提交于
One of my latest patches 2e37bf42 copy serial console definition. On domain shutdown we save this info into state XML. However, later on the daemon start we simply drop this info and since we are not re-reading qemu log, vm->def->consoles[0] does not get populated with copy. Therefore we need to avoid dropping console definition if it is just alias for serial console.
-
- 24 11月, 2011 1 次提交
-
-
由 Stefan Berger 提交于
Remove the virConnectPtr from the nwfilter's internal API calls as far as possible.
-
- 23 11月, 2011 4 次提交
-
-
由 Stefan Berger 提交于
In preparation of DHCP Snooping and the detection of multiple IP addresses per interface: The hash table that is used to collect the detected IP address of an interface can so far only handle one IP address per interface. With this patch we extend this to allow it to handle a list of IP addresses. Above changes the returned variable type of virNWFilterGetIpAddrForIfname() from char * to virNWFilterVarValuePtr; adapt all existing functions calling this function.
-
由 Stefan Berger 提交于
In preparation for the DHCP Snooping code: Pass an additional parameter into the applyDHCPOnly function of the 'techdriver'.
-
由 Stefan Berger 提交于
This patch adds support for filtering of STP (spanning tree protocol) traffic to the parser and makes us of the ebtables support for STP filtering. This code now enables the filtering of traffic in chains with prefix 'stp'. Signed-off-by: NStefan Berger <stefanb@linux.vnet.ibm.com>
-
由 Stefan Berger 提交于
With hunks borrowed from one of David Steven's previous patches, we now add the capability of having a 'mac' chain which is useful to filter for multiple valid MAC addresses. Signed-off-by: NDavid L Stevens <dlstevens@us.ibm.com> Signed-off-by: NStefan Berger <stefanb@linux.vnet.ibm.com>
-
- 22 11月, 2011 3 次提交
-
-
由 Daniel P. Berrange 提交于
On Mingw32 the ffs() function was not declared due to missing header include * src/conf/capabilities.c: The ffs() function lives in strings.h
-
由 Srivatsa S. Bhat 提交于
This patch exports KVM Host Power Management capabilities as XML so that higher-level systems management software can make use of these features available in the host. The script "pm-is-supported" (from pm-utils package) is run to discover if Suspend-to-RAM (S3) or Suspend-to-Disk (S4) is supported by the host. If either of them are supported, then a new tag "<power_management>" is introduced in the XML under the <host> tag. However in case the query to check for power management features succeeded, but the host does not support any such feature, then the XML will contain an empty <power_management/> tag. In the event that the PM query itself failed, the XML will not contain any "power_management" tag. To use this, new APIs could be implemented in libvirt to exploit power management features such as S3/S4.
-
由 Eric Blake 提交于
None of the callers cared if str was updated to point to the next byte after the parsed cpuset; simplifying this results in quite a few code simplifications. Additionally, virCPUDefParseXML was strdup()'ing a malloc()'d string; avoiding a memory copy resulted in less code. * src/conf/domain_conf.h (virDomainCpuSetParse): Alter signature. * src/conf/domain_conf.c (virDomainCpuSetParse): Don't modify str. (virDomainVcpuPinDefParseXML, virDomainDefParseXML): Adjust callers. * src/conf/cpu_conf.c (virCPUDefParseXML): Likewise. * src/xen/xend_internal.c (sexpr_to_xend_topology): Likewise. * src/xen/xm_internal.c (xenXMDomainPinVcpu): Likewise. * src/xenxs/xen_sxpr.c (xenParseSxpr): Likewise. * src/xenxs/xen_xm.c (xenParseXM): Likewise.
-
- 21 11月, 2011 1 次提交
-
-
由 Michal Privoznik 提交于
Now, when we support multiple consoles per domain, the vm->def->console[0] can still remain an alias for vm->def->serial[0]; However, we need to copy it's source definition as well otherwise we'll regress on virDomainOpenConsole.
-