- 05 2月, 2010 2 次提交
-
-
由 Jim Meyering 提交于
* src/conf/domain_conf.c (virDomainChrDefParseXML): Don't leak a virDomainChrDef buffer upon "unknown target type for char device" error.
-
由 Matthias Bolte 提交于
-
- 03 2月, 2010 5 次提交
-
-
由 Jim Meyering 提交于
* src/conf/interface_conf.c (virInterfaceDefParseProtoIPv4): If virXPathNodeSet returns -1, indicate failure by returning -1 right away. (virInterfaceDefParseProtoIPv6): Likewise.
-
由 Jim Meyering 提交于
* src/conf/storage_conf.c (virStoragePoolSourceListNewSource): Remove an unused (and leaked) allocation.
-
由 Daniel P. Berrange 提交于
When attaching a USB host device based on vendor/product, libvirt will resolve the vendor/product into a device/bus pair. This means that when printing XML we should allow device/bus info to be printed at any time if present * src/conf/domain_conf.c, docs/schemas/domain.rng: Allow USB device bus info alongside vendor/product
-
由 Daniel P. Berrange 提交于
The current way of assigning names to the host network backend and NIC device in QEMU was over complicated, by varying naming scheme based on the NIC model and backend type. This simplifies the naming to simply be 'net0' and 'hostnet0', allowing code to easily determine the host network name and vlan based off the primary device alias name 'net0'. This in turn allows removal of alot of QEMU specific code from the XML parser, and makes it easier to assign new unique names for NICs that are hotplugged * src/conf/domain_conf.c, src/conf/domain_conf.h: Remove hostnet_name and vlan fields from virNetworkDefPtr * src/qemu/qemu_conf.c, src/qemu/qemu_conf.h, src/qemu/qemu_driver.c: Use a single network alias naming scheme regardless of NIC type or backend type. Determine VLANs from the alias name. * tests/qemuxml2argvdata/qemuxml2argv-net-eth-names.args, tests/qemuxml2argvdata/qemuxml2argv-net-virtio-device.args, tests/qemuxml2argvdata/qemuxml2argv-net-virtio-netdev.args: Update for new simpler naming scheme
-
由 Daniel P. Berrange 提交于
The virDomainDeviceInfoIterate() function will provide a convenient way to iterate over all devices in a domain. * src/conf/domain_conf.c, src/conf/domain_conf.h, src/libvirt_private.syms: Add virDomainDeviceInfoIterate() function.
-
- 26 1月, 2010 2 次提交
-
-
由 Chris Lalancette 提交于
This reverts commit cdc42d0a. As DanB pointed out, this patch is actually wrong. The real bug that was causing me to see this problem is a bug introduced in a RHEL-5 libvirt snapshot, and I'm going to fix the real bug there. Signed-off-by: NChris Lalancette <clalance@redhat.com>
-
由 Daniel P. Berrange 提交于
The <console> tag is supposed to result in addition of a single <serial> device for HVM guests. The 'targetType' attribute was missing though causing the compatibility code to add a second <console> device * src/conf/domain_conf.c: Set targetType for serial device
-
- 23 1月, 2010 1 次提交
-
-
由 Chris Lalancette 提交于
When libvirtd shuts down, it places a <state/> tag in the XML state file it writes out for guests with PCI passthrough devices. For devices that are attached at bootup time, the state tag is empty. However, at libvirtd startup time, it ignores anything with a <state/> tag in the XML, effectively hiding the guest. This patch remove the check for VIR_DOMAIN_XML_INTERNAL_STATUS when parsing the XML. * src/conf/domain_conf.c: remove VIR_DOMAIN_XML_INTERNAL_STATUS flag check in virDomainHostdevSubsysPciDefParseXML()
-
- 21 1月, 2010 4 次提交
-
-
由 Jim Meyering 提交于
* src/conf/domain_conf.c (virDomainDeviceInfoParseXML): Use "%s".
-
由 David Allan 提交于
Allows the initiator to use a variety of IQNs rather than just the system IQN when creating iSCSI pools. * docs/schemas/storagepool.rng: extends the syntax with <iqn name="..."/> * src/conf/storage_conf.[ch]: read and stores the iqn name * src/storage/storage_backend_iscsi.[ch]: implement the IQN selection when detected
-
由 Jim Meyering 提交于
* src/conf/domain_conf.c (virDomainChrDefFormat): Plug a leak on an error path, and at the same time, eliminate the need for a "cleanup:" block. Before, the "return -1" after the switch would leak an "addr" string. Now, by reversing the port,addr- getting blocks we can free "addr" immediately and skip the goto.
-
由 Daniel P. Berrange 提交于
The 'int virInterfaceIsActive()' method was directly returning the value of the 'int active:1' bitfield in virIntefaceDefPtr. A bitfield with a signed integer, will hold the values 0 and -1, not 0 and +1 as might be expected. This meant that virInterfaceIsActive() was always returning -1 when the interface was active, not +1 & thus all callers thought an error had occurred. To protect against this kind of mistake again, change all bitfields to be unsigned ints * daemon/libvirtd.h, src/conf/domain_conf.h, src/conf/interface_conf.h, src/conf/network_conf.h: Change bitfields to unsigned int.
-
- 20 1月, 2010 4 次提交
-
-
由 Laine Stump 提交于
This was accomplished in xml parsing by doing away with the stripped-down virInterfaceBareDef object, and just always using virInterfaceDef, but with restrictions in certain places (eg, the type of subordinate interface allowed in parsing depends on the parent interface). xml formatting was similarly adjusted. In addition, the formatting functions keep track of the level of interface nesting, and insert extra leading spaces on each line accordingly (using %*s). The only change in formatted xml from previous (aside frmo supporting new combinations of interface types) is that the subordinate ethernet interfaces take up 2 lines rather than one, eg: <interface type='ethernet' name='eth0'> </interface> instead of: <interface type='ethernet' name='eth0'/>
-
由 Laine Stump 提交于
-
由 Laine Stump 提交于
-
由 Jim Meyering 提交于
* src/conf/storage_conf.c (virStoragePoolSourceListNewSource): Free just-allocated "source" upon VIR_REALLOC_N failure.
-
- 19 1月, 2010 1 次提交
-
-
由 Jiri Denemark 提交于
Currently CPU topology may only be specified together with CPU model: <cpu match='exact'> <model>name</model> <topology sockets='1' cores='2' threads='3'/> </cpu> This patch allows for CPU topology specification without the need for also specifying CPU model: <cpu> <topology sockets='1' cores='2' threads='3'/> </cpu> 'match' attribute and 'model' element are made optional with the restriction that 'match' attribute has to be set when 'model' is present. Signed-off-by: NJiri Denemark <jdenemar@redhat.com>
-
- 18 1月, 2010 6 次提交
-
-
由 Daniel P. Berrange 提交于
Although the serial, parallel, chanel, input & fs devices do not have PCI address info, they can all have device aliases. Thus it neccessary to associate the virDomainDeviceInfo data with them all. * src/conf/domain_conf.c, src/conf/domain_conf.h: Add hooks for parsing / formatting device info for serial, parallel, channel input and fs devices. * docs/schemas/domain.rng: Associate device info with character devices, input & fs device
-
由 Daniel P. Berrange 提交于
This patch introduces the support for giving all devices a short, unique name, henceforth known as a 'device alias'. These aliases are not set by the end user, instead being assigned by the hypervisor if it decides it want to support this concept. The QEMU driver sets them whenever using the -device arg syntax and uses them for improved hotplug/hotunplug. it is the intent that other APIs (block / interface stats & device hotplug) be able to accept device alias names in the future. The XML syntax is <alias name="video0"/> This may appear in any type of device that supports device info. * src/conf/domain_conf.c, src/conf/domain_conf.h: Add a 'alias' field to virDomainDeviceInfo struct & parse/format it in XML * src/libvirt_private.syms: Export virDomainDefClearDeviceAliases * src/qemu/qemu_conf.c: Replace use of "nic_name" field with the standard device alias * src/qemu/qemu_driver.c: Clear device aliases at shutdown
-
由 Daniel P. Berrange 提交于
The PCI device addresses are only valid while the VM is running, since they are auto-assigned by QEMU. After shutdown they must all be cleared. Future QEMU driver enhancement will allow for persistent PCI address assignment * src/conf/domain_conf.h, src/conf/domain_conf.c, src/libvirt_private.syms Add virDomainDefClearPCIAddresses() method for wiping out auto assigned PCI addresses * src/qemu/qemu_driver.c: Clear PCI addresses at VM shutdown
-
由 Daniel P. Berrange 提交于
Existing applications using libvirt are not aware of the disk controller concept. Thus, after parsing the <disk> definitions in the XML, it is neccessary to create <controller> elements to satisfy all requested disks, as per their defined drive addresses * src/conf/domain_conf.c, src/conf/domain_conf.h, src/libvirt_private.syms: Add virDomainDefAddDiskControllers() method for populating disk controllers, and call it after parsing disk definitions. * src/qemu/qemu_conf.c: Call virDomainDefAddDiskControllers() when doing ARGV -> XML conversion * tests/qemuxml2argvdata/qemuxml2argv*.xml: Add disk controller data to all data files which don't have it already
-
由 Daniel P. Berrange 提交于
It is perfectly acceptable to have multiple sound devices of same type in guest configuration. If the underlying hypervisor does not like this, it is its job to complain, not the XML parser's * src/conf/domain_conf.c: Remove hack which deleted duplicated sound device models. * tests/xml2sexprdata/xml2sexpr-fv-sound.xml: Remove duplicate models
-
由 Matthias Bolte 提交于
* src/conf/domain_conf.c: add defaults for the video device * src/esx/esx_vmx.[ch]: add VNC support to the VMX handling * tests/vmx2xmltest.c, tests/xml2vmxtest.c: add tests for the VNC support
-
- 16 1月, 2010 6 次提交
-
-
由 Daniel P. Berrange 提交于
* src/conf/domain_conf.c: Allow virDomainDeviceInfoIsSet, virDomainDeviceInfoClear & virDomainDeviceInfoFormat when building Xen proxy
-
由 Wolfgang Mauerer 提交于
This augments virDomainDevice with a <controller> element that is used to represent disk controllers (e.g., scsi controllers). The XML format is given by <controller type="scsi" index="<num>"> <address type="pci" domain="0xNUM" bus="0xNUM" slot="0xNUM"/> </controller> where type denotes the disk interface (scsi, ide,...), index is an integer that identifies the controller for association with disks, and the <address> element specifies the controller address on the PCI bus as described in previous commits The address element can be omitted; in this case, an address will be assigned automatically. Most of the code in this patch is from Wolfgang Mauerer's previous disk controller series * docs/schemas/domain.rng: Define syntax for <controller> XML element * src/conf/domain_conf.c, src/conf/domain_conf.h: Define virDomainControllerDef struct, and routines for parsing and formatting XML * src/libvirt_private.syms: Add virDomainControllerInsert and virDomainControllerDefFree
-
由 Daniel P. Berrange 提交于
When parsing the <disk> element specification, if no <address> is provided for the disk, then automatically assign one based on the <target dev='sdXX'/> device name. This provides for backwards compatability with existing applications using libvirt, while also allowing new apps to have complete fine grained control. * src/conf/domain_conf.h, src/conf/domain_conf.c, src/libvirt_private.syms: Add virDomainDiskDefAssignAddress() for assigning a controller/bus/unit address based on disk target * src/qemu/qemu_conf.c: Call virDomainDiskDefAssignAddress() after generating XML from ARGV * tests/qemuxml2argvdata/*.xml: Add in drive address information to all XML files
-
由 Daniel P. Berrange 提交于
Add the virDomainDeviceAddress information to the sound, video and watchdog devices. This means all of them gain the new XML element <address .... /> This brings them upto par with disk/net/hostdev devices which already have address info * src/conf/domain_conf.h: Add virDomainDeviceAddress to sound, video & watchdog device struts. * src/conf/domain_conf.c: Hook up parsing/formatting for virDomainDeviceAddress in sound, video & watchdog devices * docs/schemas/domain.rng: Associate device address info with sound, video & watchdog
-
由 Daniel P. Berrange 提交于
Introduce a new structure struct _virDomainDeviceDriveAddress { unsigned int controller; unsigned int bus; unsigned int unit; }; and plug that into virDomainDeviceAddress and generates XML that looks like <address type='drive' controller='1' bus='0' unit='5'/> This syntax will be used by the QEMU driver to explicitly control how drives are attached to the bus * src/conf/domain_conf.h, src/conf/domain_conf.c: Parsing and formatting of drive addresses * docs/schemas/domain.rng: Define new address format for drives
-
由 Daniel P. Berrange 提交于
All guest devices now use a common device address structure summarized by: enum virDomainDeviceAddressType { VIR_DOMAIN_DEVICE_ADDRESS_TYPE_NONE, VIR_DOMAIN_DEVICE_ADDRESS_TYPE_PCI, }; struct _virDomainDevicePCIAddress { unsigned int domain; unsigned int bus; unsigned int slot; unsigned int function; }; struct _virDomainDeviceInfo { int type; union { virDomainDevicePCIAddress pci; } addr; }; This replaces the anonymous structs in Disk/Net/Hostdev data structures. Where available, the address is *always* printed in the XML file, instead of being hidden in the internal state file. <address type='pci' domain='0x0000' bus='0x1e' slot='0x07' function='0x0'/> The structure definition is based on Wolfgang Mauerer's disk controller patch series. * docs/schemas/domain.rng: Define the <address> syntax and associate it with disk/net/hostdev devices * src/conf/domain_conf.h, src/conf/domain_conf.c, src/libvirt_private.syms: APIs for parsing/formatting address information. Also remove the QEMU specific 'pci_addr' attributes * src/qemu/qemu_driver.c: Replace use of 'pci_addr' attrs with new standardized format.
-
- 14 1月, 2010 1 次提交
-
-
由 Cole Robinson 提交于
-
- 22 12月, 2009 1 次提交
-
-
由 Matthias Bolte 提交于
Found while trying to cross-compile libvirt on Fedora 12 for Windows. gnulib redefines 'close' to 'close_used_without_including_unistd_h' in sys/socket.h if winsock2.h is present and unistd.h has not been included before sys/socket.h. Reorder some includes to fix this.
-
- 18 12月, 2009 2 次提交
-
-
由 Daniel Veillard 提交于
* po/POTFILES.in: adds src/conf/cpu_conf.c in teh set of files with translatable content * src/conf/cpu_conf.c: remove an unused include
-
由 Jiri Denemark 提交于
* include/libvirt/virterror.h src/util/virterror.c: add new domain VIR_FROM_CPU for errors * src/conf/cpu_conf.c src/conf/cpu_conf.h: new parsing module * src/Makefile.am proxy/Makefile.am: include new files * src/conf/capabilities.[ch] src/conf/domain_conf.[ch]: reference new code * src/libvirt_private.syms: private export of new entry points
-
- 14 12月, 2009 2 次提交
-
-
由 Cole Robinson 提交于
Provides the CDROM label for current media. Only implemented for the udev backend.
-
由 Dave Allan 提交于
exposes the relationships between physical and virtual functions on SR IOV capable devices.
-
- 10 12月, 2009 1 次提交
-
-
由 Matthias Bolte 提交于
Replace free(virBufferContentAndReset()) with virBufferFreeAndReset(). Update documentation and replace all remaining calls to free() with calls to VIR_FREE(). Also add missing calls to virBufferFreeAndReset() and virReportOOMError() in OOM error cases.
-
- 09 12月, 2009 1 次提交
-
-
由 Daniel P. Berrange 提交于
Since the monitor I/O is processed out of band from the main thread(s) invoking monitor commands, the virDomainObj may be deleted by the I/O thread. The qemuDomainObjBeginJob takes an extra reference to protect against final deletion, but this reference is released by the corresponding EndJob call. THus after the EndJob call it may not be valid to reference the virDomainObj any more. To allow callers to detect this, the EndJob call is changed to return the remaining reference count. * src/conf/domain_conf.c: Make virDomainObjUnref return the remaining reference count * src/qemu/qemu_driver.c: Avoid referencing virDomainObjPtr after qemuDomainObjEndJob if it has been deleted.
-
- 08 12月, 2009 1 次提交
-
-
由 Daniel P. Berrange 提交于
Now that drivers are using a private domain object state blob, the virDomainObjFormat/Parse methods are no longer able to directly serialize all neccessary state to/from XML. It is thus neccessary to introduce a pair of callbacks fo serializing private state. The code for serializing vCPU PIDs and the monitor device config can now move out of domain_conf.c and into the qemu_driver.c where they belong. * src/conf/capabilities.h: Add callbacks for serializing private state to/from XML * src/conf/domain_conf.c, src/conf/domain_conf.h: Remove the monitor, monitor_chr, monitorWatch, nvcpupids and vcpupids fields from virDomainObjPtr. Remove code that serialized those fields * src/libvirt_private.syms: Export virXPathBoolean * src/qemu/qemu_driver.c: Add callbacks for serializing monitor and vcpupid data to/from XML * src/qemu/qemu_monitor.h, src/qemu/qemu_monitor.c: Pass monitor char device config into qemuMonitorOpen directly.
-