- 12 6月, 2018 1 次提交
-
-
由 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 3 次提交
-
-
由 Martin Kletzander 提交于
It will be used in that file later on, plus it makes sense for all the implementations to be in same place. Also comment each one of them nicely and add a comment explaining why they all need to end with the same _LAST value. Signed-off-by: NMartin Kletzander <mkletzan@redhat.com> Reviewed-by: NJán Tomko <jtomko@redhat.com>
-
由 Martin Kletzander 提交于
There is no need to have virResctrlGetInfo() when it must be called after virResctrlInfoNew() anyway, otherwise it's just an unusable object. When we wrap the logic inside the New() function we'll save some calls later as well. Signed-off-by: NMartin Kletzander <mkletzan@redhat.com> Reviewed-by: NJán Tomko <jtomko@redhat.com>
-
由 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 5 次提交
-
-
由 Stefan Berger 提交于
Signed-off-by: NStefan Berger <stefanb@linux.vnet.ibm.com> Reviewed-by: NJán Tomko <jtomko@redhat.com>
-
由 Stefan Berger 提交于
Fix the resrc field for the TPM passthrough case to show tpm. This fixes the code to follow the documentation. Signed-off-by: NStefan Berger <stefanb@linux.vnet.ibm.com> Reviewed-by: NJán Tomko <jtomko@redhat.com>
-
由 Stefan Berger 提交于
Extend the existing auditing with auditing for the TPM emulator. 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 5 次提交
-
-
由 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>
-
由 Filip Alac 提交于
Signed-off-by: NFilip Alac <filipalac@gmail.com> Signed-off-by: NMichal Privoznik <mprivozn@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 3 次提交
-
-
由 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>
-
由 Erik Skultety 提交于
There was a missing enum for mdev causing a strange 'unknown device type' warning when hot-plugging mdev. Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1583927Signed-off-by: NErik Skultety <eskultet@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 10 次提交
-
-
由 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>
-
由 John Ferlan 提交于
Remove the locks since they are unnecessary and would cause a hang for a driver reload/restart when a transient pool was previously active as a result of the call: virStoragePoolUpdateInactive: ... if (!virStoragePoolObjGetConfigFile(obj)) { virStoragePoolObjRemove(driver->pools, obj); ... stack trace: Thread 17 (Thread 0x7fffcc574700 (LWP 12465)): ...pthread_rwlock_wrlock ...virRWLockWrite ...virObjectRWLockWrite ...virStoragePoolObjRemove ...virStoragePoolUpdateInactive ...storagePoolUpdateStateCallback ...virStoragePoolObjListForEachCb ...virHashForEach ...virStoragePoolObjListForEach ...storagePoolUpdateAllState ...storageStateInitialize ...virStateInitialize ...daemonRunStateInit ...virThreadHelper ...start_thread ...clone Introduced by commit id 4b2e0ed6. Signed-off-by: NJohn Ferlan <jferlan@redhat.com> ACKed-by: NMichal Privoznik <mprivozn@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>
-
由 Ján Tomko 提交于
Further patches will introduce validation and a default setting of def->os.bootDevs in postParse. Introduce a feature flag to opt out of this and set it in the vmx driver, otherwise we would be adding it <boot dev='hd'/> into every vmx config despite having no way to change it. Signed-off-by: NJán Tomko <jtomko@redhat.com>
-
- 25 5月, 2018 2 次提交
-
-
由 John Ferlan 提交于
Report domaincaps <features><genid supported='yes'/> if the guest config accepts <genid/> or <genid>$GUID</genid>. Signed-off-by: NJohn Ferlan <jferlan@redhat.com> ACKed-by: NMichal Privoznik <mprivozn@redhat.com>
-
由 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>
-