- 13 11月, 2017 2 次提交
-
-
由 Wim ten Have 提交于
This patch converts NUMA configurations between the Xen libxl configuration file format and libvirt's XML format. XML HVM domain on a 4 node (2 cores/socket) configuration: <cpu> <numa> <cell id='0' cpus='0-1' memory='2097152' unit='KiB'> <distances> <sibling id='0' value='10'/> <sibling id='1' value='21'/> <sibling id='2' value='31'/> <sibling id='3' value='21'/> </distances> </cell> <cell id='1' cpus='2-3' memory='2097152' unit='KiB'> <distances> <sibling id='0' value='21'/> <sibling id='1' value='10'/> <sibling id='2' value='21'/> <sibling id='3' value='31'/> </distances> </cell> <cell id='2' cpus='3-4' memory='2097152' unit='KiB'> <distances> <sibling id='0' value='31'/> <sibling id='1' value='21'/> <sibling id='2' value='10'/> <sibling id='3' value='21'/> </distances> </cell> <cell id='3' cpus='5-6' memory='2097152' unit='KiB'> <distances> <sibling id='0' value='21'/> <sibling id='1' value='31'/> <sibling id='2' value='21'/> <sibling id='3' value='10'/> </distances> </cell> </numa> </cpu> Xen xl.cfg domain configuration: vnuma = [["pnode=0","size=2048","vcpus=0-1","vdistances=10,21,31,21"], ["pnode=1","size=2048","vcpus=2-3","vdistances=21,10,21,31"], ["pnode=2","size=2048","vcpus=4-5","vdistances=31,21,10,21"], ["pnode=3","size=2048","vcpus=6-7","vdistances=21,31,21,10"]] If there is no XML <distances> description amongst the <cell> data the conversion schema from xml to native will generate 10 for local and 20 for all remote instances. Signed-off-by: NWim ten Have <wim.ten.have@oracle.com> Reviewed-by: NJim Fehlig <jfehlig@suse.com> Signed-off-by: NJim Fehlig <jfehlig@suse.com>
-
由 Wim ten Have 提交于
Add support for describing NUMA distances in a domain's <numa> <cell> XML description. Below is an example of a 4 node setup: <cpu> <numa> <cell id='0' cpus='0-3' memory='2097152' unit='KiB'> <distances> <sibling id='0' value='10'/> <sibling id='1' value='21'/> <sibling id='2' value='31'/> <sibling id='3' value='21'/> </distances> </cell> <cell id='1' cpus='4-7' memory='2097152' unit='KiB'> <distances> <sibling id='0' value='21'/> <sibling id='1' value='10'/> <sibling id='2' value='21'/> <sibling id='3' value='31'/> </distances> </cell> <cell id='2' cpus='8-11' memory='2097152' unit='KiB'> <distances> <sibling id='0' value='31'/> <sibling id='1' value='21'/> <sibling id='2' value='10'/> <sibling id='3' value='21'/> </distances> <cell id='3' cpus='12-15' memory='2097152' unit='KiB'> <distances> <sibling id='0' value='21'/> <sibling id='1' value='31'/> <sibling id='2' value='21'/> <sibling id='3' value='10'/> </distances> </cell> </numa> </cpu> A <cell> defines a NUMA node. <distances> describes the NUMA distance from the <cell> to the other NUMA nodes (the <sibling>s). For example, in above XML description, the distance between NUMA node0 <cell id='0' ...> and NUMA node2 <sibling id='2' ...> is 31. Valid distance values are '10 <= value <= 255'. A distance value of 10 represents the distance to the node itself. A distance value of 20 represents the default value for remote nodes but other values are possible depending on the physical topology of the system. When distances are not fully described, any missing sibling distance values will default to 10 for local nodes and 20 for remote nodes. If distance is given for A -> B, then we default B -> A to the same value instead of 20. Signed-off-by: NWim ten Have <wim.ten.have@oracle.com> Reviewed-by: NDaniel P. Berrange <berrange@redhat.com> Signed-off-by: NJim Fehlig <jfehlig@suse.com>
-
- 09 11月, 2017 1 次提交
-
-
由 Peter Krempa 提交于
Use bool instead of an int.
-
- 08 11月, 2017 1 次提交
-
-
由 John Ferlan 提交于
Move the structures into virstorageobj so that both are known within virstorageobj.c.
-
- 07 11月, 2017 3 次提交
-
-
由 Peter Krempa 提交于
Similarly to how we store gluster names, split the name into a pool and image portions when paring the XML and store them separately.
-
由 Peter Krempa 提交于
Libvirt historically stores storage source path including the volume as one string in the XML, but that is not really flexible enough when dealing with the fields in the code. Previously we'd store the slash separating the two as part of the image name. This was fine for gluster but it's not necessary and does not scale well when converting other protocols. Don't store the slash as part of the path. The resulting change from absolute to relative path within the gluster driver should be okay, as the root directory is the default when accessing gluster.
-
由 Michal Privoznik 提交于
This function works over domain definition and not domain object. Its name is thus misleading. Signed-off-by: NMichal Privoznik <mprivozn@redhat.com> Reviewed-by: NJohn Ferlan <jferlan@redhat.com>
-
- 06 11月, 2017 1 次提交
-
-
由 Jiri Denemark 提交于
When coverage build is enabled, gcc complains about it: In file included from qemu/qemu_agent.h:29:0, from qemu/qemu_driver.c:47: qemu/qemu_driver.c: In function 'qemuDomainSetInterfaceParameters': ./conf/domain_conf.h:3397:1: error: inlining failed in call to 'virDomainNetTypeSharesHostView': call is unlikely and code size would grow [-Werror=inline] virDomainNetTypeSharesHostView(const virDomainNetDef *net) ^ Signed-off-by: NJiri Denemark <jdenemar@redhat.com>
-
- 04 11月, 2017 1 次提交
-
-
由 Dawid Zamirski 提交于
The optional values are 'piix3', 'piix4' or 'ich6'. Those will be needed to allow setting IDE controller model in VirtualBox driver.
-
- 03 11月, 2017 1 次提交
-
-
由 Andrea Bolognani 提交于
Right-aligning backslashes when defining macros or using complex commands in Makefiles looks cute, but as soon as any changes is required to the code you end up with either distractingly broken alignment or unnecessarily big diffs where most of the changes are just pushing all backslashes a few characters to one side. Generated using $ git grep -El '[[:blank:]][[:blank:]]\\$' | \ grep -E '*\.([chx]|am|mk)$$' | \ while read f; do \ sed -Ei 's/[[:blank:]]*[[:blank:]]\\$/ \\/g' "$f"; \ done Signed-off-by: NAndrea Bolognani <abologna@redhat.com>
-
- 27 10月, 2017 1 次提交
-
-
由 Michal Privoznik 提交于
Since vhostuser type is really a tap that is just plugged into different type of bridge, supporting QoS is trivial. Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
-
- 26 10月, 2017 1 次提交
-
-
由 Jiri Denemark 提交于
When adding CPU usability blockers I forgot to properly free them when in virDomainCapsCPUModelsDispose. Reported-by: NMarc Hartmayer <mhartmay@linux.vnet.ibm.com> Signed-off-by: NJiri Denemark <jdenemar@redhat.com> Reviewed-by: NPavel Hrdina <phrdina@redhat.com>
-
- 23 10月, 2017 2 次提交
-
-
由 Michal Privoznik 提交于
We need to format alias even for inactive XMLs since that's the way how users are going to identify their devices. Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
-
由 Michal Privoznik 提交于
They have to be unique within the domain. As usual, backwards compatibility takes its price. In this particular situation we have a device that is represented twice in a domain and so is its alias. Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
-
- 22 10月, 2017 1 次提交
-
-
由 Michal Privoznik 提交于
If driver that is calling the parse supports user supplied aliases, they can be parsed even for inactive XMLs. However, to avoid any clashes with aliases that libvirt generates, the user ones have to have "ua-" prefix. Note, that some drivers don't have notion of device aliases at all. Also, in order to support user supplied aliases some extra checks need to be done (e.g. during hotplug). Therefore we can't just enable this feature for all the drivers. Thus we need a flag that drivers set to tell parsing code that they can handle user supplied device aliases. Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
-
- 21 10月, 2017 1 次提交
-
-
由 John Ferlan 提交于
To avoid further confusion - rename the array elements to what they are.
-
- 20 10月, 2017 5 次提交
-
-
由 Pavel Hrdina 提交于
Introduced by 6094d6ec. Found by running libvirt-perl tests. Reviewed-by: NAndrea Bolognani <abologna@redhat.com> Signed-off-by: NPavel Hrdina <phrdina@redhat.com>
-
由 John Ferlan 提交于
Rather than a forward linked list, let's use the virHashTable in order to manage the objsName data. Requires numerous changes from List to Object management similar to many other drivers/vir*obj.c modules
-
由 John Ferlan 提交于
Modify the allocation to be a real RWLockable object and add the various RWLock{Read|Write} and RWUnlock calls to process the list of interfaces.
-
由 John Ferlan 提交于
Since the virStorageEncryptionPtr encryption; is a member of _virStorageSource it really should be allowed to be a subelement of the disk <source> for various disk formats: Source{File|Dir|Block|Volume} SourceProtocol{RBD|ISCSI|NBD|Gluster|Simple|HTTP} NB: Simple includes sheepdog, ftp, ftps, tftp That way we can set up to allow the <encryption> element to be formatted within the disk source, but we still need to be wary from whence the element was read - see keep track and when it comes to format the data, ensure it's written in the correct place. Modify the qemuxml2argvtest to add a parse failure when there is an <encryption> as a child of <disk> *and* an <encryption> as a child of <source>. The virschematest will read the new test files and validate from a RNG viewpoint things are fine.
-
由 John Ferlan 提交于
Since the virStorageAuthDefPtr auth; is a member of _virStorageSource it really should be allowed to be a subelement of the disk <source> for the RBD and iSCSI prototcols. That way we can set up to allow the <auth> element to be formatted within the disk source. Since we've allowed the <auth> to be a child of <disk>, we'll need to keep track of how it was read so that when writing out we'll know whether to format as child of <disk> or <source>. For the argv2xml parsing, let's format under <source> as a preference. Do not allow <auth> to be both a child of <disk> and <source>. Modify the qemuxml2argvtest to add a parse failure when there is an <auth> as a child of <disk> *and* an <auth> as a child of <source>. Add tests to validate that if the <auth> was found in <source>, then the resulting xml2xml and xml2arg works just fine. The two new .args file are exact copies of the non "-source" version of the file. The virschematest will read the new test files and validate from a RNG viewpoint things are fine Update the virstoragefile, virstoragetest, and args2xml file to show the "preference" to place <auth> as a child of <source>.
-
- 19 10月, 2017 12 次提交
-
-
由 Michal Privoznik 提交于
This function is going to make decisions based on the features set per each driver. For that we need the virDomainXMLOption object. Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
-
由 Michal Privoznik 提交于
It looks like the error message was copied from virsh, because that's where we have @ctl. Nevertheless, it's @flags which is invalid, not @ctl. Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
-
由 Peter Krempa 提交于
The code can't fail so having error handling is pointless.
-
-
由 Ján Tomko 提交于
Introduce virDomainAuditInput and use it to log the evdev passed to the guest.
-
由 Pavel Hrdina 提交于
There is one limitation for using this API, when the guest is started with all actions set to "destroy" we put "-no-reboot" on the QEMU command line. That cannot be changed while QEMU is running and the QEMU process is always terminated no matter what is configured for any action. Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1460677Reviewed-by: NJohn Ferlan <jferlan@redhat.com> Signed-off-by: NPavel Hrdina <phrdina@redhat.com>
-
由 Pavel Hrdina 提交于
Reviewed-by: NJohn Ferlan <jferlan@redhat.com> Signed-off-by: NPavel Hrdina <phrdina@redhat.com>
-
由 Pavel Hrdina 提交于
There is no need to have two different enums where one has the same values as the other one with some additions. Currently for on_poweroff and on_reboot we allow only subset of actions that are allowed for on_crash. This was covered in parse time using two different enums. Now to make sure that we don't allow setting actions that are not supported we need to check it while validating domain config. Reviewed-by: NJohn Ferlan <jferlan@redhat.com> Signed-off-by: NPavel Hrdina <phrdina@redhat.com>
-
由 Pavel Hrdina 提交于
Reviewed-by: NJohn Ferlan <jferlan@redhat.com> Signed-off-by: NPavel Hrdina <phrdina@redhat.com>
-
由 Pavel Hrdina 提交于
Reviewed-by: NJohn Ferlan <jferlan@redhat.com> Signed-off-by: NPavel Hrdina <phrdina@redhat.com>
-
由 Pavel Hrdina 提交于
Reviewed-by: NJohn Ferlan <jferlan@redhat.com> Signed-off-by: NPavel Hrdina <phrdina@redhat.com>
-
由 Erik Skultety 提交于
Even though hal doesn't make use of it, the privileged flag is related to the daemon/driver rather than the backend actually used. While at it, get rid of some tab indentation in the driver state struct. Signed-off-by: NErik Skultety <eskultet@redhat.com>
-
- 18 10月, 2017 2 次提交
-
-
由 Erik Skultety 提交于
So we have a syntax-check rule to catch all tab indents but it naturally can't catch tab spacing, i.e. as a delimiter. This patch is a result of running 'vim -en +retab +wq' (using tabstop=8 softtabstop=4 shiftwidth=4 expandtab) on each file from a list generated by the following: find . -regextype gnu-awk \ -regex ".*\.(rng|syms|html|s?[ch]|py|pl|php(\.code)?)(\.in)?" \ | xargs git grep -lP "\t" Signed-off-by: NErik Skultety <eskultet@redhat.com>
-
由 Nikolay Shirokovskiy 提交于
If same boot order is specified twice (or more) in domain xml we call free for uninitiaziled loadparm on cleanup in virDomainDeviceBootParseXML and SIGABRT (or similar) as a result.
-
- 17 10月, 2017 5 次提交
-
-
由 Jiri Denemark 提交于
Signed-off-by: NJiri Denemark <jdenemar@redhat.com> Reviewed-by: NPavel Hrdina <phrdina@redhat.com>
-
由 Peter Krempa 提交于
Express a properly terminated backing chain by putting a virStorageSource of type VIR_STORAGE_TYPE_NONE in the chain. The newly used helpers simplify this greatly. The change fixes a bug as formatting an incomplete backing chain and parsing it back would end up in expressing a terminated chain since src->backingStoreRaw was not populated. By relying on the terminator object this can be now processed appropriately.
-
由 Peter Krempa 提交于
Add helpers that will simplify checking if a backing file is valid or whether it has backing store. The helper virStorageSourceIsBacking returns true if the given virStorageSource is a valid backing store member. virStorageSourceHasBacking returns true if the virStorageSource has a backing store child. Adding these functions creates a central points for further refactors.
-
由 Peter Krempa 提交于
Storage driver uses virStorageSource only partially to store it's configuration but fully when parsing backing files of storage volumes. This patch sets the 'type' field to a value other than VIR_STORAGE_TYPE_NONE so that further patches can add a terminator element to backing chains without breaking iteration.
-
由 Peter Krempa 提交于
The backing store indexes were not bound to the storage sources in any way. To allow us to bind a given alias to a given storage source we need to save the index in virStorageSource. The backing store ids are now generated when detecting the backing chain. Since we don't re-detect the backing chain after snapshots, the numbering needs to be fixed there.
-