- 13 9月, 2012 2 次提交
-
-
由 Guannan Ren 提交于
https://bugzilla.redhat.com/show_bug.cgi?id=795929 http://git.qemu.org/?p=qemu.git;a=commitdiff;h=6af165892cf900291046f1d25f95416f379504c2 This patch define and parse the input XML of USB redirection filter. <devices> ... <redirdev bus='usb' type='spicevmc'> <address type='usb' bus='0' port='4'/> </redirdev> <redirfilter> <usbdev class='0x08' vendor='0x1234' product='0xbeef' \ version='2.00' allow='yes'/> <usbdev allow='no'/> </redirfilter> ... </devices> There is no 1:1 mapping between ports and redirected devices and qemu and spicy client couldn't decide into which usbredir ports the client can 'plug' redirected devices. So it make sense to apply all of filter rules global to all existing usb redirection devices. class attribute is USB Class codes. version is bcdDevice value of USB device. vendor and product is USB vendorId and productId. -1 can be used to allow any value for a field. Except allow attribute the other four are optional, default value is -1.
-
由 Eric Blake 提交于
I got an off-list report about a bad diagnostic: Target network card mac 52:54:00:49:07:ccdoes not match source 52:54:00:49:07:b8 True to form, I've added a syntax check rule to prevent it from recurring, and found several other offenders. * cfg.mk (sc_require_whitespace_in_translation): New rule. * src/conf/domain_conf.c (virDomainNetDefCheckABIStability): Add space. * src/esx/esx_util.c (esxUtil_ParseUri): Likewise. * src/qemu/qemu_command.c (qemuCollectPCIAddress): Likewise. * src/qemu/qemu_driver.c (qemuDomainSetMetadata) (qemuDomainGetMetadata): Likewise. * src/qemu/qemu_hotplug.c (qemuDomainChangeNetBridge): Likewise. * src/rpc/virnettlscontext.c (virNetTLSContextCheckCertDNWhitelist): Likewise. * src/vmware/vmware_driver.c (vmwareDomainResume): Likewise. * src/vbox/vbox_tmpl.c (vboxDomainGetXMLDesc, vboxAttachDrives): Avoid false negatives. * tools/virsh-domain.c (info_save_image_dumpxml): Reword. Based on a report by Luwen Su.
-
- 12 9月, 2012 1 次提交
-
-
由 Li Zhang 提交于
Historically, the first <console> element is treated as the alias of a <serial> device. In the virDomainDeviceInfoIterate, This situation is not considered. It still handles the first <console> element as another devices, which means that for console[0] with serial targetType, it calls callback function another time. It will cause the problem of address conflicts when assigning spapr-vio address for serial device on pSeries guest. For pSeries guest, the serial configuration in the xml file is as the following: <serial type='pty'> <target port='0'/> <address type='spapr-vio'/> </serial> Console configuration is default, the dumped xml file is as the following: <serial type='pty'> <source path='/dev/pts/5'/> <target port='0'/> <alias name='serial0'/> <address type='spapr-vio' reg='0x30000000'/> </serial> <console type='pty' tty='/dev/pts/5'> <source path='/dev/pts/5'/> <target type='serial' port='0'/> <alias name='serial0'/> <address type='spapr-vio' reg='0x30000000'/> </console> It shows that the <console> device is the alias of serial device. So its address is the same as the serial device. When detecting the conflicts in the qemuAssignSpaprVIOAddress the first console and the serial device conflicts because virDomainDeviceInfoIterate() still handle these as two different devices, and in the qemuAssignSpaprVIOAddress(), it will compare these two devices' addressed. If they have same address, it will report address conflict error. So this patch is to handle the first console which targetType is serial as the alias of serial device to avoid address conflicts error reported. Signed-off-by: NLi Zhang <zhlcindy@linux.vnet.ibm.com>
-
- 11 9月, 2012 1 次提交
-
-
由 Osier Yang 提交于
src/conf/network_conf.c: Add virNetworkMatch to filter the networks; and virNetworkList to iterate over all the networks with the filter. src/conf/network_conf.h: Declare virNetworkList and define the macros for filters. src/libvirt_private.syms: Export virNetworkList.
-
- 07 9月, 2012 1 次提交
-
-
由 Christophe Fergeau 提交于
GNOME Boxes sometimes stops getting domain events from libvirtd, even after restarting it. Further investigation in libvirtd shows that events are properly queued with virDomainEventStateQueue, but the timer virDomainEventTimer which flushes the events and sends them to the clients never gets called. Looking at the event queue in gdb shows that it's non-empty and that its size increases with each new events. virDomainEventTimer is set up in virDomainEventStateRegister[ID] when going from 0 client connecte to 1 client connected, but is initially disabled. The timer is removed in virDomainEventStateRegister[ID] when the last client is disconnected (going from 1 client connected to 0). This timer (which handles sending the events to the clients) is enabled in virDomainEventStateQueue when queueing an event on an empty queue (queue containing 0 events). It's disabled in virDomainEventStateFlush after flushing the queue (ie removing all the elements from it). This way, no extra work is done when the queue is empty, and when the next event comes up, the timer will get reenabled because the queue will go from 0 event to 1 event, which triggers enabling the timer. However, with this Boxes bug, we have a client connected (Boxes), a non-empty queue (there are events waiting to be sent), but a disabled timer, so something went wrong. When Boxes connects (it's the only client connecting to the libvirtd instance I used for debugging), the event timer is not set as expected (state->timer == -1 when virDomainEventStateRegisterID is called), but at the same time the event queue is not empty. In other words, we had no clients connected, but pending events. This also explains why the timer never gets enabled as this is only done when an event is queued on an empty queue. I think this can happen if an event gets queued using virDomainEventStateQueue and the client disconnection happens before the event timer virDomainEventTimer gets a chance to run and flush the event. In this situation, virDomainEventStateDeregister[ID] will get called with a non-empty event queue, the timer will be destroyed if this was the only client connected. Then, when other clients connect at a later time, they will never get notified about domain events as the event timer will never get enabled because the timer is only enabled if the event queue is empty when virDomainEventStateRegister[ID] gets called, which will is no longer the case. To avoid this issue, this commit makes sure to remove all events from the event queue when the last client in unregistered. As there is no longer anyone interested in receiving these events, these events are stale so there is no need to keep them around. A client connecting later will have no interest in getting events that happened before it got connected.
-
- 06 9月, 2012 1 次提交
-
-
由 Osier Yang 提交于
src/conf/storage_conf.c: Add virStoragePoolMatch to filter the pools; Add virStoragePoolList to iterate over the pool objects with filter. src/conf/storage_conf.h: Declare virStoragePoolMatch, virStoragePoolList, and the macros for filters. src/libvirt_private.syms: Export helper virStoragePoolList.
-
- 04 9月, 2012 1 次提交
-
-
由 Viktor Mihajlovski 提交于
After discussion with DB we decided to rename the new iolimit element as it creates the impression it would be there to limit (i.e. throttle) I/O instead of specifying immutable characteristics of a block device. This is also backed by the fact that the term I/O Limits has vanished from newer storage admin documentation. Signed-off-by: NViktor Mihajlovski <mihajlov@linux.vnet.ibm.com>
-
- 03 9月, 2012 1 次提交
-
-
由 Martin Kletzander 提交于
There is a new <pm/> element implemented that can control what ACPI sleeping states will be advertised by BIOS and allowed to be switched to by libvirt. The default keeps defaults on hypervisor, otherwise forces chosen setting. The documentation of the pm element is added as well.
-
- 01 9月, 2012 1 次提交
-
-
由 Viktor Mihajlovski 提交于
Introducing a new iolimits element allowing to override certain properties of a guest block device like the physical and logical block size. This can be useful for platforms with 'non-standard' disk formats like S390 DASD with its 4K block size. Signed-off-by: NViktor Mihajlovski <mihajlov@linux.vnet.ibm.com>
-
- 31 8月, 2012 2 次提交
-
-
由 Marcelo Cerri 提交于
To avoid backward compatibility issues, this patch suppresses auto-generated DAC labels from XML. This change affects commands such as dumpxml and save. Signed-off-by: NMarcelo Cerri <mhcerri@linux.vnet.ibm.com>
-
由 Marcelo Cerri 提交于
With this patch libvirt tries to assign a model to a single seclabel when model is missing. Libvirt will look up at host's capabilities and assign the first model to seclabel. This patch fixes: 1. The problem with existing guests that have a seclabel defined in its XML. 2. A XML parse error when a guest is restored. Signed-off-by: NMarcelo Cerri <mhcerri@linux.vnet.ibm.com>
-
- 30 8月, 2012 2 次提交
-
-
由 Peter Krempa 提交于
virDomainVcpuPinAdd does a realloc on vcpupin_list if the new vcpu pin definition doesn't fit into the array. The list is an array of pointers but the function definition didn't support returning the changed pointer to the caller if it was realloced. This caused segfaults if realloc would change the base pointer.
-
由 Peter Krempa 提交于
virDomainVcpuPinDefCopy when the control flow reaches out of memory cleanup code, the flow would end in a infinite loop as the loop variable wasn't decremented. Also a dereference of NULL pointers was possible if allocation of the Vcpu pinning definiton structure failed.
-
- 28 8月, 2012 1 次提交
-
-
由 Osier Yang 提交于
* src/conf/domain_conf.c: Use STREQ_NULLABLE instead of STREQ, as def->seclables[i]->model could be NULL.
-
- 27 8月, 2012 1 次提交
-
-
由 Ján Tomko 提交于
When checking for seclabels without security models, def->nseclabels is already set to n. In the case of an error def->seclabels is freed but nseclabels is left untouched. This leads to a segmentation fault when def is freed in virDomainDefParseXML.
-
- 24 8月, 2012 4 次提交
-
-
由 Eric Blake 提交于
The name 'virDomainDiskSnapshot' didn't fit in with our normal conventions of using a prefix hinting that it is related to a virDomainSnapshotPtr. Also, a future patch will reuse the enum for declaring where the VM memory is stored. * src/conf/snapshot_conf.h (virDomainDiskSnapshot): Rename... (virDomainSnapshotLocation): ...to this. (_virDomainSnapshotDiskDef): Update clients. * src/conf/domain_conf.h (_virDomainDiskDef): Likewise. * src/libvirt_private.syms (domain_conf.h): Likewise. * src/conf/domain_conf.c (virDomainDiskDefParseXML) (virDomainDiskDefFormat): Likewise. * src/conf/snapshot_conf.c: (virDomainSnapshotDiskDefParseXML) (virDomainSnapshotAlignDisks, virDomainSnapshotDefFormat): Likewise. * src/qemu/qemu_driver.c (qemuDomainSnapshotDiskPrepare) (qemuDomainSnapshotCreateSingleDiskActive) (qemuDomainSnapshotCreateDiskActive, qemuDomainSnapshotCreateXML): Likewise.
-
由 Eric Blake 提交于
This has several benefits: 1. Future snapshot-related code has a definite place to go (and I _will_ be adding some) 2. Snapshot errors now use the VIR_FROM_DOMAIN_SNAPSHOT error classification, which has been underutilized (previously only in libvirt.c) * src/conf/domain_conf.h, domain_conf.c: Split... * src/conf/snapshot_conf.h, snapshot_conf.c: ...into new files. * src/Makefile.am (DOMAIN_CONF_SOURCES): Build new files. * po/POTFILES.in: Mark new file for translation. * src/vbox/vbox_tmpl.c: Update caller. * src/esx/esx_driver.c: Likewise. * src/qemu/qemu_command.c: Likewise. * src/qemu/qemu_domain.h: Likewise.
-
由 Eric Blake 提交于
We were failing to react to allocation failure when initializing a snapshot object list. Changing things to store a pointer instead of a complete object adds one more possible point of allocation failure, but at the same time, will make it easier to react to failure now, as well as making it easier for a future patch to split all virDomainSnapshotPtr handling into a separate file, as I continue to add even more snapshot code. Luckily, there was only one client outside of domain_conf.c that was actually peeking inside the object, and a new wrapper function was easy. * src/conf/domain_conf.h (_virDomainObj): Use a pointer. (virDomainSnapshotObjListInit): Rename. (virDomainSnapshotObjListFree, virDomainSnapshotForEach): New declarations. (_virDomainSnapshotObjList): Move definitions... * src/conf/domain_conf.c: ...here. (virDomainSnapshotObjListInit, virDomainSnapshotObjListDeinit): Rename... (virDomainSnapshotObjListNew, virDomainSnapshotObjListFree): ...to these. (virDomainSnapshotForEach): New function. (virDomainObjDispose, virDomainListPopulate): Adjust callers. * src/qemu/qemu_domain.c (qemuDomainSnapshotDiscard) (qemuDomainSnapshotDiscardAllMetadata): Likewise. * src/qemu/qemu_migration.c (qemuMigrationIsAllowed): Likewise. * src/qemu/qemu_driver.c (qemuDomainSnapshotLoad) (qemuDomainUndefineFlags, qemuDomainSnapshotCreateXML) (qemuDomainSnapshotListNames, qemuDomainSnapshotNum) (qemuDomainListAllSnapshots) (qemuDomainSnapshotListChildrenNames) (qemuDomainSnapshotNumChildren) (qemuDomainSnapshotListAllChildren) (qemuDomainSnapshotLookupByName, qemuDomainSnapshotGetParent) (qemuDomainSnapshotGetXMLDesc, qemuDomainSnapshotIsCurrent) (qemuDomainSnapshotHasMetadata, qemuDomainRevertToSnapshot) (qemuDomainSnapshotDelete): Likewise. * src/libvirt_private.syms (domain_conf.h): Export new function.
-
由 Michal Privoznik 提交于
Only parse model, if static labelling, or a base label is set, or doing active XML.
-
- 23 8月, 2012 1 次提交
-
-
由 Hu Tao 提交于
For emulator, the vcpuid field is always set to -1, instead of parsing XML for the value of it.
-
- 22 8月, 2012 9 次提交
-
-
由 Hu Tao 提交于
This patch introduces support of setting emulator's period and quota to limit cpu bandwidth when the vm starts. Also updates XML Schema for new entries and docs.
-
由 Tang Chen 提交于
Introduce 2 APIs to support emulator threads pin. 1) virDomainEmulatorPinAdd: setup emulator threads pin with a given cpumap string. 2) virDomainEmulatorPinDel: remove all emulator threads pin. Signed-off-by: NTang Chen <tangchen@cn.fujitsu.com> Signed-off-by: NHu Tao <hutao@cn.fujitsu.com>
-
由 Tang Chen 提交于
This patch adds a new xml element <emulatorpin>, which is a sibling to the existing <vcpupin> element under the <cputune>, to pin emulator threads to specified physical CPUs. Signed-off-by: NTang Chen <tangchen@cn.fujitsu.com> Signed-off-by: NHu Tao <hutao@cn.fujitsu.com>
-
由 Hu Tao 提交于
-
由 Hu Tao 提交于
1. add a new function virDomainVcpuPinDefCopy 2. make virDomainVcpuPinDefFree non-static
-
由 Hu Tao 提交于
-
由 Hu Tao 提交于
-
由 J.B. Joret 提交于
A hypervisor may allow to override the disk geometry of drives. Qemu, as an example with cyls=,heads=,secs=[,trans=]. This patch extends the domain config to allow the specification of disk geometry with libvirt. Signed-off-by: NJ.B. Joret <jb@linux.vnet.ibm.com> Signed-off-by: NViktor Mihajlovski <mihajlov@linux.vnet.ibm.com>
-
由 Stefan Berger 提交于
This patch provides basic support for using firewalld's firewall-cmd rather than then plain eb/ip(6)tables commands.
-
- 21 8月, 2012 3 次提交
-
-
由 Martin Kletzander 提交于
Port allocations for SPICE and VNC behave almost the same (with default ports), but there is some mess in the code. This patch clears these inconsistencies and makes sure the same behavior will be used when ports for remote displays are changed. Changes: - hard-coded number 5900 removed (handled elsewhere like with VNC) - reservedVNCPorts renamed to reservedRemotePorts (it's not just for VNC anymore) - QEMU_VNC_PORT_{MIN,MAX} renamed to QEMU_REMOTE_PORT_{MIN,MAX} - port allocation unified for VNC and SPICE
-
由 Marcelo Cerri 提交于
This patch updates the domain and capability XML parser and formatter to support more than one "seclabel" element for each domain and device. The RNG schema and the tests related to this are also updated by this patch. Signed-off-by: NMarcelo Cerri <mhcerri@linux.vnet.ibm.com>
-
由 Marcelo Cerri 提交于
This patch updates the structures that store information about each domain and each hypervisor to support multiple security labels and drivers. It also updates all the remaining code to use the new fields. Signed-off-by: NMarcelo Cerri <mhcerri@linux.vnet.ibm.com>
-
- 18 8月, 2012 4 次提交
-
-
由 Shradha Shah 提交于
This function is needed by the network driver in a later commit. It is useful in functions like networkNotifyActualDevice and networkReleaseActualDevice
-
由 Shradha Shah 提交于
This patch introduces the new forward mode='hostdev' along with attribute managed. Includes updates to the network RNG and new xml parser/formatter code. Signed-off-by: NShradha Shah <sshah@solarflare.com>
-
由 Shradha Shah 提交于
Move the functions the parse/format, and validate PCI addresses to their own file so they can be conveniently used in other places besides device_conf.c Refactoring existing code without causing any functional changes to prepare for new code. This patch makes the code reusable. Signed-off-by: NShradha Shah <sshah@solarflare.com>
-
由 Jiri Denemark 提交于
Change device type of a virtio channel from/to spicevmc is not a user visible change. However, spicevmc channels use different default target name than other virtio channels. To maintain ABI stability during this change target name must be explicitly specified (and equal) in both configurations.
-
- 16 8月, 2012 1 次提交
-
-
由 Laine Stump 提交于
The following config elements now support a <vlan> subelements: within a domain: <interface>, and the <actual> subelement of <interface> within a network: the toplevel, as well as any <portgroup> Each vlan element must have one or more <tag id='n'/> subelements. If there is more than one tag, it is assumed that vlan trunking is being requested. If trunking is required with only a single tag, the attribute "trunk='yes'" should be added to the toplevel <vlan> element. Some examples: <interface type='hostdev'/> <vlan> <tag id='42'/> </vlan> <mac address='52:54:00:12:34:56'/> ... </interface> <network> <name>vlan-net</name> <vlan trunk='yes'> <tag id='30'/> </vlan> <virtualport type='openvswitch'/> </network> <interface type='network'/> <source network='vlan-net'/> ... </interface> <network> <name>trunk-vlan</name> <vlan> <tag id='42'/> <tag id='43'/> </vlan> ... </network> <network> <name>multi</name> ... <portgroup name='production'/> <vlan> <tag id='42'/> </vlan> </portgroup> <portgroup name='test'/> <vlan> <tag id='666'/> </vlan> </portgroup> </network> <interface type='network'/> <source network='multi' portgroup='test'/> ... </interface> IMPORTANT NOTE: As of this patch there is no backend support for the vlan element for *any* network device type. When support is added in later patches, it will only be for those select network types that support setting up a vlan on the host side, without the guest's involvement. (For example, it will be possible to configure a vlan for a guest connected to an openvswitch bridge, but it won't be possible to do that for one that is connected to a standard Linux host bridge.)
-
- 15 8月, 2012 3 次提交
-
-
由 Laine Stump 提交于
Each interface has a single pointer to a filterref object. That filterref can itself point to multiple other filterrefs, but at the toplevel there is only one. The parser had previously just silently overwritten earlier filterrefs when a new one was encountered, so the interface was left with whichever was the last filterref in the xml, ignoring all the others. This patch logs an error when it sees more than one filterref.
-
由 Laine Stump 提交于
Just as each physical device used by a network has a connections counter, now each network has a connections counter which is incremented once for each guest interface that connects using this network. The count is output in the live network XML, like this: <network connections='20'> ... </network> It is read-only, and for informational purposes only - it isn't used internally anywhere by libvirt.
-
由 Laine Stump 提交于
It may be useful for management applications to know which physical network devices are in use by guests. This information is already available in the network objects, but wasn't output in the XML. This patch outputs it when the INACTIVE flag isn't set (and if it's non-0).
-