- 19 10月, 2017 40 次提交
-
-
由 Peter Krempa 提交于
Get rid of the first copy of the mess.
-
由 Peter Krempa 提交于
This horrible piece of spaghetti code is copy-past(ae)d in the SCSI and USB disk hotplug code with minimal changes. Extract it for further reuse.
-
由 Peter Krempa 提交于
Some messages deal with the disk itself thus using the disk target is better than using the disk source name which can be NULL in some cases.
-
由 Peter Krempa 提交于
The check if the disk is empty is wrong and would spuriously reject NBD sources. Remove it.
-
由 Peter Krempa 提交于
The code can't fail so having error handling is pointless.
-
由 Ján Tomko 提交于
Move the space after the colon.
-
由 Ján Tomko 提交于
Back in the times of using 'pci_del', unplugging a device without a PCI address was not wired up. After completely removing support for qemu without QEMU_CAPS_DEVICE, aliases are used to uniquely identify devices in all cases. Remove the pointless validation of data that was already present in the domain definition.
-
由 Ján Tomko 提交于
There is no point in iterating over all devices if none of them could possibly match.
-
由 Ján Tomko 提交于
Allow unplugging USB and virtio USB devices. https://bugzilla.redhat.com/show_bug.cgi?id=1379603
-
由 Ján Tomko 提交于
For both virtio input devices and USB input devices. https://bugzilla.redhat.com/show_bug.cgi?id=1379603
-
由 Ján Tomko 提交于
A function that builds the -device string for input devices.
-
由 Ján Tomko 提交于
Move assignment of input device alias into a separate function, for reuse on hotplug.
-
-
-
由 Ján Tomko 提交于
There are two more cases where we set an S390/CCW/PCI address type based on the machine type. Reuse qemuDomainEnsureVirtioAddress to reduce repetition.
-
由 Ján Tomko 提交于
Split out the common code responsible for reserving/assigning PCI/CCW addresses for virtio disks into a helper function for reuse by other virtio devices.
-
由 Ján Tomko 提交于
Let it be reused in qemu_domain_address.
-
由 Ján Tomko 提交于
We pass the source.file to qemuCheckCCWS390AddressSupport for the purpose of reporting an error message without actually checking that the rng device is of type VIR_DOMAIN_RNG_BACKEND_RANDOM. Change it to a hardcoded "rng" string, which also avoids referring to the device by a host-side attribute.
-
由 Ján Tomko 提交于
After a successful attach, the device address has already been set. Remove the pointless assignment.
-
由 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 提交于
We need to send allowReboot in the migration cookie to ensure the same behavior of the virDomainSetLifecycleAction() API on the destination. Consider this scenario: 1. On the source the domain is started with: <on_poweroff>destroy</on_poweroff> <on_reboot>restart</on_reboot> <on_crash>destroy</on_crash> 2. User calls an API to set "destroy" for <on_reboot>: <on_poweroff>destroy</on_poweroff> <on_reboot>destroy</on_reboot> <on_crash>destroy</on_crash> 3. The guest is migrated to a different host 4a. Without the allowReboot in the migration cookie the QEMU process on destination would be started with -no-reboot which would prevent using the virDomainSetLifecycleAction() API for the rest of the guest lifetime. 4b. With the allowReboot in the migration cookie the QEMU process on destination is started without -no-reboot like it was started on the source host and the virDomainSetLifecycleAction() API continues to work. The following patch adds a QEMU implementation of the virDomainSetLifecycleAction() API and that implementation disallows using the API if all actions are set to "destroy" because we add "-no-reboot" on the QEMU command line. Changing the lifecycle action is in this case pointless because the QEMU process is always terminated. Reviewed-by: NJohn Ferlan <jferlan@redhat.com> Signed-off-by: NPavel Hrdina <phrdina@redhat.com>
-
由 Pavel Hrdina 提交于
This will be used later on in implementation of new API virDomainSetLifecycleAction(). In order to use it, we need to store the value in status XML to not lose the information if libvirtd is restarted. If some guest was started by old libvirt where it was not possible to change the lifecycle action for running guest, we can safely detect it based on the current actions from the status XML. 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>
-
由 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>
-
由 Pavel Hrdina 提交于
Extract the required data inside a function instead of passing it all as arguments. 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>
-
由 Jiri Denemark 提交于
Commit v3.8.0-95-gfd885a06 dropped nmodels parameter from several APIs in src/cpu/cpu.h, but failed to update all callers. Signed-off-by: NJiri Denemark <jdenemar@redhat.com>
-
由 Erik Skultety 提交于
If we find ourselves in the situation that the 'add' uevent has been fired earlier than the sysfs tree for a device was created, we should use the best-effort approach and give kernel some predetermined amount of time, thus waiting for the attributes to be ready rather than discarding the device from our device list forever. If those don't appear in the given time frame, we need to move on, since libvirt can't wait indefinitely. Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1463285Signed-off-by: NErik Skultety <eskultet@redhat.com>
-
由 Erik Skultety 提交于
Since we have a number of places where we workaround timing issues with devices, attributes (files in general) not being available at the time of processing them by calling usleep in a loop for a fixed number of tries, we could as well have a utility function that would do that. Therefore we won't have to duplicate this ugly workaround even more. Signed-off-by: NErik Skultety <eskultet@redhat.com>
-
由 Erik Skultety 提交于
Adjust udevEventHandleThread to be a proper thread routine running in an infinite loop handling devices. The handler thread pulls all available data from the udev monitor and only then waits until a wakeup signal for new incoming data has been emitted by udevEventHandleCallback. Signed-off-by: NErik Skultety <eskultet@redhat.com>
-
由 Erik Skultety 提交于
This patch splits udevEventHandleCallback in two (introduces udevEventHandleThread) in order to be later able to refactor the latter to actually become a normal thread which will wait some time for the kernel to create the whole sysfs tree for a device as we cannot do that in the event loop directly. Signed-off-by: NErik Skultety <eskultet@redhat.com>
-
由 Erik Skultety 提交于
udevSetupSystemDev only needs the udev data lock to be locked because of calling udevGetDMIData which accesses some protected structure members, but it can do that on its own just fine, no need to hold the lock the whole time. Signed-off-by: NErik Skultety <eskultet@redhat.com>
-