- 03 6月, 2019 1 次提交
-
-
由 Andrea Bolognani 提交于
Ensure unexpected values are dealt with correctly, that is by invoking virReportEnumRangeError() and immediately returning a negative value to the caller. Signed-off-by: NAndrea Bolognani <abologna@redhat.com> Reviewed-by: NJán Tomko <jtomko@redhat.com>
-
- 23 5月, 2019 1 次提交
-
-
由 Andrea Bolognani 提交于
Device validation should not have to wait until command line generation time. Moving the code to a separate function also allows us to avoid some unnecessary repetition. Signed-off-by: NAndrea Bolognani <abologna@redhat.com> Reviewed-by: NJán Tomko <jtomko@redhat.com>
-
- 10 5月, 2019 1 次提交
-
-
由 Eric Blake 提交于
In refactoring the snapshot code to prepare for checkpoints, I changed qemuDomainMomentDiscardAll to take a callback that would handle the cleanup of either a snapshot or a checkpoint, but failed to set the callback on one of the two snapshot callers. As a result, 'virsh undefine $dom --snapshots-metadata' crashed on a NULL function dereference. Fixes: a487890d Fixes: https://bugzilla.redhat.com/show_bug.cgi?id=1707708Signed-off-by: NEric Blake <eblake@redhat.com> Acked-by: NPeter Krempa <pkrempa@redhat.com>
-
- 09 5月, 2019 14 次提交
-
-
由 Eric Blake 提交于
VIR_CLASS_NEW insists that descendents of virObject have 'parent' as the name of their inherited base class member at offset 0. While it would be possible to write a new class-creation macro that takes the actual field name 'current', and rewrite VIR_CLASS_NEW to call the new macro with the hard-coded name 'parent', it seems less confusing if all object code uses similar naming. Thus, this is a mechanical rename in preparation of making virDomainSnapshotDef a descendent of virObject. Signed-off-by: NEric Blake <eblake@redhat.com> Acked-by: NPeter Krempa <pkrempa@redhat.com>
-
由 Eric Blake 提交于
VIR_CLASS_NEW insists that descendents of virObject have 'parent' as the name of their inherited base class member at offset 0. While it would be possible to write a new class-creation macro that takes the actual field name, and rewrite VIR_CLASS_NEW to call the new macro with the hard-coded name 'parent', so that we could make virDomainMomentDef use a custom name for its base class, it seems less confusing if all object code uses similar naming. Thus, this is a mechanical rename in preparation of making virDomainSnapshotDef a descendent of virObject, when we can no longer use 'parent' for a different purpose than the base class. Signed-off-by: NEric Blake <eblake@redhat.com> Acked-by: NPeter Krempa <pkrempa@redhat.com>
-
由 Peter Krempa 提交于
Use qemuDomainStorageSourceAccessModify with correct flags to do the job. Signed-off-by: NPeter Krempa <pkrempa@redhat.com> Reviewed-by: NJán Tomko <jtomko@redhat.com>
-
由 Peter Krempa 提交于
Some operations e.g. namespace setup are not necessary when modifying access to a file which the VM can already access. Add a flag which allows to skip them. Signed-off-by: NPeter Krempa <pkrempa@redhat.com> Reviewed-by: NJán Tomko <jtomko@redhat.com>
-
由 Peter Krempa 提交于
In some cases when we need to modify access permissions for a storage source which is already used by the VM we should not revoke all permissions on a failure. Allow this in qemuDomainStorageSourceAccessModify by adding a new flag. Signed-off-by: NPeter Krempa <pkrempa@redhat.com> Reviewed-by: NJán Tomko <jtomko@redhat.com>
-
由 Peter Krempa 提交于
Rather than jumping to the correct label use a set of booleans to determine which operation needs to be rolled back. This will allow more flexibility when e.g. rollback after a failed operation will not be necessary/desired. Signed-off-by: NPeter Krempa <pkrempa@redhat.com> Reviewed-by: NJán Tomko <jtomko@redhat.com>
-
由 Peter Krempa 提交于
Add a new flag which will set the image as read-only even if the image data allows writing. Signed-off-by: NPeter Krempa <pkrempa@redhat.com> Reviewed-by: NJán Tomko <jtomko@redhat.com>
-
由 Peter Krempa 提交于
Use qemuDomainStorageSourceAccessModify instead of the individual calls. Signed-off-by: NPeter Krempa <pkrempa@redhat.com> Reviewed-by: NJán Tomko <jtomko@redhat.com>
-
由 Peter Krempa 提交于
Add a new flag QEMU_DOMAIN_STORAGE_SOURCE_ACCESS_CHAIN to select whether to work on single image or full chain. Signed-off-by: NPeter Krempa <pkrempa@redhat.com> Reviewed-by: NJán Tomko <jtomko@redhat.com>
-
由 Peter Krempa 提交于
Upcoming patches will add a few more flags. Add an enum to collect them so that we don't end up with multiple bools. Signed-off-by: NPeter Krempa <pkrempa@redhat.com> Reviewed-by: NJán Tomko <jtomko@redhat.com>
-
由 Peter Krempa 提交于
The function will be able to deal with non-chains too so drop 'Chain' and also change the suffix to 'Modify' as it's used both for setup and teardown. Signed-off-by: NPeter Krempa <pkrempa@redhat.com> Reviewed-by: NJán Tomko <jtomko@redhat.com>
-
由 Peter Krempa 提交于
Introduce qemuDomainStorageSourceChainAccess(Allow|Revoke) as entry points to qemuDomainStorageSourceChainAccessPrepare for symmetry with the functions for single backing chain elements. Signed-off-by: NPeter Krempa <pkrempa@redhat.com> Reviewed-by: NJán Tomko <jtomko@redhat.com>
-
由 Peter Krempa 提交于
Move it to qemu_domain.c and call it qemuDomainStorageSourceChainAccessPrepare. Signed-off-by: NPeter Krempa <pkrempa@redhat.com> Reviewed-by: NJán Tomko <jtomko@redhat.com>
-
由 Peter Krempa 提交于
Use qemuDomainStorageSourceAccess(Allow|Revoke) instead. Signed-off-by: NPeter Krempa <pkrempa@redhat.com> Reviewed-by: NJán Tomko <jtomko@redhat.com>
-
- 07 5月, 2019 1 次提交
-
-
由 Eric Blake 提交于
Commits 4bc42986 and 218c81ea removed virDomainStorageSourceFormat on the grounds that there were no external callers; however, the upcoming backup code wants to output a <target> (push mode) or <scratch> (pull mode) element that is in all other respects identical to a domain's <source> element, where the previous virDomainStorageSourceFormat fit the bill nicely. But rather than reverting the commits, it's easier to just add an additional parameter for the element name to use, and update all callers. Signed-off-by: NEric Blake <eblake@redhat.com>
-
- 17 4月, 2019 3 次提交
-
-
由 Cole Robinson 提交于
This requires drivers to opt in to handle the raw modelstr network model, all others will error if a passed in XML value is not in the model enum. Enable this feature for libxl/xen/xm and qemu drivers Acked-by: NMichal Privoznik <mprivozn@redhat.com> Signed-off-by: NCole Robinson <crobinso@redhat.com>
-
由 Cole Robinson 提交于
This converts the qemu driver to the net model enum, for all the model values that we have hardcoded for various checks, which adds e1000e, virtio-transitional, virtio-non-transitional, usb-net, spapr-vlan, lan9118, smc91c111 Because the qemu driver has historically also allowed the raw model string onto the qemu command line, this isn't a full conversion. Unwinding that will require more thought. However for all new driver code we should be adding explicit enum values for any model name we have special handling for. Remove the now unused virDomainNetStreqModelString Acked-by: NMichal Privoznik <mprivozn@redhat.com> Signed-off-by: NCole Robinson <crobinso@redhat.com>
-
由 Cole Robinson 提交于
To ease converting the net->model value to an enum, add the wrapper functions: virDomainNetGetModelString virDomainNetSetModelString virDomainNetStreqModelString virDomainNetStrcaseeqModelString Acked-by: NMichal Privoznik <mprivozn@redhat.com> Signed-off-by: NCole Robinson <crobinso@redhat.com>
-
- 15 4月, 2019 2 次提交
-
-
由 Daniel Henrique Barboza 提交于
The NVIDIA V100 GPU has an onboard RAM that is mapped into the host memory and accessible as normal RAM via an NVLink2 bridge. When passed through in a guest, QEMU puts the NVIDIA RAM window in a non-contiguous area, above the PCI MMIO area that starts at 32TiB. This means that the NVIDIA RAM window starts at 64TiB and go all the way to 128TiB. This means that the guest might request a 64-bit window, for each PCI Host Bridge, that goes all the way to 128TiB. However, the NVIDIA RAM window isn't counted as regular RAM, thus this window is considered only for the allocation of the Translation and Control Entry (TCE). For more information about how NVLink2 support works in QEMU, refer to the accepted implementation [1]. This memory layout differs from the existing VFIO case, requiring its own formula. This patch changes the PPC64 code of @qemuDomainGetMemLockLimitBytes to: - detect if we have a NVLink2 bridge being passed through to the guest. This is done by using the @ppc64VFIODeviceIsNV2Bridge function added in the previous patch. The existence of the NVLink2 bridge in the guest means that we are dealing with the NVLink2 memory layout; - if an IBM NVLink2 bridge exists, passthroughLimit is calculated in a different way to account for the extra memory the TCE table can alloc. The 64TiB..128TiB window is more than enough to fit all possible GPUs, thus the memLimit is the same regardless of passing through 1 or multiple V100 GPUs. Further reading explaining the background [1] https://lists.gnu.org/archive/html/qemu-devel/2019-03/msg03700.html [2] https://www.redhat.com/archives/libvir-list/2019-March/msg00660.html [3] https://www.redhat.com/archives/libvir-list/2019-April/msg00527.htmlSigned-off-by: NDaniel Henrique Barboza <danielhb413@gmail.com> Reviewed-by: NErik Skultety <eskultet@redhat.com>
-
由 Daniel Henrique Barboza 提交于
The NVLink2 support in QEMU implements the detection of NVLink2 capable devices by verifying the attributes of the VFIO mem region QEMU allocates for the NVIDIA GPUs. To properly allocate an adequate amount of memLock, Libvirt needs this information before a QEMU instance is even created, thus querying QEMU is not possible and opening a VFIO window is too much. An alternative is presented in this patch. Making the following assumptions: - if we want GPU RAM to be available in the guest, an NVLink2 bridge must be passed through; - an unknown PCI device can be classified as a NVLink2 bridge if its device tree node has 'ibm,gpu', 'ibm,nvlink', 'ibm,nvlink-speed' and 'memory-region'. This patch introduces a helper called @ppc64VFIODeviceIsNV2Bridge that checks the device tree node of a given PCI device and check if it meets the criteria to be a NVLink2 bridge. This new function will be used in a follow-up patch that, using the first assumption, will set up the rlimits of the guest accordingly. Signed-off-by: NDaniel Henrique Barboza <danielhb413@gmail.com>
-
- 12 4月, 2019 1 次提交
-
-
由 Cole Robinson 提交于
Standardize on putting the _LAST enum value on the second line of VIR_ENUM_IMPL invocations. Later patches that add string labels to VIR_ENUM_IMPL will push most of these to the second line anyways, so this saves some noise. Signed-off-by: NCole Robinson <crobinso@redhat.com>
-
- 10 4月, 2019 2 次提交
-
-
由 Peter Krempa 提交于
This reverts commit a5e16020. Getting rid of unistd.h from our headers will require more work than just fixing the broken mingw build. Revert it until I have a more complete proposal. Signed-off-by: NPeter Krempa <pkrempa@redhat.com>
-
由 Peter Krempa 提交于
util/virutil.h bogously included unistd.h. Drop it and replace it by including it directly where needed. Signed-off-by: NPeter Krempa <pkrempa@redhat.com> Reviewed-by: NJán Tomko <jtomko@redhat.com>
-
- 04 4月, 2019 1 次提交
-
-
由 Nikolay Shirokovskiy 提交于
Map is based on existing cases in code where we send suspended event after changing domain state to paused. Reviewed-by: NJohn Ferlan <jferlan@redhat.com> Signed-off-by: NNikolay Shirokovskiy <nshirokovskiy@virtuozzo.com>
-
- 03 4月, 2019 11 次提交
-
-
由 Peter Krempa 提交于
It always returns true. Signed-off-by: NPeter Krempa <pkrempa@redhat.com> Reviewed-by: NJán Tomko <jtomko@redhat.com>
-
由 Peter Krempa 提交于
This was detected by the presence of 'block-stream' which is present in qemu since v1.1 (db58f9c0605fa151b8c4) Signed-off-by: NPeter Krempa <pkrempa@redhat.com> Reviewed-by: NJán Tomko <jtomko@redhat.com>
-
由 Peter Krempa 提交于
Drop the local call in favor of passing in xmlopt. Signed-off-by: NPeter Krempa <pkrempa@redhat.com> Reviewed-by: NJán Tomko <jtomko@redhat.com>
-
由 Peter Krempa 提交于
Signed-off-by: NPeter Krempa <pkrempa@redhat.com> Reviewed-by: NJán Tomko <jtomko@redhat.com>
-
由 Peter Krempa 提交于
Signed-off-by: NPeter Krempa <pkrempa@redhat.com> Reviewed-by: NJán Tomko <jtomko@redhat.com>
-
由 Peter Krempa 提交于
Signed-off-by: NPeter Krempa <pkrempa@redhat.com> Reviewed-by: NJán Tomko <jtomko@redhat.com>
-
由 Peter Krempa 提交于
When adding <migrationSource> I've used a slightly unusual approach. To allow using the disk source XML parser and formatter convert <migrationSource> to look like <disk>. This means that <source> will be added as a subelement of <migrationSource> rather than being formatted inline. Conversion from the old format in the parser is very simple as it involves only moving the XPath context current node slightly if the new format is found. The status XML to XML test shows that the upgrade is done correctly. Signed-off-by: NPeter Krempa <pkrempa@redhat.com> Reviewed-by: NJán Tomko <jtomko@redhat.com>
-
由 Peter Krempa 提交于
All callers including transitive callers through virDomainDiskSourceFormatInternal always pass true. Remove the argument. Signed-off-by: NPeter Krempa <pkrempa@redhat.com> Reviewed-by: NJán Tomko <jtomko@redhat.com>
-
由 Peter Krempa 提交于
Using copy_on_read for removable disks is a hassle. It also does not work for CDROMs at all as the image is supposed to be read-only and we might ignore it for floppies when they are started as empty. Forbid it for floppies completely rather than trying to support what probably nobody is using. Signed-off-by: NPeter Krempa <pkrempa@redhat.com> Reviewed-by: NJán Tomko <jtomko@redhat.com>
-
由 Peter Krempa 提交于
Signed-off-by: NPeter Krempa <pkrempa@redhat.com> Reviewed-by: NJán Tomko <jtomko@redhat.com>
-
由 Ján Tomko 提交于
Convert the other string comparisons to use the macro. Signed-off-by: NJán Tomko <jtomko@redhat.com> Reviewed-by: NLaine Stump <laine@laine.org>
-
- 29 3月, 2019 2 次提交
-
-
由 Ján Tomko 提交于
Check that the attribute is the same in qemuDomainDiskChangeSupported in case somebody tries to change it using the UpdateDevice API. https://bugzilla.redhat.com/show_bug.cgi?id=1601677Signed-off-by: NJán Tomko <jtomko@redhat.com> Reviewed-by: NLaine Stump <laine@laine.org>
-
由 Ján Tomko 提交于
A macro for comparing string fields of the disk. https://bugzilla.redhat.com/show_bug.cgi?id=1601677Signed-off-by: NJán Tomko <jtomko@redhat.com> Reviewed-by: NLaine Stump <laine@laine.org>
-