- 08 11月, 2014 1 次提交
-
-
由 Michal Privoznik 提交于
As reviewing patches upstream it occurred to me, that we have two functions doing nearly the same: virDomainParseMemory which expects XML in the following format: <memory unit='MiB'>1337</memory> The other function being virDomainHugepagesParseXML expecting the following format: <someElement size='1337' unit='MiB'/> It wouldn't matter to have two functions handle two different scenarios like this if we could only not copy code that handles 32bit arches around. So this code merges the common parts into one by inventing new @units_xpath argument to virDomainParseMemory which allows overriding the default location of @unit attribute in XML. With this change both scenarios above can be parsed with virDomainParseMemory. Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
-
- 07 11月, 2014 1 次提交
-
-
由 Prerna Saxena 提交于
This adds support for PowerPC Little Endian architecture., and allows libvirt to spawn VMs based on 'ppc64le' architecture. Signed-off-by: NPradipta Kr. Banerjee <bpradip@in.ibm.com> Signed-off-by: NPrerna Saxena <prerna@linux.vnet.ibm.com> Reviewed-by: NMichal Privoznik <mprivozn@redhat.com>
-
- 01 11月, 2014 1 次提交
-
-
由 Eric Blake 提交于
Commit 6c9a8a49 (Oct 2014) exposed a long-standing issue on 32-bit machines: code related to virDomainSetMemoryParameters has always been documented as using a 64-bit limit, but it was implemented by calling virDomainParseMemory which enforced an 'unsigned long' limit. Since VIR_DOMAIN_MEMORY_PARAM_UNLIMITED capped to a long is -1, but virDomainParseScaledValue no longer accepts negative values, an attempt to use 2^53-1 as a hard memory limit started failing the testsuite. However, the problem with capping things artificially low has existed for much longer - ever since commits 4888f0fb and 2e22f23b (Mar 2012) switched internal tracking from 'unsigned long' to 'unsigned long long' (prior to that time, the cap was a side-effect of the choice of types). We _have_ to cap the balloon memory values, (no thanks to baked in 'unsigned long' of API such as virDomainSetMaxMemory or virDomainGetInfo with no counterpart API that guarantees 64-bit access to those numbers) but memory parameters have never needed the artificial limit. At any rate, the solution is to make the parser function gain a parameter, and only do the reduced 32-bit cap for the values that are constrained due to API. * src/conf/domain_conf.h (_virDomainMemtune): Add comments. * src/conf/domain_conf.c (virDomainParseMemory): Add parameter. (virDomainDefParseXML): Adjust callers. Signed-off-by: NEric Blake <eblake@redhat.com>
-
- 30 10月, 2014 1 次提交
-
-
由 Martin Kletzander 提交于
It makes sense for none of the callers to have negative value as an output and, fortunately, if anyone tried defining domain with negative memory or any other value parsed by virDomainParseScaledValue(), the resulting value was 0. That means we can error out during parsing as it won't break anything. Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1155843Signed-off-by: NMartin Kletzander <mkletzan@redhat.com>
-
- 25 10月, 2014 1 次提交
-
-
由 Daniel P. Berrange 提交于
The <sysinfo> data block was indented by 2 spaces too many. This was missed because we never had any test validating the XML formatting.
-
- 20 10月, 2014 1 次提交
-
-
由 Maxime Leroy 提交于
The mode attribute is required for the source element of vhost-user. Thus virDomainNetDefFormat should always generate a xml with it and not only when the mode is server. The commit fixes the issue. And it adds a vhostuser interface in 'client' mode to qemuxml2argv-net-vhostuser.(args|xml) to test this usecase. Signed-off-by: NMaxime Leroy <maxime.leroy@6wind.com>
-
- 15 10月, 2014 4 次提交
-
-
由 Peter Krempa 提交于
Shove it to the top of the file so that it can be reused earlier.
-
由 Peter Krempa 提交于
As in the device info iterator add a switch that will force the compiler to check that new device types are added to the ABI stability checker.
-
由 Peter Krempa 提交于
Although the device will probably inhibit migration add checks to make sure that the configuration change gets caught.
-
由 Peter Krempa 提交于
Use typecasted switch statement and note the type used to select the address type in a comment.
-
- 13 10月, 2014 1 次提交
-
-
由 Wang Rui 提交于
Signed-off-by: NWang Rui <moon.wangrui@huawei.com>
-
- 11 10月, 2014 1 次提交
-
-
由 Jim Fehlig 提交于
Allow the Xen drivers to determine default vram values. Sane default vaules depend on the device model being used, so the drivers are in the best position to determine the defaults. For the legacy xen driver, it is best to maintain the existing logic for setting default vram values to ensure there are no regressions. The libxl driver currently does not support configuring a video device. Support will be added in a subsequent patch, where the benefit of this change will be reaped. Signed-off-by: NJim Fehlig <jfehlig@suse.com>
-
- 06 10月, 2014 1 次提交
-
-
由 Laine Stump 提交于
This new attribute will control whether or not libvirt will pay attention to guest notifications about changes to network device mac addresses and receive filters. The default for this is 'no' (for security reasons). If it is set to 'yes' *and* the specified device model and connection support it (currently only macvtap+virtio) then libvirt will watch for NIC_RX_FILTER_CHANGED events, and when it receives one, it will issue a query-rx-filter command, retrieve the result, and modify the host-side macvtap interface's mac address and unicast/multicast filters accordingly. The functionality behind this attribute will be in a later patch. This patch merely adds the attribute to the top-level of a domain's <interface> as well as to <network> and <portgroup>, and adds documentation and schema/xml2xml tests. Rather than adding even more test files, I've just added the net attribute in various applicable places of existing test files.
-
- 04 10月, 2014 3 次提交
-
-
由 Martin Kletzander 提交于
Signed-off-by: NMartin Kletzander <mkletzan@redhat.com>
-
由 Martin Kletzander 提交于
This patch implements support for the ivshmem device in QEMU. Signed-off-by: NMaxime Leroy <maxime.leroy@6wind.com> Signed-off-by: NMartin Kletzander <mkletzan@redhat.com>
-
由 Martin Kletzander 提交于
This patch adds parsing/formatting code as well as documentation for shared memory devices. This will currently be only accessible in QEMU using it's ivshmem device, but is designed as generic as possible to allow future expansion for other hypervisors. In the devices section in the domain XML users may specify: - For shmem device using a server: <shmem name='shmem0'> <server path='/tmp/socket-ivshmem0'/> <size unit='M'>32</size> <msi vectors='32' ioeventfd='on'/> </shmem> - For ivshmem device not using an ivshmem server: <shmem name='shmem1'> <size unit='M'>32</size> </shmem> Most of the configuration is made optional so it also allows specifications like: <shmem name='shmem1/> <shmem name='shmem2'> <server/> </shmem> Signed-off-by: NMaxime Leroy <maxime.leroy@6wind.com> Signed-off-by: NMartin Kletzander <mkletzan@redhat.com>
-
- 01 10月, 2014 1 次提交
-
-
由 Pavel Hrdina 提交于
If you use public api virConnectListAllDomains() with second parameter set to NULL to get only the number of domains you will lock out all other operations with domains. Introduced by commit 2c680804. Signed-off-by: NPavel Hrdina <phrdina@redhat.com>
-
- 24 9月, 2014 2 次提交
-
-
由 Ján Tomko 提交于
Add options for tuning segment offloading: <driver> <host csum='off' gso='off' tso4='off' tso6='off' ecn='off' ufo='off'/> <guest csum='off' tso4='off' tso6='off' ecn='off' ufo='off'/> </driver> which control the respective host_ and guest_ properties of the virtio-net device.
-
由 Pavel Hrdina 提交于
If you have a bridge network in running domain and libvirtd is restarted the information about host bridge interface is lost from live xml. Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1140085Signed-off-by: NPavel Hrdina <phrdina@redhat.com>
-
- 23 9月, 2014 1 次提交
-
-
由 Martin Kletzander 提交于
Signed-off-by: NMartin Kletzander <mkletzan@redhat.com>
-
- 19 9月, 2014 2 次提交
-
-
由 John Ferlan 提交于
Add the 'rawio' attribute to match _virDomainDiskDef and process the hostdev XML similarly to the disk XML for a lun which supports/requires rawio
-
由 John Ferlan 提交于
Adjust disk definition for 'rawio' to use the TristateBool logic
-
- 16 9月, 2014 5 次提交
-
-
由 Ján Tomko 提交于
For tuning the network, alternative devices for creating tap and vhost devices can be specified via: <backend tap='/dev/net/tun' vhost='/dev/net-vhost'/>
-
由 Ján Tomko 提交于
Use just one int variable for all the FromString calls.
-
由 Ján Tomko 提交于
Instead of checking upfront if the <driver> element will be needed in a big condition, just format all the attributes into a string and output the <driver> element if the string is not empty.
-
由 Erik Skultety 提交于
We already are checking for negative value, reporting an error, but using wrong function and the check only succeeds when a value that cannot be converted to number successfully is encountered. This patch provides just a minor change in call of the right version of function virStrToLong. Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1138539
-
由 John Ferlan 提交于
https://bugzilla.redhat.com/show_bug.cgi?id=1101574 Add an option 'iothreadpin' to the <cpuset> to allow for setting the CPU affinity for each IOThread. The iothreadspin will mimic the vcpupin with respect to being able to assign each iothread to a specific CPU, although iothreads ids start at 1 while vcpu ids start at 0. This matches the iothread naming scheme.
-
- 15 9月, 2014 1 次提交
-
-
由 John Ferlan 提交于
Seems when commit id 'ea130e3b' added the checks to ensure each of the hard_limit, soft_limit, and swap_hard_limit wasn't set at VIR_DOMAIN_MEMORY_PARAM_UNLIMITED - a copy/paste error of using the 'hard_limit' for each comparison was done. Adjust the code.
-
- 10 9月, 2014 2 次提交
-
-
由 Michal Privoznik 提交于
When using split UEFI image, it may come handy if libvirt manages per domain _VARS file automatically. While the _CODE file is RO and can be shared among multiple domains, you certainly don't want to do that on the _VARS file. This latter one needs to be per domain. So at the domain startup process, if it's determined that domain needs _VARS file it's copied from this master _VARS file. The location of the master file is configurable in qemu.conf. Temporary, on per domain basis the location of master NVRAM file can be overridden by this @template attribute I'm inventing to the <nvram/> element. All it does is holding path to the master NVRAM file from which local copy is created. If that's the case, the map in qemu.conf is not consulted. Signed-off-by: NMichal Privoznik <mprivozn@redhat.com> Acked-by: NLaszlo Ersek <lersek@redhat.com>
-
由 Michal Privoznik 提交于
Up to now, users can configure BIOS via the <loader/> element. With the upcoming implementation of UEFI this is not enough as BIOS and UEFI are conceptually different. For instance, while BIOS is ROM, UEFI is programmable flash (although all writes to code section are denied). Therefore we need new attribute @type which will differentiate the two. Then, new attribute @readonly is introduced to reflect the fact that some images are RO. Moreover, the OVMF (which is going to be used mostly), works in two modes: 1) Code and UEFI variable store is mixed in one file. 2) Code and UEFI variable store is separated in two files The latter has advantage of updating the UEFI code without losing the configuration. However, in order to represent the latter case we need yet another XML element: <nvram/>. Currently, it has no additional attributes, it's just a bare element containing path to the variable store file. Signed-off-by: NMichal Privoznik <mprivozn@redhat.com> Acked-by: NLaszlo Ersek <lersek@redhat.com> Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
-
- 09 9月, 2014 1 次提交
-
-
由 Eric Blake 提交于
The new blockcopy API wants to reuse only a subset of the disk hotplug parser - namely, we only care about the embedded virStorageSourcePtr inside a <disk> XML. Strange as it may seem, it was easier to just parse an entire disk definition, then throw away everything but the embedded source, than it was to disentangle the source parsing code from the rest of the overall disk parsing function. All that I needed was a couple of tweaks and a new internal flag that determines whether the normally-mandatory target element can be gracefully skipped, since everything else was already optional. * src/conf/domain_conf.h (virDomainDiskSourceParse): New prototype. * src/conf/domain_conf.c (VIR_DOMAIN_XML_INTERNAL_DISK_SOURCE): New flag. (virDomainDiskDefParseXML): Honor flag to make target optional. (virDomainDiskSourceParse): New function. Signed-off-by: NEric Blake <eblake@redhat.com>
-
- 05 9月, 2014 2 次提交
-
-
由 Michal Privoznik 提交于
https://bugzilla.redhat.com/show_bug.cgi?id=1027096#c8 There are two ways in which security model can make it way into <seclabel/>. One is as the @model attribute, the second one is via security_driver knob in qemu.conf. Then, while parsing <seclabel/> several checks and fix ups of old, stale combinations are performed. However, iff @model is specified. They are not done in the latter case. So it's still possible to feed libvirt with senseless combinations (if qemu.conf is adjusted correctly). One example of a seclabel that needs some adjustment (in case security_driver=none in qemu.conf) is: <seclabel type='dynamic' relabel='yes'/> The fixup code is copied from virSecurityLabelDefParseXML (covering the former case) into virSecurityLabelDefsParseXML (which handles the latter case). Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
-
由 Eric Blake 提交于
Our style overwhelmingly uses hanging braces (the open brace hangs at the end of the compound condition, rather than on its own line), with the primary exception of the top level function body. Fix the few remaining outliers, before adding a syntax check in a later patch. * src/interface/interface_backend_netcf.c (netcfStateReload) (netcfInterfaceClose, netcf_to_vir_err): Correct use of { in compound statement. * src/conf/domain_conf.c (virDomainHostdevDefFormatSubsys) (virDomainHostdevDefFormatCaps): Likewise. * src/network/bridge_driver.c (networkAllocateActualDevice): Likewise. * src/util/virfile.c (virBuildPathInternal): Likewise. * src/util/virnetdev.c (virNetDevGetVirtualFunctions): Likewise. * src/util/virnetdevmacvlan.c (virNetDevMacVLanVPortProfileCallback): Likewise. * src/util/virtypedparam.c (virTypedParameterAssign): Likewise. * src/util/virutil.c (virGetWin32DirectoryRoot) (virFileWaitForDevices): Likewise. * src/vbox/vbox_common.c (vboxDumpNetwork): Likewise. * tests/seclabeltest.c (main): Likewise. Signed-off-by: NEric Blake <eblake@redhat.com>
-
- 04 9月, 2014 1 次提交
-
-
由 Eric Blake 提交于
I'm about to add a syntax check that enforces our documented HACKING style of always using matching {} on if-else statements. This patch focuses on code shared between multiple drivers. * src/conf/domain_conf.c (virDomainFSDefParseXML) (virSysinfoParseXML, virDomainNetDefParseXML) (virDomainWatchdogDefParseXML) (virDomainRedirFilterUSBDevDefParseXML): Correct use of {}. * src/conf/interface_conf.c (virInterfaceDefParseDhcp) (virInterfaceDefParseIp, virInterfaceVlanDefFormat) (virInterfaceDefParseStartMode, virInterfaceDefParseBondMode) (virInterfaceDefParseBondMiiCarrier) (virInterfaceDefParseBondArpValid): Likewise. * src/conf/node_device_conf.c (virNodeDevCapStorageParseXML): Likewise. * src/conf/nwfilter_conf.c (virNWFilterRuleDetailsParse) (virNWFilterRuleParse, virNWFilterDefParseXML): Likewise. * src/conf/secret_conf.c (secretXMLParseNode): Likewise. * src/cpu/cpu_x86.c (x86Baseline, x86FeatureLoad, x86ModelLoad): Likewise. * src/network/bridge_driver.c (networkKillDaemon) (networkDnsmasqConfContents): Likewise. * src/node_device/node_device_hal.c (dev_refresh): Likewise. * src/nwfilter/nwfilter_gentech_driver.c (virNWFilterInstantiate): Likewise. * src/nwfilter/nwfilter_ebiptables_driver.c (_iptablesCreateRuleInstance): Likewise. * src/storage/storage_backend_disk.c (virStorageBackendDiskBuildPool): Likewise. Signed-off-by: NEric Blake <eblake@redhat.com>
-
- 29 8月, 2014 2 次提交
-
-
由 John Ferlan 提交于
Add a new disk "driver" attribute "iothread" to be parsed as the thread number for the disk to use. In order to more easily facilitate the usage and configuration of the iothread, a "zero" for the attribute indicates iothreads are not supported for the device and a positive value indicates the specific thread to try and use.
-
由 John Ferlan 提交于
Introduce XML to allowing adding iothreads to the domain. These can be used by virtio-blk-pci devices in order to assign a specific thread to handle the workload for the device. The iothreads are the official implementation of the virtio-blk Data Plane that's been in tech preview for QEMU.
-
- 28 8月, 2014 4 次提交
-
-
由 John Ferlan 提交于
A bunch of a useless warnings brought on by our own doing.
-
由 John Ferlan 提交于
Resolve a few RESOURCE_LEAK's identified by Coverity
-
由 Peter Krempa 提交于
Add helper to free a list of virDomainPtrs without raising or clearing errors. Use it in one place and prepare it for reuse.
-
由 John Ferlan 提交于
Coverity complains that checking for domain->def being non NULL in the if (live) path of virDomainObjAssignDef() would be unnecessary or a NULL deref since the call to virDomainObjIsActive() would already dereference domain->def when checking if the def->id field was != -1. Checked all callers to virDomainObjAssignDef() and each at some point dereferences (vm)->def->{field} prior to calling when live is true.
-