- 26 7月, 2018 5 次提交
-
-
由 Cole Robinson 提交于
We should still make an effort to fill in data, just not raise an error if say an ostype/virttype combo disappeared from caps. Acked-by: NMichal Privoznik <mprivozn@redhat.com> Signed-off-by: NCole Robinson <crobinso@redhat.com>
-
由 Cole Robinson 提交于
The comment says: /* If the logic here seems fairly arbitrary, that's because it is :) * This is duplicating how the code worked before * CapabilitiesDomainDataLookup was added. We can simplify this, * but it would take a bit of work because the test suite fails * in numerous minor ways. */ Nowadays the test suite changes appear quite simple, just extending test capabilities data a bit so that we aren't trying to define invalid arch/os/virtType/machine combos Acked-by: NMichal Privoznik <mprivozn@redhat.com> Signed-off-by: NCole Robinson <crobinso@redhat.com>
-
由 Cole Robinson 提交于
- Convert to 'cleanup' label naming - Use more than one 'tmp' string and do all freeing at the end - Make the code easier to follow Acked-by: NMichal Privoznik <mprivozn@redhat.com> Signed-off-by: NCole Robinson <crobinso@redhat.com>
-
由 Cole Robinson 提交于
Handles parse virtType, os.type, bootloader bits, arch, machine, emulator Acked-by: NMichal Privoznik <mprivozn@redhat.com> Signed-off-by: NCole Robinson <crobinso@redhat.com>
-
由 Han Han 提交于
https://bugzilla.redhat.com/show_bug.cgi?id=1607825 Introduced by commit d48813e8. Signed-off-by: NHan Han <hhan@redhat.com> Reviewed-by: NErik Skultety <eskultet@redhat.com>
-
- 25 7月, 2018 1 次提交
-
-
由 Shi Lei 提交于
With 'switch' we can utilize the compile time enum checks which we can't rely on with plain 'if' conditions. Signed-off-by: NShi Lei <shilei.massclouds@gmx.com> Reviewed-by: NErik Skultety <eskultet@redhat.com>
-
- 19 7月, 2018 5 次提交
-
-
由 Erik Skultety 提交于
Historically, we've always enabled an emulated video device every time we see that graphics should be supported with a guest. With the appearance of mediated devices which can support QEMU's vfio-display capability, users might want to use such a device as the only video device. Therefore introduce a new, effectively a 'disable', type for video device. Reviewed-by: NJán Tomko <jtomko@redhat.com> Signed-off-by: NErik Skultety <eskultet@redhat.com>
-
由 Erik Skultety 提交于
QEMU 2.12 introduced a new type of display for mediated devices using vfio-pci backend which allows a mediated device to be used as a VGA compatible device as an alternative to an emulated video device. QEMU exposes this feature via a vfio device property 'display' with supported values 'on/off/auto' (libvirt will default to 'off'). This patch adds the necessary bits to domain config handling in order to expose this feature. Since there's no convenient way for libvirt to come up with usable defaults for the display setting, simply because libvirt is not able to figure out which of the display implementations - dma-buf which requires OpenGL support vs vfio regions which doesn't need OpenGL (works with OpenGL enabled too) - the underlying mdev uses. Reviewed-by: NJán Tomko <jtomko@redhat.com> Signed-off-by: NErik Skultety <eskultet@redhat.com>
-
由 Erik Skultety 提交于
The exit path is the same for both success and failure, so the label should be called cleanup. Signed-off-by: NErik Skultety <eskultet@redhat.com> Reviewed-by: NJán Tomko <jtomko@redhat.com>
-
由 Erik Skultety 提交于
A simple helper which will loop through all the graphics elements and checks whether at least one of them enables OpenGL support, either by containing <gl enable='yes'/> or being of type 'egl-headless'. Signed-off-by: NErik Skultety <eskultet@redhat.com> Acked-by: NMichal Privoznik <mprivozn@redhat.com> Reviewed-by: NJán Tomko <jtomko@redhat.com>
-
由 Erik Skultety 提交于
Since 2.10 QEMU supports a new display type egl-headless which uses the drm nodes for OpenGL rendering copying back the rendered bits back to QEMU into a dma-buf which can be accessed by standard "display" apps like VNC or SPICE. Although this display type can be used on its own, for any practical use case it makes sense to pair it with either VNC or SPICE display. The clear benefit of this display is that VNC gains OpenGL support, which it natively doesn't have, and SPICE gains remote OpenGL support (native OpenGL support only works locally through a UNIX socket, i.e. listen type=socket/none). Reviewed-by: NJán Tomko <jtomko@redhat.com> Signed-off-by: NErik Skultety <eskultet@redhat.com>
-
- 10 7月, 2018 3 次提交
-
-
由 Michal Privoznik 提交于
If there are managed reservations for a disk source, the path to the pr-helper socket is generated automatically by libvirt when needed and points somewhere under priv->libDir. Therefore it is very unlikely that the path will work even on migration destination (the libDir is derived from domain short name and its ID). Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
-
由 Erik Skultety 提交于
Move the video post parse bits into a separate helper as the logic is going to be extended in the future. Signed-off-by: NErik Skultety <eskultet@redhat.com> Reviewed-by: NJohn Ferlan <jferlan@redhat.com>
-
由 Erik Skultety 提交于
Future patches rely on the ability to reset the contents of the virDomainVideoDef structure rather than re-allocating it. Signed-off-by: NErik Skultety <eskultet@redhat.com> Reviewed-by: NJohn Ferlan <jferlan@redhat.com>
-
- 09 7月, 2018 2 次提交
-
-
由 Erik Skultety 提交于
Signed-off-by: NErik Skultety <eskultet@redhat.com> Reviewed-by: NJohn Ferlan <jferlan@redhat.com>
-
由 Erik Skultety 提交于
It's pointless to check the same thing multiple times. Fix the indentation along the way too. Signed-off-by: NErik Skultety <eskultet@redhat.com> Reviewed-by: NJohn Ferlan <jferlan@redhat.com>
-
- 03 7月, 2018 1 次提交
-
-
由 Andrea Bolognani 提交于
Signed-off-by: NAndrea Bolognani <abologna@redhat.com> Reviewed-by: NJohn Ferlan <jferlan@redhat.com>
-
- 27 6月, 2018 2 次提交
-
-
由 Michal Privoznik 提交于
https://bugzilla.redhat.com/show_bug.cgi?id=1585108 When updating a live device users might pass different alias than the one the device has. Currently, this is silently ignored which goes against our behaviour for other parts of the device where we explicitly allow only certain changes and error out loudly on anything else. Signed-off-by: NMichal Privoznik <mprivozn@redhat.com> Reviewed-by: NJohn Ferlan <jferlan@redhat.com>
-
由 Michal Privoznik 提交于
This was lost in c57f3fd2. But now we are going to need it again (except the DETACH action where checking for device compatibility does not make much sense anyway). Signed-off-by: NMichal Privoznik <mprivozn@redhat.com> Reviewed-by: NJohn Ferlan <jferlan@redhat.com>
-
- 26 6月, 2018 3 次提交
-
-
由 Andrea Bolognani 提交于
Signed-off-by: NAndrea Bolognani <abologna@redhat.com>
-
由 Andrea Bolognani 提交于
This doesn't seem very useful at the moment, but it will make sense once we introduce another HPT-related setting. The output XML is decoupled from the input XML in preparation of future changes as well; while doing so, we can shave a few lines off the latter. This commit is best viewed with 'git show -w'. Signed-off-by: NAndrea Bolognani <abologna@redhat.com>
-
由 Andrea Bolognani 提交于
We're going to introduce a second HPT-related setting soon, at which point using a single location to store everything is no longer going to cut it. This mostly, but not completely, reverts 3dd1eb3b. Signed-off-by: NAndrea Bolognani <abologna@redhat.com>
-
- 21 6月, 2018 1 次提交
-
-
由 Cole Robinson 提交于
The last usages were removed with the xend driver in 1dac5fbbReviewed-by: NErik Skultety <eskultet@redhat.com> Signed-off-by: NCole Robinson <crobinso@redhat.com>
-
- 14 6月, 2018 1 次提交
-
-
由 Ján Tomko 提交于
Some identifiers use Sev, some SEV. Prefer the latter. Signed-off-by: NJán Tomko <jtomko@redhat.com> Reviewed-by: NBrijesh Singh <brijesh.singh@amd.com> Tested-by: NBrijesh Singh <brijesh.singh@amd.com> Reviewed-by: NDaniel P. Berrangé <berrange@redhat.com>
-
- 13 6月, 2018 2 次提交
-
-
由 Michal Privoznik 提交于
Firstly, this function changes node for relative XPaths but doesn't restore the original one in case VIR_ALLOC(def) fails. Secondly, @type is leaked. Thirdly, dh-cert and session attributes are strdup()-ed needlessly, virXPathString already does that so we can use the retval immediately. Signed-off-by: NMichal Privoznik <mprivozn@redhat.com> Reviewed-by: NJán Tomko <jtomko@redhat.com>
-
由 Ján Tomko 提交于
Adjust the documentation, parser and tests to change: launch-security -> launchSecurity reduced-phys-bits -> reducedPhysBits dh-cert -> dhCert Also fix the headline in formatdomain.html to be more generic, and some leftover closing elements in the documentation. Signed-off-by: NJán Tomko <jtomko@redhat.com> Reviewed-by: NBrijesh Singh <brijesh.singh@amd.com> Tested-by: NBrijesh Singh <brijesh.singh@amd.com> Reviewed-by: NDaniel P. Berrangé <berrange@redhat.com>
-
- 12 6月, 2018 5 次提交
-
-
由 Peter Krempa 提交于
Move the code to a separate function. Signed-off-by: NPeter Krempa <pkrempa@redhat.com> Reviewed-by: NJán Tomko <jtomko@redhat.com>
-
由 Peter Krempa 提交于
Formatting of 'driver' already used a separate buffer but was part of the main function. Separate it and remove bunch of unnecessary temporary variables. Note that some checks are removed but they are not really necessary anyways. Signed-off-by: NPeter Krempa <pkrempa@redhat.com> Reviewed-by: NJán Tomko <jtomko@redhat.com>
-
由 Peter Krempa 提交于
Extract and refactor the code to use the new approach which allows to delete a monster condition to check if the element needs to be formatted. Signed-off-by: NPeter Krempa <pkrempa@redhat.com> Reviewed-by: NJán Tomko <jtomko@redhat.com>
-
由 Brijesh Singh 提交于
The launch-security element can be used to define the security model to use when launching a domain. Currently we support 'sev'. When 'sev' is used, the VM will be launched with AMD SEV feature enabled. SEV feature supports running encrypted VM under the control of KVM. Encrypted VMs have their pages (code and data) secured such that only the guest itself has access to the unencrypted version. Each encrypted VM is associated with a unique encryption key; if its data is accessed to a different entity using a different key the encrypted guests data will be incorrectly decrypted, leading to unintelligible data. Signed-off-by: NBrijesh Singh <brijesh.singh@amd.com> Reviewed-by: NErik Skultety <eskultet@redhat.com>
-
由 John Ferlan 提交于
Commit id 1bd5a08d added a call to virXMLFormatElement without also checking the return status. Found by Coverity. Signed-off-by: NJohn Ferlan <jferlan@redhat.com> Reviewed-by: NKaterina Koukiou <kkoukiou@redhat.com>
-
- 08 6月, 2018 1 次提交
-
-
由 Martin Kletzander 提交于
TSEG (Top of Memory Segment) is one of many regions that SMM (System Management Mode) can occupy. This one, however is special, because a) most of the SMM code lives in TSEG nowadays and b) QEMU just (well, some time ago) added support for so called 'extended' TSEG. The difference to the TSEG implemented in real q35's MCH (Memory Controller Hub) is that it can offer one extra size to the guest OS apart from the standard TSEG's 1, 2, and 8 MiB and that size can be selected in 1 MiB increments. Maximum may vary based on QEMU and is way too big, so we don't need to check for the maximum here. Similarly to the memory size we'll leave it to the hypervisor to try satisfying that and giving us an error message in case it is not possible. Signed-off-by: NMartin Kletzander <mkletzan@redhat.com> Acked-by: NLaszlo Ersek <lersek@redhat.com> Reviewed-by: NJán Tomko <jtomko@redhat.com>
-
- 07 6月, 2018 1 次提交
-
-
由 Daniel P. Berrangé 提交于
When using an enum in a struct field, the compiler is free to decide to make it an unsigned type if it desires. This in turn leads to bugs when code does if ((def->foo = virDomainFooTypeFromString(str)) < 0) ... because 'def->foo' can't technically have an unsigned value from the compiler's POV. While it is possible to add (int) casts in the code example above, this is not desirable because it is easy to miss out such casts. eg the code fixed here caused an error with clang builds ../../src/conf/domain_conf.c:12838:73: error: comparison of unsigned enum expression < 0 is always false [-Werror,-Wtautological-compare] if ((def->version = virDomainTPMVersionTypeFromString(version)) < 0) { ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ^ ~ Signed-off-by: NDaniel P. Berrangé <berrange@redhat.com>
-
- 06 6月, 2018 3 次提交
-
-
由 Stefan Berger 提交于
Signed-off-by: NStefan Berger <stefanb@linux.vnet.ibm.com> Reviewed-by: NJán Tomko <jtomko@redhat.com>
-
由 Stefan Berger 提交于
This patch extends the TPM's device XML with TPM 2.0 support. This only works for the emulator type backend and looks as follows: <tpm model='tpm-tis'> <backend type='emulator' version='2.0'/> </tpm> The swtpm process now has --tpm2 as an additional parameter: system_u:system_r:svirt_t:s0:c597,c632 tss 18477 11.8 0.0 28364 3868 ? Rs 11:13 13:50 /usr/bin/swtpm socket --daemon --ctrl type=unixio,path=/var/run/libvirt/qemu/swtpm/testvm-swtpm.sock,mode=0660 --tpmstate dir=/var/lib/libvirt/swtpm/testvm/tpm2,mode=0640 --log file=/var/log/swtpm/libvirt/qemu/testvm-swtpm.log --tpm2 --pid file=/var/run/libvirt/qemu/swtpm/testvm-swtpm.pid The version of the TPM can be changed and the state of the TPM is preserved. Signed-off-by: NStefan Berger <stefanb@linux.vnet.ibm.com> Reviewed-by: NJohn Ferlan <jferlan@redhat.com> Reviewed-by: NJán Tomko <jtomko@redhat.com>
-
由 Stefan Berger 提交于
This patch adds support for an external swtpm TPM emulator. The XML for this type of TPM looks as follows: <tpm model='tpm-tis'> <backend type='emulator'/> </tpm> The XML will currently only define a TPM 1.2. Extend the documentation. Add a test case testing the XML parser and formatter. Signed-off-by: NStefan Berger <stefanb@linux.vnet.ibm.com> Reviewed-by: NJohn Ferlan <jferlan@redhat.com> Reviewed-by: NJán Tomko <jtomko@redhat.com>
-
- 05 6月, 2018 4 次提交
-
-
由 Michal Privoznik 提交于
When parsing domain XML the virCapsDomainData lookup is performed in order to fill in missing def->os.arch and def->os.machine strings. Well, when doing copy of already existing virDomainDef we don't want any automagic fill in of defaults (and those two strings are going to be provided at this point anyway by first parse of the domain XML). What is even worse is that we do not look up capabilities for parsed emulator path rather some generic capabilities for parsed arch. Therefore, if emulator points to qemu under non-default path (say $HOME/qemu-system-arm) but there's no such qemu under the default path (say /usr/bin/qemu-system-arm) the capabilities lookup fails and creating the copy is denied. Signed-off-by: NMichal Privoznik <mprivozn@redhat.com> Reviewed-by: NJán Tomko <jtomko@redhat.com>
-
由 Peter Krempa 提交于
With blockdev support we will need to introspect whether any of the backing chain members requires PR rather just one of them. Add a helper and reuse it in virDomainDefHasManagedPR. Signed-off-by: NPeter Krempa <pkrempa@redhat.com> Reviewed-by: NJán Tomko <jtomko@redhat.com>
-
由 Peter Krempa 提交于
Always parse the 'tls' source field and let the drivers decide whether they support it. Signed-off-by: NPeter Krempa <pkrempa@redhat.com> Reviewed-by: NJán Tomko <jtomko@redhat.com>
-
由 Ján Tomko 提交于
Introduce a function for comparing two vsock definitions. https://bugzilla.redhat.com/show_bug.cgi?id=1291851Signed-off-by: NJán Tomko <jtomko@redhat.com> Reviewed-by: NJohn Ferlan <jferlan@redhat.com>
-