- 12 6月, 2018 3 次提交
-
-
由 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>
-
- 01 6月, 2018 1 次提交
-
-
由 Ján Tomko 提交于
To avoid the <source> vs. <target> confusion, change <source auto='no' cid='3'/> to: <cid auto='no' address='3'/> Signed-off-by: NJán Tomko <jtomko@redhat.com> Suggested-by: NDaniel P. Berrangé <berrange@redhat.com> Acked-by: NPeter Krempa <pkrempa@redhat.com> Reviewed-by: NDaniel P. Berrangé <berrange@redhat.com>
-
- 31 5月, 2018 2 次提交
-
-
由 Xiao Feng Ren 提交于
This patch fixes the USB input bus check, the bug was introduced by commit 317badb2Signed-off-by: NXiao Feng Ren <renxiaof@linux.vnet.ibm.com> Reviewed-by: NJán Tomko <jtomko@redhat.com> Signed-off-by: NJán Tomko <jtomko@redhat.com>
-
由 Michal Privoznik 提交于
We need to free return value of virXPathString(). ==12962== 37 bytes in 1 blocks are definitely lost in loss record 156 of 331 ==12962== at 0x4C2AF0F: malloc (vg_replace_malloc.c:299) ==12962== by 0x91E8439: strdup (in /lib64/libc-2.25.so) ==12962== by 0x5DBD551: virStrdup (virstring.c:977) ==12962== by 0x5DD3E5E: virXPathString (virxml.c:84) ==12962== by 0x5E178AB: virDomainDefParseXML (domain_conf.c:19110) ==12962== by 0x5E1E985: virDomainDefParseNode (domain_conf.c:20885) ==12962== by 0x5E1E7CB: virDomainDefParse (domain_conf.c:20827) ==12962== by 0x5E1E871: virDomainDefParseFile (domain_conf.c:20853) Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
-
- 30 5月, 2018 1 次提交
-
- 29 5月, 2018 8 次提交
-
-
由 Ján Tomko 提交于
Add a new 'vsock' element for the vsock device. The 'model' attribute is optional. A <source cid> subelement should be used to specify the guest cid, or <source auto='yes'/> should be used. https://bugzilla.redhat.com/show_bug.cgi?id=1291851Signed-off-by: NJán Tomko <jtomko@redhat.com>
-
由 Ján Tomko 提交于
An object for storing driver-specific data in the vsock definition. https://bugzilla.redhat.com/show_bug.cgi?id=1291851Signed-off-by: NJán Tomko <jtomko@redhat.com>
-
由 Ján Tomko 提交于
A type to represent the new vsock device. Also implement an allocation function to allow future addition of private data. https://bugzilla.redhat.com/show_bug.cgi?id=1291851Signed-off-by: NJán Tomko <jtomko@redhat.com>
-
由 Peter Krempa 提交于
The status XML parser function virDomainObjParseXML could not pass in parseOpaque into the post parse callbacks. Add a callback which will allow hypervisor drivers to fill it from the 'virDomainObj' data. Signed-off-by: NPeter Krempa <pkrempa@redhat.com>
-
由 Peter Krempa 提交于
When parsing status XML the post-parse callbacks can't access any private data present in the status XML as the private bits were parsed after invoking post-parse callbacks. Move the invocation so that everything is parsed first. Signed-off-by: NPeter Krempa <pkrempa@redhat.com>
-
由 Ján Tomko 提交于
Its only use is now to check for duplicate boot order values, which is now also done in virDomainDefPostParseCommon. Remove it completely. Signed-off-by: NJán Tomko <jtomko@redhat.com>
-
由 Peter Krempa 提交于
As the function signature of virDomainDefPostParseInternal does not differ from virDomainDefPostParse now, the wrapper can be dropped. Signed-off-by: NPeter Krempa <pkrempa@redhat.com> Signed-off-by: NJán Tomko <jtomko@redhat.com>
-
由 Ján Tomko 提交于
Move the check for boot elements into a separate function and remove its dependency on the parser-supplied bootHash table. Reconstructing the hash table from the domain definition effectively duplicates the check for duplicate boot order values, also present in virDomainDeviceBootParseXML. Now it will also be run on domains created by other means than XML parsing, since it will be run even for code paths that did not supply the bootHash table before. Signed-off-by: NJán Tomko <jtomko@redhat.com>
-
- 25 5月, 2018 1 次提交
-
-
由 John Ferlan 提交于
The VM Generation ID is a mechanism to provide a unique 128-bit, cryptographically random, and integer value identifier known as the GUID (Globally Unique Identifier) to the guest OS. The value is used to help notify the guest operating system when the virtual machine is executed with a different configuration. This patch adds support for a new "genid" XML element similar to the "uuid" element. The "genid" element can have two forms "<genid/>" or "<genid>$GUID</genid>". If the $GUID is not provided, libvirt will generate one and save it in the XML. Since adding support for a generated GUID (or UUID like) value to be displayed modifying the xml2xml test to include virrandommock.so is necessary since it will generate a "known" value. Signed-off-by: NJohn Ferlan <jferlan@redhat.com> ACKed-by: NMichal Privoznik <mprivozn@redhat.com>
-
- 23 5月, 2018 2 次提交
-
-
由 Peter Krempa 提交于
It will be used when parsing the migration private data. Signed-off-by: NPeter Krempa <pkrempa@redhat.com> Reviewed-by: NJohn Ferlan <jferlan@redhat.com>
-
由 Filip Alac 提交于
Introduce support for codec type 'output' ('hda-output' in QEMU) for ich6 and ich9 sound devices, which only advertises a line-out in the guest. This has been available in QEMU since 0.14. Signed-off-by: NFilip Alac <filipalac@gmail.com> Reviewed-by: NErik Skultety <eskultet@redhat.com>
-
- 16 5月, 2018 3 次提交
-
-
由 Michal Privoznik 提交于
==1589== 7 bytes in 2 blocks are definitely lost in loss record 34 of 261 ==1589== at 0x4C2AF0F: malloc (vg_replace_malloc.c:299) ==1589== by 0x8A82794: xmlStrndup (in /usr/lib64/libxml2.so.2.9.8) ==1589== by 0x5DD8392: virXMLPropString (virxml.c:510) ==1589== by 0x5E12427: virDomainMemoryDefParseXML (domain_conf.c:15704) ==1589== by 0x5E207DE: virDomainDefParseXML (domain_conf.c:20351) ==1589== by 0x5E2184F: virDomainDefParseNode (domain_conf.c:20636) ==1589== by 0x5E216A1: virDomainDefParse (domain_conf.c:20580) ==1589== by 0x5E21747: virDomainDefParseFile (domain_conf.c:20606) ==1589== by 0x112F5F: testCompareXMLToArgv (qemuxml2argvtest.c:493) ==1589== by 0x138780: virTestRun (testutils.c:180) ==1589== by 0x117129: mymain (qemuxml2argvtest.c:937) ==1589== by 0x13A83C: virTestMain (testutils.c:1120) Signed-off-by: NMichal Privoznik <mprivozn@redhat.com> Reviewed-by: NMarc Hartmayer <mhartmay@linux.ibm.com>
-
由 Peter Krempa 提交于
Extract the lookup code so that it can be reused later. Signed-off-by: NPeter Krempa <pkrempa@redhat.com>
-
由 Maciej Wolny 提交于
Support OpenGL accelerated rendering when using SDL graphics in the domain config. Add associated test and documentation. Signed-off-by: NMaciej Wolny <maciej.wolny@codethink.co.uk> Reviewed-by: NJohn Ferlan <jferlan@redhat.com>
-
- 15 5月, 2018 1 次提交
-
-
Introduces the vfio-ccw model for mediated devices and prime vfio-ccw devices such that CCW address will be generated. Alters the qemuxml2xmltest for testing a basic mdev device using vfio-ccw. Signed-off-by: NShalini Chellathurai Saroja <shalini@linux.vnet.ibm.com> Reviewed-by: NBjoern Walk <bwalk@linux.ibm.com> Reviewed-by: NBoris Fiuczynski <fiuczy@linux.ibm.com> Reviewed-by: NMarc Hartmayer <mhartmay@linux.vnet.ibm.com> Reviewed-by: NStefan Zimmermann <stzi@linux.ibm.com> Reviewed-by: NJohn Ferlan <jferlan@redhat.com>
-
- 14 5月, 2018 2 次提交
-
-
由 Michal Privoznik 提交于
QEMU has possibility to call madvise(.., MADV_REMOVE) in some cases. Expose this feature to users by new element/attribute discard. Signed-off-by: NMichal Privoznik <mprivozn@redhat.com> Reviewed-by: NJán Tomko <jtomko@redhat.com>
-
由 Michal Privoznik 提交于
At the same time convert the code to use virXMLFormatElement. Signed-off-by: NMichal Privoznik <mprivozn@redhat.com> Reviewed-by: NJán Tomko <jtomko@redhat.com>
-
- 11 5月, 2018 1 次提交
-
-
由 Michal Privoznik 提交于
This is a definition that holds information on SCSI persistent reservation settings. The XML part looks like this: <reservations enabled='yes' managed='no'> <source type='unix' path='/path/to/qemu-pr-helper.sock' mode='client'/> </reservations> If @managed is set to 'yes' then the <source/> is not parsed. This design was agreed on here: https://www.redhat.com/archives/libvir-list/2017-November/msg01005.htmlSigned-off-by: NMichal Privoznik <mprivozn@redhat.com> Reviewed-by: NJohn Ferlan <jferlan@redhat.com>
-
- 07 5月, 2018 1 次提交
-
-
由 Peter Krempa 提交于
Everything besides the top of the chain is readonly. Track this when parsing the XML and detecting the chain from the disk. Also fix the state when taking snapshots. All other cases where the top image is changed already preserve the readonly state from the original image. Signed-off-by: NPeter Krempa <pkrempa@redhat.com> Reviewed-by: NJohn Ferlan <jferlan@redhat.com>
-
- 04 5月, 2018 4 次提交
-
-
由 Cole Robinson 提交于
This is the old style and we really shouldn't be adding any more examples like this. Add a comment to warn devs away Reviewed-by: NJohn Ferlan <jferlan@redhat.com> Signed-off-by: NCole Robinson <crobinso@redhat.com>
-
由 Cole Robinson 提交于
<features><vmcoreinfo/> is a bare boolean XML property. We don't really use this format anymore and instead prefer tristate <X state=on|off/> since it's required for modeling on/off/default. If for example future qemu started enabling vmcoreinfo by default we wouldn't have any way for the user to turn this off. Convert it to tristate. For writing XML this is semanticly the same, <vmcoreinfo/> is processed as <vmcoreinfo state='on'/>. For apps reading guest XML this is technically an API change, as they might misinterpret <vmcoreinfo state='off'/>, however this has only been present in libvirt since 3.10.0 and I don't think any apps are dependent on this yet Reviewed-by: NJohn Ferlan <jferlan@redhat.com> Signed-off-by: NCole Robinson <crobinso@redhat.com>
-
由 Daniel P. Berrangé 提交于
All the code now just uses the virHashTablePtr type directly. Reviewed-by: NJiri Denemark <jdenemar@redhat.com> Signed-off-by: NDaniel P. Berrangé <berrange@redhat.com>
-
由 Daniel P. Berrangé 提交于
This removes the virNWFilterHashTableFree, virNWFilterHashTablePut and virNWFilterHashTableRemove methods, in favour of just calling the virHash APIs directly. The virNWFilterHashTablePut method was unreasonably complex because the virHashUpdateEntry already knows how to create the entry if it does not currently exist. Reviewed-by: NJiri Denemark <jdenemar@redhat.com> Signed-off-by: NDaniel P. Berrangé <berrange@redhat.com>
-
- 03 5月, 2018 1 次提交
-
-
由 Stefan Berger 提交于
Enable the TPM CRB to be specified in the domain XML. This now allows to describe the TPM device like this: <tpm model='tpm-crb'> <backend type='passthrough'> <device path='/dev/tpm0'/> </backend> </tpm> Extend the XML schema to also allow tpm-crb. Extend the documentation. Add a test case for testing the XML parser and formatter. Signed-off-by: NStefan Berger <stefanb@linux.vnet.ibm.com> Reviewed-by: NJohn Ferlan <jferlan@redhat.com>
-