- 26 9月, 2013 1 次提交
-
-
由 Chen Hanxiao 提交于
The return value of virDomainControllerFind >=0 means that the specific controller was found. But some functions invoke it and treat 0 as not found. This patch fix these incorrect invocation. Signed-off-by: NChen Hanxiao <chenhanxiao@cn.fujitsu.com>
-
- 25 9月, 2013 19 次提交
-
-
由 Daniel P. Berrange 提交于
If qemuParseCommandLine finds an arg it does not understand it adds it to the QEMU passthrough custom arg list. If the qemuParseCommandLine method hits an error for any reason though, it just does 'VIR_FREE(cmd)' on the custom arg list. This means all actual args / env vars are leaked. Introduce a qemuDomainCmdlineDefFree method to be used for cleanup. Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
-
由 Daniel P. Berrange 提交于
If the call to virDomainControllerInsert fails in qemuParseCommandLine, the controller struct is leaked. Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
-
由 Daniel P. Berrange 提交于
The 'qemuStringToArgvEnv' method splits up a string of command line env/args to an 'arglist' array. It then copies env vars to a 'progenv' array and args to a 'progargv' array. When copyin the env vars, it NULL-ifies the element in 'arglist' that is copied. Upon OOM the 'virStringListFree' is called on progenv and arglist. Unfortunately, because the elements in 'arglist' related to env vars have been set to NULL, the call to virStringListFree(arglist) doesn't free anything, even though some non-NULL args vars still exist later in the array. To fix this leak, stop NULL-ifying the 'arglist' elements, and change the cleanup code to only free elements in the 'arglist' array, not 'progenv'. Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
-
由 Daniel P. Berrange 提交于
In a number of places in qemuParseCommandLineDisk, an error is reported, but no 'goto error' jump is used. This causes failure to report OOM conditions to the caller. Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
-
由 Daniel P. Berrange 提交于
If OOM occurs in qemuParseCommandLineDisk some intermediate variables will be leaked when parsing Sheepdog or RBD disks. Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
-
由 Daniel P. Berrange 提交于
The qemuBuildCommandLine code for parsing sound cards will leak an intermediate variable if an OOM occurs. Move the free'ing of the variable earlier to avoid the leak. Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
-
由 Daniel P. Berrange 提交于
In qemuParseNBDString, if the virURIParse fails, the error is not reported to the caller. Instead execution falls through to the non-URI codepath causing memory leaks later on. Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
-
由 Daniel P. Berrange 提交于
If qemuAddRBDHost fails due to parsing problems or OOM, then qemuParseRBDString cleanup is skipped causing a memory leak. Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
-
由 Daniel P. Berrange 提交于
qemuDomainPCIAddressGetNextSlot has a loop for finding compatible PCI buses. In the loop body it creates a PCI address string, but never frees this. This causes a leak if the loop executes more than one iteration, or if a call in the loop body fails. Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
-
由 Laine Stump 提交于
This resolves one of the issues listed in: https://bugzilla.redhat.com/show_bug.cgi?id=1003983 00:1E.0 is the location of this controller on at least some actual Q35 hardware, so we try to replicate the placement. The bridge should work just as well in any other location though, so if 00:1E.0 isn't available, just allow it to be auto-assigned anywhere appropriate.
-
由 Laine Stump 提交于
This will make it simpler to add checks for other types of controllers. This is a prerequisite for patches to resolve: https://bugzilla.redhat.com/show_bug.cgi?id=1003983
-
由 Laine Stump 提交于
This resolves one of the issues in: https://bugzilla.redhat.com/show_bug.cgi?id=1003983 This device is identical to qemu's "intel-hda" device (known as "ich6" in libvirt), but has a different PCI device ID (which matches the ID of the hda audio built into the ich9 chipset, of course). It's not supported in earlier versions of qemu, so it requires a capability bit.
-
由 Laine Stump 提交于
I'm not sure why this code was written to compare the strings that it had just retrieved from an enum->string conversion, rather than just look at the original enum values, but this yields the same results, and is much more efficient (especially as you add more devices). This is a prerequisite for patches to resolve: https://bugzilla.redhat.com/show_bug.cgi?id=1003983
-
由 Laine Stump 提交于
Part of the resolution to: https://bugzilla.redhat.com/show_bug.cgi?id=1003983 Although most devices available in qemu area defined as PCI devices, and strictly speaking should only be attached via a PCI slot, in practice qemu allows them to be attached to a PCIe slot and sometimes this makes sense. For example, The UHCI and EHCI USB controllers are usually attached directly to the PCIe "root complex" (i.e. PCIe slots) on real hardware, so that should be possible for a Q35-based qemu virtual machine as well. We still want to prefer a standard PCI slot when auto-assigning addresses, though, and in general to disallow attaching PCI devices via PCIe slots. This patch makes that possible by adding a new QEMU_PCI_CONNECT_TYPE_EITHER_IF_CONFIG flag. Three things are done with this flag: 1) It is set for the "pcie-root" controller 2) qemuCollectPCIAddress() now has a set of nested switches that set this "EITHER" flag for devices that we want to allow connecting to pcie-root when specifically requested in the config. 3) qemuDomainPCIAddressFlagsCompatible() adds this new flag to the "flagsMatchMask" if the address being checked came from config rather than being newly auto-allocated by libvirt (this knowledge is conveniently already available in the "fromConfig" arg). Now any device having the EITHER flag set can be connected to pcie-root if explicitly requested, but auto-allocated addresses for those devices will still be standard PCI slots instead. This patch only loosens the restrictions on devices that have been specifically requested, but the setup is such that it should be fairly easy to add new devices.
-
由 Laine Stump 提交于
Replace them with switch cases. This will make it more efficient when we add exceptions for more controller types, and other device types. This is a prerequisite for patches to resolve: https://bugzilla.redhat.com/show_bug.cgi?id=1003983
-
由 Peter Krempa 提交于
The previous patches added infrastructure to report better errors from monitor in some cases. This patch finalizes this "feature" by enabling this enhanced error reporting on early phases of VM startup. In these phases the possibility of qemu producing a useful error message is really high compared to running it during the whole life cycle. After the start up is complete, the feature is disabled to provide the usual error messages so that users are not confused by possibly irrelevant messages that may be in the domain log. The original motivation to do this enhancement is to capture errors when using VFIO device passthrough, where qemu reports errors after the monitor is initialized and the existing error catching code couldn't catch this producing a unhelpful message: # virsh start test error: Failed to start domain test error: Unable to read from monitor: Connection reset by peer With this change, the message is changed to: # virsh start test error: Failed to start domain test error: internal error: early end of file from monitor: possible problem: qemu-system-x86_64: -device vfio-pci,host=00:1a.0,id=hostdev0,bus=pci.0,addr=0x5: vfio: error, group 8 is not viable, please ensure all devices within the iommu_group are bound to their vfio bus driver. qemu-system-x86_64: -device vfio-pci,host=00:1a.0,id=hostdev0,bus=pci.0,addr=0x5: vfio: failed to get group 8 qemu-system-x86_64: -device vfio-pci,host=00:1a.0,id=hostdev0,bus=pci.0,addr=0x5: Device 'vfio-pci' could not be initialized
-
由 Peter Krempa 提交于
Change the monitor error code to add the ability to access the qemu log file using a file descriptor so that we can dig in it for a more useful error message. The error is now logged on monitor hangups and overwrites a possible lesser error. A hangup on the monitor usualy means that qemu has crashed and there's a significant chance it produced a useful error message. The functionality will be latent until the next patch.
-
由 Peter Krempa 提交于
Early VM startup errors usually produce a better error message in the machine log file. Currently we were accessing it only when the process exited during certain phases of startup. This will help adding a more comprehensive error extraction for early qemu startup phases. This patch adds infrastructure to keep a file descriptor for the machine log file that will be used in case an error happens.
-
由 Peter Krempa 提交于
Teach the function to skip character device definitions printed by qemu at startup in addition to libvirt log messages and make it usable from outside of qemu_process.c. Also add documentation about the func.
-
- 24 9月, 2013 9 次提交
-
-
由 Daniel P. Berrange 提交于
The parsing of '-usb' did not check for failure of the virDomainControllerInsert method. As a result on OOM, the parser mistakenly attached USB disks to the IDE controller. Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
-
由 Daniel P. Berrange 提交于
The code formatting NUMA args was ignoring the return value of virBitmapFormat, so on OOM, it would silently drop the NUMA cpumask arg. Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
-
由 Daniel P. Berrange 提交于
When building boot menu args, if OOM occurred the CLI args would end up containing 'order=(null)' due to a missing call to 'virBufferError'. Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
-
由 Daniel P. Berrange 提交于
The qemuParseCommandLine method did not check the return value of virStringSplit to see if OOM had occurred. This lead to dereference of a NULL pointer on OOM. Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
-
由 Daniel P. Berrange 提交于
Most callers of qemuParseKeywords were assigning its return value to a 'size_t' variable. Then then also checked '< 0' for error condition, but this will never be true with the unsigned size_t variable. Rather than using 'ssize_t', change qemuParseKeywords so that the element count is returned via an output parameter, leaving the return value solely as an error indicator. This avoids a crash accessing beyond the end of an error upon OOM. Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
-
由 Daniel P. Berrange 提交于
In commit 41b55056 Author: Eric Blake <eblake@redhat.com> Date: Wed Aug 28 15:01:23 2013 -0600 qemu: simplify list cleanup The qemuStringToArgvEnv method was changed to use virStringFreeList to free the 'arglist' array. This method assumes the string list array is NULL terminated, however, qemuStringToArgvEnv was not ensuring this when populating 'arglist'. This caused an out of bounds access by virStringFreeList when OOM occured in the initial loop of qemuStringToArgvEnv Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
-
由 Daniel P. Berrange 提交于
When parsing the RBD hosts, it increments the 'nhosts' counter before increasing the 'hosts' array allocation. If an OOM then occurs when increasing the array allocation, the cleanup block will attempt to access beyond the end of the array. Switch to using VIR_EXPAND_N instead of VIR_REALLOC_N to protect against this mistake Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
-
由 Daniel P. Berrange 提交于
If OOM occurs in qemuDomainCCWAddressSetCreate, it jumps to a cleanup block and frees the partially initialized object. It then mistakenly returns the address of the just free'd pointer instead of NULL. Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
-
由 Giuseppe Scrivano 提交于
Signed-off-by: NGiuseppe Scrivano <gscrivan@redhat.com> Signed-off-by: NEric Blake <eblake@redhat.com>
-
- 20 9月, 2013 2 次提交
-
-
由 Martin Kletzander 提交于
Since the wait is done during migration (still inside QEMU_ASYNC_JOB_MIGRATION_OUT), the code should enter the monitor as such in order to prohibit all other jobs from interfering in the meantime. This patch fixes bug #1009886 in which qemuDomainGetBlockInfo was waiting on the monitor condition and after GetSpiceMigrationStatus mangled its internal data, the daemon crashed. Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1009886
-
由 Laine Stump 提交于
This resolves https://bugzilla.redhat.com/show_bug.cgi?id=1008903 The Q35 machinetype has an implicit SATA controller at 00:1F.2 which isn't given the "expected" id of ahci0 by qemu when it's created. The original suggested solution to this problem was to not specify any controller for the disks that use the default controller and just specify "unit=n" instead; qemu should then use the first IDE or SATA controller for the disk. Unfortunately, this "solution" is ignorant of the fact that in the case of SATA disks, the "unit" attribute in the disk XML is actually *not* being used for the unit, but is instead used to specify the "bus" number; each SATA controller has 6 buses, and each bus only allows a single unit. This makes it nonsensical to specify unit='n' where n is anything other than 0. It also means that the only way to connect more than a single device to the implicit SATA controller is to explicitly give the bus names, which happen to be "ide.$n", where $n can be replaced by the disk's "unit" number.
-
- 18 9月, 2013 1 次提交
-
-
由 Jiri Denemark 提交于
virDomainSetBlockIoTuneEnsureACL was incorrectly called after we already started a job. As a result of this, the job was not cleaned up when an access driver had forbidden the action.
-
- 17 9月, 2013 8 次提交
-
-
由 Aline Manera 提交于
qemu/KVM also supports a tftp URL while specifying the cdrom ISO image. The xml should be as following: <disk type='network' device='cdrom'> <source protocol='tftp' name='/url/path'> <host name='host.name' port='69'/> </source> </disk> Signed-off-by: NAline Manera <alinefm@br.ibm.com>
-
由 Aline Manera 提交于
The ftps protocol is another protocol supported by qemu/KVM while specifying the cdrom ISO image. The xml should be as following: <disk type='network' device='cdrom'> <source protocol='ftps' name='/url/path'> <host name='host.name' port='990'/> </source> </disk> Signed-off-by: NAline Manera <alinefm@br.ibm.com>
-
由 Aline Manera 提交于
The https protocol is also accepted by qemu/KVM when specifying the cdrom ISO image. The xml should be as following: <disk type='network' device='cdrom'> <source protocol='https' name='/url/path'> <host name='host.name' port='443'/> </source> </disk> Signed-off-by: NAline Manera <alinefm@br.ibm.com>
-
由 Peter Krempa 提交于
If the ABI compatibility check with the "migratable" user XML is successful, we would leak the originally parsed XML from the user that would not be used in this case. Reported by Ján Tomko.
-
由 Peter Krempa 提交于
The function implemented common behavior that can be reused for other hypervisor drivers that use the virDomainObj data structures. Factor out the core into a separate helper func.
-
由 Peter Krempa 提交于
The function implemented common behavior that can be reused for other hypervisor drivers that use the virDomainObj data structures. Factor out the core into a separate helper func.
-
由 Peter Krempa 提交于
In the original implementation of external checkpoints I've mistakenly used the live definition to be stored in the save image. The normal approach is to use the "migratable" definition. This was discovered when commit 07966f6a changed the behavior to use a converted XML from the user to do the compatibility check to fix problem when using the regular machine saving. As the previous patch added a compatibility layer, we can now change the type of the XML in the image. Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1008340
-
由 Peter Krempa 提交于
External checkpoints have a bug in the implementation where they use the normal definition instead of the "migratable" one. This causes errors when the snapshot is being reverted using the workaround method via qemuDomainRestoreFlags() with a custom XML. This issue was introduced when commit 07966f6a changed the code to compare "migratable" XMLs from the user as we should have used migratable in the image too. This patch adds a compatibility layer, so that fixing the snapshot code won't make existing snapshots fail to load. Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1008340
-