- 23 3月, 2016 6 次提交
-
-
由 Andrea Bolognani 提交于
Ensure the code behaves properly even for situations that were not being considered before, such as simply detaching devices from the host without attaching them to a guest and attaching devices as managed even though they had already been manually detached from the host.
-
由 Andrea Bolognani 提交于
Instead of forcing the values for the unbind_from_stub, remove_slot and reprobe properties, look up the actual device and use that when calling virPCIDeviceReattach(). This ensures the device is restored to its original state after reattach: for example, if it was not bound to any driver before detach, it will not be bound forcefully during reattach.
-
由 Andrea Bolognani 提交于
We would be just fine looking up the information in pcidevs most of the time; however, some corner cases would not be handled properly, so look up the actual device instead.
-
由 Andrea Bolognani 提交于
After this patch, ownership of virPCIDevice instances is very easy to keep track of: for each host PCI device, the only instance that actually matters is the one inside one of the bookkeeping list. Whenever some operation needs to be performed on a PCI device, the actual device is looked up first; when this is not the case, a comment explains the reason.
-
由 Andrea Bolognani 提交于
Unmanaged devices, as the name suggests, are not detached automatically from the host by libvirt before being attached to a guest: it's the user's responsability to detach them manually beforehand. If that preliminary step has not been performed, the attach operation can't complete successfully. Instead of relying on the lower layers to error out with cryptic messages such as error: Failed to attach device from /tmp/hostdev.xml error: Path '/dev/vfio/12' is not accessible: No such file or directory prevent the situation altogether and provide the user with a more useful error message.
-
由 Andrea Bolognani 提交于
Unmanaged devices are attached to guests in two steps: first, the device is detached from the host and marked as inactive; subsequently, it is marked as active and attached to the guest. If the daemon is restarted between these two operations, we lose track of the inactive device. Steps 5 and 6 of virHostdevPreparePCIDevices() already subtly take care of this situation, but some planned changes will make it so that's no longer the case. Plus, explicit is always better than implicit.
-
- 22 3月, 2016 17 次提交
-
-
由 Pavel Hrdina 提交于
Use qemuProcessCreatePretendCmd instead duplicating required steps from qemuProcessStart. Signed-off-by: NPavel Hrdina <phrdina@redhat.com>
-
由 Pavel Hrdina 提交于
Update testutilsqemu to overwrite libDir and channelTargetDir and set private paths using domain's privateData. This changes is required for following patch. Signed-off-by: NPavel Hrdina <phrdina@redhat.com>
-
由 Pavel Hrdina 提交于
Use qemuProcessCreatePretendCmd instead duplicating required steps from qemuProcessStart. Signed-off-by: NPavel Hrdina <phrdina@redhat.com>
-
由 Pavel Hrdina 提交于
This will skip few steps from qemuProcessStart in order to create only qemu CMD. Use a VIR_QEMU_PROCESS_START_PRETEND for all the qemuProcess* functions called by this one to not modify or check host. This new function will be used later on for XMLToNative API and also for qemuxml2argvtest to make sure that both API and test uses the same code as qemuProcessStart. We need also update qemuProcessInit to wrap few lines of code with check that VIR_QEMU_PROCESS_START_PRETEND that makes sense only for qemuProcessStart. Signed-off-by: NPavel Hrdina <phrdina@redhat.com>
-
由 Pavel Hrdina 提交于
Signed-off-by: NPavel Hrdina <phrdina@redhat.com>
-
由 Pavel Hrdina 提交于
Move all code that checks host and domain. Do not check host if we use VIR_QEMU_PROCESS_START_PRETEND flag. Signed-off-by: NPavel Hrdina <phrdina@redhat.com>
-
由 Pavel Hrdina 提交于
This change is required by following patches. Signed-off-by: NPavel Hrdina <phrdina@redhat.com>
-
由 Pavel Hrdina 提交于
Move all code that modifies host system to this function. Signed-off-by: NPavel Hrdina <phrdina@redhat.com>
-
由 Pavel Hrdina 提交于
Move all code that modifies only live XML to this function. The new VIR_QEMU_PROCESS_START_PRETEND flag will be used by qemuXMLToNative and qemuxml2argvtest later in order to reuse the same code as qemuProcessStart uses. Signed-off-by: NPavel Hrdina <phrdina@redhat.com>
-
由 Pavel Hrdina 提交于
This removes the testFailed magic and makes the code more readable. Signed-off-by: NPavel Hrdina <phrdina@redhat.com>
-
由 Pavel Hrdina 提交于
The postParse callback is the correct place to generate default values that should be present in offline XML. Signed-off-by: NPavel Hrdina <phrdina@redhat.com>
-
由 Pavel Hrdina 提交于
Function qemuProcessLaunch returns '-2' in case there was an error and we need to cleanup labels. Signed-off-by: NPavel Hrdina <phrdina@redhat.com>
-
由 Pavel Hrdina 提交于
QEMU changed the error message to: "Tray of device 'drive-sata0-0-1' is not open" and they may change the error massage in the future. This updates the code to not depend on the text from the error message but only on error itself. Signed-off-by: NPavel Hrdina <phrdina@redhat.com>
-
由 Martin Kletzander 提交于
Every aligning requires at least one cast and it's hard to read. Let's make a function that makes sure the pointer is moved according to the alignment and use that to move throughout the data buffer. Signed-off-by: NMartin Kletzander <mkletzan@redhat.com>
-
由 Michal Privoznik 提交于
Problem is that in the test any status file matching tests/nssdata/*.status is loaded as it contains IP addresses that are parsed. However, there's no order specified in which the files are loaded. Therefore on different systems the order may be different. This is then producing an unexpected results. Instead of defining an order in which the files are loaded, make the code that checks for missing IP addresses (or redundant ones) cope with unordered list of addresses. The reasoning behind is that the code doing the parsing is used in real NSS module where we don't care for ordering. Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
-
由 Bjoern Walk 提交于
Let's add a test for SCSI target nodedev devices. Signed-off-by: NBjoern Walk <bwalk@linux.vnet.ibm.com>
-
由 Bjoern Walk 提交于
When reading in an XML definition for a SCSI target device, the name property of struct scsi_target refers to the @target element. Let's fix this obvious typo and also extend the XML schema to provide validation. Signed-off-by: NBjoern Walk <bwalk@linux.vnet.ibm.com>
-
- 21 3月, 2016 17 次提交
-
-
由 Jim Fehlig 提交于
Until now, the libxl driver ignored any <hap> setting in domain XML and deferred to libxl, which enables hap if not specified. While this is a good default, it prevents disabling hap if desired. This change allows disabling hap with <hap state='off'/>. hap is explicitly enabled with <hap/> or <hap state='on/>. Absense of <hap> retains current behavior of deferring default state to libxl.
-
由 Jim Fehlig 提交于
Hardware Assisted Paging is enabled by default in Xen. Change the capabilities output to reflect this. Signed-off-by: NJim Fehlig <jfehlig@suse.com>
-
由 Jim Fehlig 提交于
hap is enabled by default in xm and xl config and usually only specified when it is desirable to disable hap (hap = 0). Change the xm,xl <-> xml converter to behave similarly. I.e. only produce 'hap = 0' when <hap state='off'/> and vice versa. Signed-off-by: NJim Fehlig <jfehlig@suse.com>
-
由 Jim Fehlig 提交于
Most hypervisors use Hardware Assisted Paging by default and don't require specifying the feature in domain conf. But some hypervisors support disabling HAP on a per-domain basis. To enable HAP by default yet provide a knob to disable it, extend the <hap> feature with a 'state=on|off' attribute, similar to <pvspinlock> and <vmport> features. In the absence of <hap>, the hypervisor default (on) is used. <hap> without the state attribute would be the same as <hap state='on'/> for backwards compatibility. And of course <hap state='off'/> disables hap. Signed-off-by: NJim Fehlig <jfehlig@suse.com>
-
由 Jiri Denemark 提交于
The function already takes two bool arguments, switching to flags makes it a lot easier to read. Especially in case we need to add another boolean in the future. Signed-off-by: NJiri Denemark <jdenemar@redhat.com>
-
由 Jiri Denemark 提交于
In post-copy mode none of the hosts has a complete guest state and rolling back migration is impossible. Thus aborting it would be equivalent to destroying the domain. Signed-off-by: NJiri Denemark <jdenemar@redhat.com>
-
由 Jiri Denemark 提交于
When migration fails in the post-copy mode, it's impossible to just kill the destination domain and resume the source since the source no longer contains current guest state. Let's mark domains on both sides as VIR_DOMAIN_PAUSED_POSTCOPY_FAILED to let the upper layer decide what to do with them. Signed-off-by: NJiri Denemark <jdenemar@redhat.com>
-
由 Jiri Denemark 提交于
Signed-off-by: NJiri Denemark <jdenemar@redhat.com>
-
由 Jiri Denemark 提交于
When destination libvirtd is restarted during migration in Finish phase just after the point we started guest CPUs, we should not kill the domain. Signed-off-by: NJiri Denemark <jdenemar@redhat.com>
-
由 Cristian Klein 提交于
Signed-off-by: NCristian Klein <cristiklein@gmail.com> Signed-off-by: NJiri Denemark <jdenemar@redhat.com>
-
由 Jiri Denemark 提交于
Signed-off-by: NJiri Denemark <jdenemar@redhat.com>
-
由 Cristian Klein 提交于
Signed-off-by: NCristian Klein <cristiklein@gmail.com> Signed-off-by: NJiri Denemark <jdenemar@redhat.com>
-
由 Cristian Klein 提交于
Signed-off-by: NCristian Klein <cristiklein@gmail.com> Signed-off-by: NJiri Denemark <jdenemar@redhat.com>
-
由 Cristian Klein 提交于
Signed-off-by: NCristian Klein <cristiklein@gmail.com> Signed-off-by: NJiri Denemark <jdenemar@redhat.com>
-
由 Cristian Klein 提交于
Signed-off-by: NCristian Klein <cristiklein@gmail.com> Signed-off-by: NJiri Denemark <jdenemar@redhat.com>
-
由 Jiri Denemark 提交于
Migration enters "postcopy-active" state after QEMU switches to post-copy and pauses guest CPUs. From libvirt's point of view this state is similar to "completed" because we need to transfer guest execution to the destination host. Signed-off-by: NJiri Denemark <jdenemar@redhat.com>
-
由 Cristian Klein 提交于
To use post-copy one has to start the migration with VIR_MIGRATE_POSTCOPY flag and, while migration is in progress, call virDomainMigrateStartPostCopy() to switch from pre-copy to post-copy. Signed-off-by: NCristian Klein <cristiklein@gmail.com> Signed-off-by: NJiri Denemark <jdenemar@redhat.com>
-