- 20 2月, 2018 1 次提交
-
-
由 Daniel P. Berrangé 提交于
The controller model is slightly unusual in that the default value is -1, not 0. As a result the default value is not covered by any of the existing enum cases. This in turn means that any switch() statements that think they have covered all cases, will in fact not match the default value at all. In the qemuDomainDeviceCalculatePCIConnectFlags() method this has caused a serious mistake where we fallthrough from the SCSI controller case, to the VirtioSerial controller case, and from the USB controller case to the IDE controller case. By adding explicit enum constant starting at -1, we can ensure switches remember to handle the default case. Reviewed-by: NJohn Ferlan <jferlan@redhat.com> Signed-off-by: NDaniel P. Berrangé <berrange@redhat.com>
-
- 19 2月, 2018 1 次提交
-
-
由 Daniel P. Berrangé 提交于
During domain startup there are many places where we need to acquire secrets. Currently code passes around a virConnectPtr, except in the places where we pass in NULL. So there are a few codepaths where ability to start guests using secrets will fail. Change to acquire a handle to the secret driver when needed. Reviewed-by: NJohn Ferlan <jferlan@redhat.com> Signed-off-by: NDaniel P. Berrangé <berrange@redhat.com>
-
- 14 2月, 2018 1 次提交
-
-
由 Michal Privoznik 提交于
https://bugzilla.redhat.com/show_bug.cgi?id=1515533 We're already checking if IPv4 prefix isn't too long. But we are not checking if it isn't too short. QEMU supports prefixes longer than 4 (including). I haven't find anything similar related to IPv6 in qemu sources. Signed-off-by: NMichal Privoznik <mprivozn@redhat.com> Reviewed-by: NJohn Ferlan <jferlan@redhat.com>
-
- 13 2月, 2018 6 次提交
-
-
由 Andrea Bolognani 提交于
Instead of storing separately whether the feature is enabled or not and what resizing policy should be used, store both of them in a single place. Signed-off-by: NAndrea Bolognani <abologna@redhat.com> Reviewed-by: NJohn Ferlan <jferlan@redhat.com>
-
由 Andrea Bolognani 提交于
Instead of storing separately whether the feature is enabled or not and what driver should be used, store both of them in a single place. Signed-off-by: NAndrea Bolognani <abologna@redhat.com> Reviewed-by: NJohn Ferlan <jferlan@redhat.com>
-
由 Andrea Bolognani 提交于
When no GIC version is specified, we currently default to GIC v2; however, that's not a great default, since guests will fail to start if the hardware only supports GIC v3. Change the behavior so that a sensible default is chosen instead. That basically means using the same algorithm whether the user didn't explicitly enable the GIC feature or they explicitly enabled it but didn't specify any GIC version. Signed-off-by: NAndrea Bolognani <abologna@redhat.com> Reviewed-by: NJohn Ferlan <jferlan@redhat.com>
-
由 Andrea Bolognani 提交于
Keep them along with other arch/machine type checks for features instead of waiting until command line generation time. Signed-off-by: NAndrea Bolognani <abologna@redhat.com> Reviewed-by: NJohn Ferlan <jferlan@redhat.com>
-
由 Andrea Bolognani 提交于
The compiler can make sure we are handling all features. While reworking the logic, also change error messages to a more consistent style. Signed-off-by: NAndrea Bolognani <abologna@redhat.com> Reviewed-by: NJohn Ferlan <jferlan@redhat.com>
-
由 Andrea Bolognani 提交于
We want to perform all feature verification in a single spot, but some of it (eg. GIC) is currently being performed at command line generation time, and moving it to PostParse() would cause guests to disappear. Moving verification to Validate() allows us to side-step the issue. Signed-off-by: NAndrea Bolognani <abologna@redhat.com> Reviewed-by: NJohn Ferlan <jferlan@redhat.com>
-
- 10 2月, 2018 2 次提交
-
-
由 Andrea Bolognani 提交于
This is a hard error, and should be handled as such. Introduced in 24614760. Signed-off-by: NAndrea Bolognani <abologna@redhat.com> Reviewed-by: NJohn Ferlan <jferlan@redhat.com>
-
由 Andrea Bolognani 提交于
Signed-off-by: NAndrea Bolognani <abologna@redhat.com>
-
- 09 2月, 2018 2 次提交
-
-
由 Daniel P. Berrangé 提交于
Loadable drivers must never depend on each other. Over time some usage mistakenly crept in for the storage and network drivers, but now this is eliminated the syntax-check rules can enforce this separation once more. Signed-off-by: NDaniel P. Berrangé <berrange@redhat.com>
-
由 Daniel P. Berrangé 提交于
The QEMU driver loadable module needs to be able to resolve all ELF symbols it references against libvirt.so. Some of its symbols can only be resolved against the storage_driver.so loadable module which creates a hard dependancy between them. By moving the storage file backend framework into the util directory, this gets included directly in the libvirt.so library. The actual backend implementations are still done as loadable modules, so this doesn't re-add deps on gluster libraries. Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
-
- 07 2月, 2018 2 次提交
-
-
由 Viktor Mihajlovski 提交于
Refreshing the halted state can cause VM performance issues. Since s390 is currently the only architecture with a known interest in the halted state, we're avoiding to call QEMU on other platforms. Signed-off-by: NViktor Mihajlovski <mihajlov@linux.vnet.ibm.com>
-
由 Peter Krempa 提交于
Since it may be possible that the state is unknown in some cases we should store it as a tristate so that other code using it can determine whether the state was updated.
-
- 06 2月, 2018 5 次提交
-
-
由 John Ferlan 提交于
Add an API to allow fetching the memory only dump statistics for a job via the qemuDomainGetJobInfo API. Reviewed-by: NJiri Denemark <jdenemar@redhat.com>
-
由 John Ferlan 提交于
Handle a DUMP_COMPLETED event processing the status, stats, and error string. Use the @status in order to copy the error that was generated whilst processing the @stats data. If an error was provided by QEMU, then use that instead. If there's no async job, we can just ignore the data. Reviewed-by: NJiri Denemark <jdenemar@redhat.com>
-
由 John Ferlan 提交于
Define the qemuMonitorDumpStats as a new job JobStatsType to handle being able to get memory dump statistics. For now do nothing with the new TYPE_MEMDUMP. Reviewed-by: NJiri Denemark <jdenemar@redhat.com>
-
由 John Ferlan 提交于
Add a TYPE_SAVEDUMP so that when coalescing stats for a save or dump we don't needlessly try to get the mirror stats for a migration. Other conditions can still use MIGRATION and SAVEDUMP interchangably including usage of the @migStats field to fetch/store the data. Reviewed-by: NJiri Denemark <jdenemar@redhat.com>
-
由 John Ferlan 提交于
Convert the stats field in _qemuDomainJobInfo to be a union. This will allow for the collection of various different types of stats in the same field. When starting the async job that will end up being used for stats, set the @statsType value appropriately. The @mirrorStats are special and are used with stats.mig in order to generate the returned job stats for a migration. Using the NONE should avoid the possibility that some random async job would try to return stats for migration even though a migration is not in progress. For now a migration and a save job will use the same statsType Reviewed-by: NJiri Denemark <jdenemar@redhat.com>
-
- 05 2月, 2018 1 次提交
-
-
由 Marc Hartmayer 提交于
Add and use qemuProcessEventFree for freeing qemuProcessEvents. This is less error-prone as the compiler can help us make sure that for every new enumeration value of qemuProcessEventType the qemuProcessEventFree function has to be adapted. All process*Event functions are *only* called by qemuProcessHandleEvent and this function does the freeing by itself with qemuProcessEventFree. This means that an explicit freeing of processEvent->data is no longer required in each process*Event handler. The effectiveness of this change is also demonstrated by the fact that it fixes a memory leak of the panic info data in qemuProcessHandleGuestPanic. Reported-by: NWang Dong <dongdwdw@linux.vnet.ibm.com> Signed-off-by: NBjoern Walk <bwalk@linux.vnet.ibm.com> Signed-off-by: NMarc Hartmayer <mhartmay@linux.vnet.ibm.com> Reviewed-by: NBoris Fiuczynski <fiuczy@linux.vnet.ibm.com> Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
-
- 03 2月, 2018 10 次提交
-
-
由 John Ferlan 提交于
Move the SATA controller check from command line building to controller def validation. This includes copying the SATA skip check found in qemuBuildSkipController.
-
由 John Ferlan 提交于
Move the qemuCaps checks over to qemuDomainControllerDefValidatePCI. This requires two test updates in order to set the correct capability bit for an xml2xml test as well as setting up the similar capability for the pseries memlocktest.
-
由 John Ferlan 提交于
Excluding the qemuCaps checks, move the remainder of the checks that validate whether the PCI definition is valid or not into qemuDomainControllerDefValidatePCI.
-
由 John Ferlan 提交于
Similar to the checking the modelName vs. NAME_NONE, let's make the ModelNameTypeToString check more generic too within the checking done in controller validation (with the same ignore certain models. NB: We need to keep the ModelNameTypeToString fetch in command line validation since we use it, but at least we can assume it returns something valid now.
-
由 John Ferlan 提交于
Move the various modelName == NAME_NONE from the command line generation into domain controller validation. Also rather than have multiple cases with the same check, let's make the code more generic, but also note that it was the modelName option that caused the failure. We also have to be sure not to check the PCI models that we don't care about. For the remaining checks in command line building, we can use the field name in the error message to be more specific about what causes the failure.
-
由 John Ferlan 提交于
Move PCI validation checks out of qemu_command into the proper qemu_domain validation helper. Since there's a lot to move, we'll start slow by replicating the pcie-root and pci-root avoidance from qemuBuildSkipController and the first switch found in qemuBuildControllerDevStr.
-
由 John Ferlan 提交于
Move SCSI validation from qemu_command into qemu_domain. Rename/reorder the args in qemuCheckSCSIControllerIOThreads to match the caller as well as fixing up the comments to remove the previously removed qemuCaps arg.
-
由 John Ferlan 提交于
Let's make sure that non SCSI virtio-scsi isn't used for any type other than a virtio-scsi controller.
-
由 John Ferlan 提交于
Move to qemu_domain during the validation of controller options and rename qemuDomainCheckSCSIControllerModel.
-
由 John Ferlan 提交于
Move the checks that various attributes are not set on any controller other than SCSI controller using virtio-scsi model into the common controller validate checks.
-
- 01 2月, 2018 1 次提交
-
-
由 John Ferlan 提交于
During post parse processing, let's force setting the controller model to default value if not already set for defined controllers (e.g. the non implicit ones).
-
- 22 1月, 2018 2 次提交
-
-
由 Laine Stump 提交于
We recently added a generic XHCI USB3 controller to QEMU, and libvirt supports adding that controller rather than the NEC XHCI USB3 controller, but when auto-adding a USB controller to Q35 domains we were still adding the vendor-specific NEC controller. This patch changes to add the generic controller instead, if it's available in the QEMU binary that will be used. Signed-off-by: NLaine Stump <laine@laine.org> Reviewed-by: NPavel Hrdina <phrdina@redhat.com>
-
由 Laine Stump 提交于
qemuDomainDefValidateVideo() (called from qemuDomainDefValidate()) is just a loop performing various checks on each video device. Rather than maintaining this separate function, just fold the validations into qemuDomainDeviceDefValidateVideo(), which is called once for each video device.
-
- 18 1月, 2018 1 次提交
-
-
由 Marc Hartmayer 提交于
Commit 7a931a42 refactored the code and probably forgot to add this line. Signed-off-by: NMarc Hartmayer <mhartmay@linux.vnet.ibm.com> Reviewed-by: NBoris Fiuczynski <fiuczy@linux.vnet.ibm.com>
-
- 10 1月, 2018 1 次提交
-
-
由 Christian Ehrhardt 提交于
virSecurityManagerDomainSetPathLabel is used to make a path known to the security modules, but today is used interchangably for - paths to files/dirs to be accessed directly - paths to a dir, but the access will actually be to files therein Depending on the security module it is important to know which of these types it will be. The argument allowSubtree augments the call to the implementations of DomainSetPathLabel that can - per security module - decide if extra actions shall be taken. For now dac/selinux handle this as before, but apparmor will make use of it to add a wildcard to the path that was passed. Signed-off-by: NChristian Ehrhardt <christian.ehrhardt@canonical.com> Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
-
- 09 1月, 2018 1 次提交
-
-
由 Michal Privoznik 提交于
https://bugzilla.redhat.com/show_bug.cgi?id=1527740 Users might use a block device as UEFI VAR store. Or even have OVMF stored there. Therefore, when starting a domain and separate mount namespace is used, we have to create all the /dev entries that are configured for the domain. Signed-off-by: NMichal Privoznik <mprivozn@redhat.com> Reviewed-by: NJohn Ferlan <jferlan@redhat.com>
-
- 08 1月, 2018 1 次提交
-
-
由 Michal Privoznik 提交于
https://bugzilla.redhat.com/show_bug.cgi?id=1528502 So imagine you have /dev/blah symlink which points to /dev/sda. You attach /dev/blah as disk to your domain. Libvirt correctly creates the /dev/blah -> /dev/sda symlink in the qemu namespace. However, then you detach the disk, change the symlink so that it points to /dev/sdb and tries to attach the disk again. This time, however, the attach fails (well, qemu attaches wrong disk) because the code assumes that symlinks don't change. Well they do. This is inspired by test fix written by Eduardo Habkost. Signed-off-by: NMichal Privoznik <mprivozn@redhat.com> Reviewed-by: NAndrea Bolognani <abologna@redhat.com>
-
- 05 1月, 2018 1 次提交
-
-
由 Michal Privoznik 提交于
Since we have user aliases it may happen that users want to change it using 'update-device'. Instead of ignoring it silently, error out loudly. Note that we don't limit the check just for "ua-" prefixes because users might try to change libvirt generated aliases too. Signed-off-by: NMichal Privoznik <mprivozn@redhat.com> Reviewed-by: NJohn Ferlan <jferlan@redhat.com>
-
- 03 1月, 2018 1 次提交
-
-
由 Michal Privoznik 提交于
https://bugzilla.redhat.com/show_bug.cgi?id=1448149 If a domain has no numa nodes, that means we don't put any memory-backend-file onto the qemu command line. That in turn means we can't set access='shared'. Therefore, we should produce an error instead of ignoring the setting silently. Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
-