- 12 5月, 2015 8 次提交
-
-
由 Pavel Hrdina 提交于
Signed-off-by: NPavel Hrdina <phrdina@redhat.com>
-
由 Pavel Hrdina 提交于
There is a lot of places, were it's pretty easy for user to enter some characters that we need to escape to create a valid XML description. Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1197580Signed-off-by: NPavel Hrdina <phrdina@redhat.com>
-
由 Richard W.M. Jones 提交于
On the s/390x architecture, libvirt may already return 0 in the node_info->mhz field (see src/nodeinfo.c:linuxNodeInfoCPUPopulate). We may also want to return this on aarch64 in future, because calculating the proper value requires SMBIOS, which is not available on non-server-class systems (specifically on systems which don't adhere to the SBSA standard). Therefore this change documents the existing behaviour and provides a valid path for aarch64. Signed-off-by: NRichard W.M. Jones <rjones@redhat.com> Bug-URL: https://bugzilla.redhat.com/1206353
-
由 Michal Privoznik 提交于
https://bugzilla.redhat.com/show_bug.cgi?id=1191227 Since 0fa15b19 we have this variable SYNC_TIME which allows users to synchronize time on domain resume. However, despite what documentation says, it's by default on because it's never initialized. Fix this by setting it to zero at the beginning of the libvirt-guests script. Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
-
由 Laine Stump 提交于
The code to add device type to the commandline was identical for lsi and other models of SCSI controllers, but was duplicated (with the exception of a minor ordering difference of the if-else clauses) for the two cases. This patch replaces those two with a single instance of the code just before the if().
-
由 Laine Stump 提交于
This patch makes qemuValideDevicePCISlotsChipsets() more consistent in appearance by replacing several clauses of an if with the equivalent call to qemuDomainMachineIsI440FX. The if was checking exactly the same items, just in a slightly different order.
-
由 Roman Bogorodskiy 提交于
GCC installed from FreeBSD ports doesn't support building PIE executables and fails with: /usr/local/bin/ld: /usr/lib/crt1.o: relocation R_X86_64_32 against `_DYNAMIC' can not be used when making a shared object; recompile with -fPIC /usr/lib/crt1.o: error adding symbols: Bad value collect2: error: ld returned 1 exit status However, the configure check for '-fPIC -DPIC' doesn't catch that. In order to catch this case, add '-pie' to CFLAGS in m4/virt-compile-pie.m4 so it could detect lack of PIE support on configure time and don't fail the build.
-
由 Roman Bogorodskiy 提交于
gcc5 reports an error like this: bhyvexml2argvtest.c: In function 'testCompareXMLToArgvFiles': bhyvexml2argvtest.c:24:18: error: variable 'vm' set but not used [-Werror=unused-but-set-variable] virDomainObj vm; ^ cc1: all warnings being treated as errors Fix by dropping this variable.
-
- 11 5月, 2015 11 次提交
-
-
由 Luyao Huang 提交于
https://bugzilla.redhat.com/show_bug.cgi?id=1220265 Passing the return value to an enum directly is not safe. Fix this by comparing the true integer result of virTristateSwitchTypeFromString(). Signed-off-by: NLuyao Huang <lhuang@redhat.com>
-
由 Ján Tomko 提交于
For some reason, we allow a bridge name with %d in it, which we replace with an unsigned integer to form a bridge name that does not yet exist on the host. Do not blindly pass it to virAsprintf if it's not the only conversion, to prevent crashing on input like: <network> <name>test</name> <forward mode='none'/> <bridge name='virbr%d%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s'/> </network> Ignore any template strings that do not have exactly one %d conversion, like we do in various drivers before calling virNetDevTapCreateInBridgePort.
-
由 Peter Krempa 提交于
Since libvirt doesn't call to update the new balloon size in qemu add code that will handle tweaking of the size of the current balloon statistic until qemu reports the new size using the event.
-
由 Peter Krempa 提交于
To avoid having the ballooned memory size larger than the actual physical memory size, truncate the ballooned size if it overflows.
-
由 Peter Krempa 提交于
Specifying a balloon size more than the memory size of a guest isn't something that should be rejected when parsing the XML. Truncate the size to the maximum memory size.
-
由 Peter Krempa 提交于
Use the new domain list collection helpers to avoid going through virDomainPtrs. This additionally implements filter capability when called through the api that accepts domain list filters.
-
由 Peter Krempa 提交于
Add virDomainObjListConvert that will take a list of virDomains, apply filters and return a list of virDomainObjs.
-
由 Peter Krempa 提交于
Until now the virDomainListAllDomains API would lock the domain list and then every single domain object to access and filter it. This would potentially allow a unresponsive VM to block the whole daemon if a *listAllDomains call would get stuck. To avoid this problem this patch collects a list of referenced domain objects first from the list and then unlocks it right away. The expensive operation requiring locking of the domain object is executed after the list lock is dropped. While a single blocked domain will still lock up a listAllDomains call, the domain list won't be held locked and thus other APIs won't be blocked. Additionally this patch also fixes the lookup code, where we'd ignore the vm->removing flag and thus potentially return domain objects that would be deleted very soon so calling any API wouldn't make sense. As other clients also could benefit from operating on a list of domain objects rather than the public domain descriptors a new intermediate API - virDomainObjListCollect - is introduced by this patch. Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1181074
-
由 Peter Krempa 提交于
The passed function is meant to filter domains according to ACL match.
-
由 Peter Krempa 提交于
Separate the code to simplify future refactors.
-
由 Peter Krempa 提交于
Extend it to a universal helper used for clearing lists of any objects. Note that the argument type is specifically void * to allow implicit typecasting. Additionally add a helper that works on non-NULL terminated arrays once we know the length.
-
- 08 5月, 2015 1 次提交
-
-
由 Cole Robinson 提交于
My commit 747761a7 (v1.2.15 only) dropped this bit of logic when filling in a default arch in the XML: - /* First try to find one matching host arch */ - for (i = 0; i < caps->nguests; i++) { - if (caps->guests[i]->ostype == ostype) { - for (j = 0; j < caps->guests[i]->arch.ndomains; j++) { - if (caps->guests[i]->arch.domains[j]->type == domain && - caps->guests[i]->arch.id == caps->host.arch) - return caps->guests[i]->arch.id; - } - } - } That attempt to match host.arch is important, otherwise we end up defaulting to i686 on x86_64 host for KVM, which is not intended. Duplicate it in the centralized CapsLookup function. Additionally add some testcases that would have caught this. https://bugzilla.redhat.com/show_bug.cgi?id=1219191
-
- 07 5月, 2015 4 次提交
-
-
由 Cole Robinson 提交于
My commit 7b9de914 added some aarch64 CPU test cases. I wanted to test two different code paths but inadvertently added two of the same test cases. The second code path (using <cpu><model>host</model</cpu>) isn't easily exercised via the qemu tests anyways, I'll need to look elsewhere. Regardless, remove the redundant tests for now
-
由 Michal Privoznik 提交于
https://bugzilla.redhat.com/show_bug.cgi?id=890648 So, imagine you've issued an API that involves guest agent. For instance, you want to query guest's IP addresses. So the API acquires QUERY_JOB, locks the guest agent and issues the agent command. However, for some reason, guest agent replies to initial ping correctly, but then crashes tragically while executing real command (in this case guest-network-get-interfaces). Since initial ping went well, libvirt thinks guest agent is accessible and awaits reply to the real command. But it will never come. What will is a monitor event. Our handler (processSerialChangedEvent) will try to acquire MODIFY_JOB, which will fail obviously because the other thread that's executing the API already holds a job. So the event handler exits early, and the QUERY_JOB is never released nor ended. The way how to solve this is to put flag somewhere in the monitor internals. The flag is called @running and agent commands are issued iff the flag is set. The flag itself is set when we connect to the agent socket. And unset whenever we see DISCONNECT event from the agent. Moreover, we must wake up all the threads waiting for the agent. This is done by signalizing the condition they're waiting on. Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
-
由 Michal Privoznik 提交于
Running shutdown with mode agent on a shutoff domain gives cryptic error message: virsh # shutdown --mode agent gentoo error: Failed to shutdown domain gentoo error: Guest agent is not responding: QEMU guest agent is not connected After this patch, the error is more clear: virsh # shutdown --mode agent gentoo error: Failed to shutdown domain gentoo error: Requested operation is not valid: domain is not running Reported-by: NMartin Kletzander <mkletzan@redhat.com> Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
-
由 Lubomir Rintel 提交于
Upping an interface for no reason and not configuring it is a cardinal sin. With the default addrgenmode if eui64 it sticks a link-local address to the interface. That is not good, as NetworkManager would see an address configured, assume the interface is already configured and won't touch it iself and the interface might stay unconfigured until the end of the days. Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1124721Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
-
- 06 5月, 2015 9 次提交
-
-
由 Boris Fiuczynski 提交于
Allow ccw devices to be used with multiqueues. ccw provides a one to one relation of fds to queues and does not support the vectors option. Signed-off-by: NBoris Fiuczynski <fiuczy@linux.vnet.ibm.com> Reviewed-by: NMatthew Rosato <mjrosato@linux.vnet.ibm.com> Reviewed-by: NDaniel Hansel <daniel.hansel@linux.vnet.ibm.com> Reviewed-by: NCornelia Huck <cornelia.huck@de.ibm.com>
-
由 John Ferlan 提交于
Coverity points out that qemuMonitorGetAllBlockStatsInfo could return a -1 and thus not fill in 'stats' (leaving it NULL). Then the call to qemuMonitorBlockStatsUpdateCapacity will dereference it.
-
由 John Ferlan 提交于
Coverity complains over the [n]values pairing in virQEMUCapsFreeStringList and rather than make a bunch if "if values" checks prior to calling, by just adding the values check inside the free function we avoid the chance that somehow nvalues is > 0, while values == NULL
-
由 John Ferlan 提交于
Coverity points out it was possible to have a zero return from qemuBuildRNGBackendProps thus not filling in 'props' and then causing a NULL dereference on the next call.
-
由 John Ferlan 提交于
Coverity found that xenXMConfigCacheAddFile has an error path in which no error message and a -1 was not returned which could have resulted in a NULL dereference in a VIR_DEBUG statement and of course an erroneous 0 value returned!
-
由 John Ferlan 提交于
Coverity notes that ->ifname is used after the VIR_FREE done in the code path after the call to virNetDevMacVLanDeleteWithVPortProfile by a call to virNetDevOpenvswitchRemovePort. Since the ->ifname will be VIR_FREE()'d eventually in virDomainNetDefFree just remove the extraneous VIR_FREE here. When originally added, the Openvswitch code wasn't present and checks were made for non NULL prior to use.
-
由 John Ferlan 提交于
Coverity complains that in the error paths both the < 0 condition and the success path after the qemuDomainObjExitMonitor failure will end up going to cleanup. So just use ignore_value in this error path to resolve the complaint.
-
由 John Ferlan 提交于
If the virStringSearch() returns a 0 (zero), then each of the uses of the call will just jump to cleanup forgetting to free the returned empty list. Expand the scope a bit of each use and free at cleanup.
-
由 John Ferlan 提交于
The returned socks from virNetSocketNewListenTCP needs to be VIR_FREE'd as well as seach of the Close/Unref on all the socks[i] that is already done
-
- 05 5月, 2015 7 次提交
-
-
由 Jim Fehlig 提交于
The xend driver and the parsing/formating code in src/xenconfig have long supported soundhw. Add support in the libxl driver too.
-
由 Jim Fehlig 提交于
Add logrotate config for log files in /var/log/libvirt/libxl.
-
由 Luyao Huang 提交于
Signed-off-by: NLuyao Huang <lhuang@redhat.com>
-
由 Luyao Huang 提交于
https://bugzilla.redhat.com/show_bug.cgi?id=1176020 We had a check for the vcpu count total number in <numa> before, however this check is not good enough. There are some examples: 1. one of cpu id is out of maxvcpus, can set success(cpu count = 5 < 10): <vcpu placement='static'>10</vcpu> <cell id='0' cpus='0-3,100' memory='512000' unit='KiB'/> 2. use the same cpu in 2 cell, can set success(cpu count = 8 < 10): <vcpu placement='static'>10</vcpu> <cell id='0' cpus='0-3' memory='512000' unit='KiB'/> <cell id='1' cpus='0-3' memory='512000' unit='KiB'/> 3. use the same cpu in 2 cell, cannot set success(cpu count = 11 > 10): <vcpu placement='static'>10</vcpu> <cell id='0' cpus='0-6' memory='512000' unit='KiB'/> <cell id='1' cpus='0-3' memory='512000' unit='KiB'/> Add a check for numa cpus, check if duplicate use one cpu in more than one cell. Signed-off-by: NLuyao Huang <lhuang@redhat.com> Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
-
由 Michal Privoznik 提交于
The only version that's supported in QEMU is version 2, currently. Fortunately, it is enabled by aarch64 automatically, so there's nothing for us that needs to be put onto command line. Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
-
由 Michal Privoznik 提交于
Some platforms, like aarch64, don't have APIC but GIC. So there's no reason to have <apic/> feature turned on. However, we are still missing <gic/> feature. This commit introduces the feature to XML parser and formatter, adds documentation and updates RNG schema. Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
-
由 Jiri Denemark 提交于
When migrating a domain while changing its name and using VIR_MIGRATE_PERSIST_DEST flag, libvirt would fail to properly change the name in the persistent definition. The inconsistency results in weird behavior when dumping domain XML, destroying the domain, restarting libvirtd and likely in several other situations. Since the new name is already stored in vm->def->name, we just need to make sure the persistent definition uses this new name too. https://bugzilla.redhat.com/show_bug.cgi?id=1076354Signed-off-by: NJiri Denemark <jdenemar@redhat.com>
-