- 19 9月, 2019 2 次提交
-
-
由 Peter Krempa 提交于
Use VIR_AUTO* helpers to get rid of the convoluted cleanup path. Signed-off-by: NPeter Krempa <pkrempa@redhat.com> Reviewed-by: NJiri Denemark <jdenemar@redhat.com>
-
由 Peter Krempa 提交于
The wrapper reports libvirt errors for the libxml2 function so that the same does not have to be repeated over and over. Signed-off-by: NPeter Krempa <pkrempa@redhat.com> Reviewed-by: NJiri Denemark <jdenemar@redhat.com>
-
- 16 9月, 2019 1 次提交
-
-
由 Laine Stump 提交于
It needs to be used by a function that only has a const pointer to virDomainNetDef. Signed-off-by: NLaine Stump <laine@redhat.com> Reviewed-by: NMichal Privoznik <mprivozn@redhat.com>
-
- 12 9月, 2019 2 次提交
-
-
由 Daniel P. Berrangé 提交于
The virNetworkPortDef config stores the 'managed' attribute as the virTristateBool type. The virDomainDef config stores the 'managed' attribute as the bool type. Reviewed-by: NMichal Privoznik <mprivozn@redhat.com> Signed-off-by: NDaniel P. Berrangé <berrange@redhat.com>
-
由 Daniel P. Berrangé 提交于
If the hypervisor driver has not yet created the network port, the portid field will be "00000000-0000-0000-0000-000000000000". If a failure occurs during early VM startup, the hypervisor driver may none the less try to release the network port, resulting in an undesirable warning: 2019-09-12 13:17:42.349+0000: 16544: error : virNetworkObjLookupPort:1679 : network port not found: Network port with UUID 00000000-0000-0000-0000-000000000000 does not exist By checking if the portid UUID is valid, we can avoid polluting the logs in this way. Reviewed-by: NMichal Privoznik <mprivozn@redhat.com> Signed-off-by: NDaniel P. Berrangé <berrange@redhat.com>
-
- 11 9月, 2019 1 次提交
-
-
由 Maxiwell S. Garcia 提交于
The function virDomainDefFormatInternal() has the predefined root name "domain" to format the XML. But to save both active and inactive domain in the snapshot XML, the new root name "inactiveDomain" was created. So, the new function virDomainDefFormatInternalSetRootName() allows to choose the root name of XML. The former function became a tiny wrapper to call the new function setting the correct parameters. Signed-off-by: NMaxiwell S. Garcia <maxiwell@linux.ibm.com> Reviewed-by: NDaniel Henrique Barboza <danielhb413@gmail.com> Tested-by: NDaniel Henrique Barboza <danielhb413@gmail.com> Reviewed-by: NJiri Denemark <jdenemar@redhat.com>
-
- 10 9月, 2019 4 次提交
-
-
由 Jiri Denemark 提交于
The only caller for which this check makes sense is virDomainDefParse. Thus the check should be moved there. Signed-off-by: NJiri Denemark <jdenemar@redhat.com> Reviewed-by: NMichal Privoznik <mprivozn@redhat.com>
-
由 Jiri Denemark 提交于
Signed-off-by: NJiri Denemark <jdenemar@redhat.com> Reviewed-by: NMichal Privoznik <mprivozn@redhat.com>
-
由 Laine Stump 提交于
Although <interface type='ethernet'> has always been able to use an existing tap device, this is just a coincidence due to the fact that the same ioctl is used to create a new tap device or get a handle to an existing device. Even then, once we have the handle to the device, we still insist on doing extra setup to it (setting the MAC address and IFF_UP). That *might* be okay if libvirtd is running as a privileged process, but if libvirtd is running as an unprivileged user, those attempted modifications to the tap device will fail (yes, even if the tap is set to be owned by the user running libvirtd). We could avoid this if we knew that the device already existed, but as stated above, an existing device and new device are both accessed in the same manner, and anyway, we need to preserve existing behavior for those who are already using pre-existing devices with privileged libvirtd (and allowing/expecting libvirt to configure the pre-existing device). In order to cleanly support the idea of using a pre-existing and pre-configured tap device, this patch introduces a new optional attribute "managed" for the interface <target> element. This attribute is only valid for <interface type='ethernet'> (since all other interface types have mandatory config that doesn't apply in the case where we expect the tap device to be setup before we get it). The syntax would look something like this: <interface type='ethernet'> <target dev='mytap0' managed='no'/> ... </interface> This patch just adds managed to the grammar and parser for <target>, but has no functionality behind it. (NB: when managed='no' (the default when not specified is 'yes'), the target dev is always a name explicitly provided, so we don't auto-remove it from the config just because it starts with "vnet" (VIR_NET_GENERATED_TAP_PREFIX); this makes it possible to use the same pattern of names that libvirt itself uses when it automatically creates the tap devices.) Signed-off-by: NLaine Stump <laine@redhat.com> Reviewed-by: NDaniel P. Berrangé <berrange@redhat.com>
-
由 Laine Stump 提交于
This will simplify addition of another attribute to the <target> element Signed-off-by: NLaine Stump <laine@redhat.com> Reviewed-by: NDaniel P. Berrangé <berrange@redhat.com>
-
- 06 9月, 2019 2 次提交
-
-
由 Marc-André Lureau 提交于
Signed-off-by: NMarc-André Lureau <marcandre.lureau@redhat.com> Signed-off-by: NMichal Privoznik <mprivozn@redhat.com> Reviewed-by: NMichal Privoznik <mprivozn@redhat.com>
-
由 Jonathon Jongsma 提交于
After parsing a video device with a model type of VIR_DOMAIN_VIDEO_TYPE_NONE, all device info is cleared (see virDomainDefPostParseVideo()) in order to avoid formatting any auto-generated values for the XML. Subsequently, however, an alias is generated for the video device (e.g. 'video0'), which results in an alias property being formatted in the XML output anyway. This creates confusion if the user has explicitly provided an alias for the video device since the alias will change. To avoid this, don't clear the user-defined alias for video devices of type "none". https://bugzilla.redhat.com/show_bug.cgi?id=1720612Signed-off-by: NJonathon Jongsma <jjongsma@redhat.com> Reviewed-by: NErik Skultety <eskultet@redhat.com>
-
- 05 9月, 2019 1 次提交
-
-
由 Cole Robinson 提交于
The attribute is named 'secret', not 'uuid' Signed-off-by: NCole Robinson <crobinso@redhat.com>
-
- 21 8月, 2019 6 次提交
-
-
由 Ján Tomko 提交于
Signed-off-by: NJán Tomko <jtomko@redhat.com> Reviewed-by: NJiri Denemark <jdenemar@redhat.com>
-
由 Ján Tomko 提交于
Signed-off-by: NJán Tomko <jtomko@redhat.com> Reviewed-by: NJiri Denemark <jdenemar@redhat.com>
-
由 Ján Tomko 提交于
Now that virDomainXMLNamespace matches virXMLNamespace, we no longer need to keep both around. Signed-off-by: NJán Tomko <jtomko@redhat.com> Reviewed-by: NJiri Denemark <jdenemar@redhat.com>
-
由 Ján Tomko 提交于
In the future we will perform more actions if ns.parse is present. Decouple the condition from the actual call. Signed-off-by: NJán Tomko <jtomko@redhat.com> Reviewed-by: NJiri Denemark <jdenemar@redhat.com>
-
由 Ján Tomko 提交于
We do not need to pass the root node, since it's already included in the XPathContext. Signed-off-by: NJán Tomko <jtomko@redhat.com> Reviewed-by: NJiri Denemark <jdenemar@redhat.com>
-
由 Ján Tomko 提交于
Neither the xmlDocPtr nor the root xmlNode (also passed in the XPathContext) are interesting to the callees. Signed-off-by: NJán Tomko <jtomko@redhat.com> Reviewed-by: NJiri Denemark <jdenemar@redhat.com>
-
- 20 8月, 2019 1 次提交
-
-
由 Wang Huaqiang 提交于
resctrl object stored in def->resctrls is shared by cachetune and memorytune. The domain xml configuration is parsed firstly for cachetune then memorytune, and the resctrl object will not be created in parsing settings for memorytune once it found sharing exists. But resctrl is improperly freed when sharing happens. Signed-off-by: NWang Huaqiang <huaqiang.wang@intel.com> Reviewed-by: NDaniel Henrique Barboza <danielhb413@gmail.com> Reviewed-by: NMichal Privoznik <mprivozn@redhat.com>
-
- 19 8月, 2019 1 次提交
-
-
由 Vitaly Kuznetsov 提交于
Support 'Direct Mode' for Hyper-V Synthetic Timers in domain config. Make it 'stimer' enlightenment option as it is not a separate thing. Reviewed-by: NJán Tomko <jtomko@redhat.com> Signed-off-by: NVitaly Kuznetsov <vkuznets@redhat.com> Signed-off-by: NJán Tomko <jtomko@redhat.com>
-
- 16 8月, 2019 1 次提交
-
-
由 Peter Krempa 提交于
The only code path which calls the parser with the VIR_DOMAIN_DEF_PARSE_DISK_SOURCE is from qemuDomainBlockCopy. Since that code path can properly handle backing chains for the disk and it's desired to pass the parsed chains to the block copy code remove the condition which prevents parsing the <backingStore> element. Signed-off-by: NPeter Krempa <pkrempa@redhat.com> Reviewed-by: NJán Tomko <jtomko@redhat.com>
-
- 12 8月, 2019 1 次提交
-
-
由 Wim ten Have 提交于
QEMU version 2.12.1 introduced a performance feature under commit be7773268d98 ("target-i386: add KVM_HINTS_DEDICATED performance hint") This patch adds a new KVM feature 'hint-dedicated' to set this performance hint for KVM guests. The feature is off by default. To enable this hint and have libvirt add "-cpu host,kvm-hint-dedicated=on" to the QEMU command line, the following XML code needs to be added to the guest's domain description in conjunction with CPU mode='host-passthrough'. <features> <kvm> <hint-dedicated state='on'/> </kvm> </features> ... <cpu mode='host-passthrough ... /> Signed-off-by: NWim ten Have <wim.ten.have@oracle.com> Signed-off-by: NMenno Lageman <menno.lageman@oracle.com> Reviewed-by: NMichal Privoznik <mprivozn@redhat.com>
-
- 09 8月, 2019 4 次提交
-
-
由 Ján Tomko 提交于
Redefining a domain via virDomainDefineXML should not give different results based on an already existing definition. Also, there's a crasher somewhere in the code: https://bugzilla.redhat.com/show_bug.cgi?id=1739338 This reverts commit 94b3aa55Signed-off-by: NJán Tomko <jtomko@redhat.com> Reviewed-by: NJiri Denemark <jdenemar@redhat.com>
-
由 Marc-André Lureau 提交于
Since its introduction in commit 8737578d, the TPM version format is "2.0" and not "2". Signed-off-by: NMarc-André Lureau <marcandre.lureau@redhat.com> Reviewed-by: NMichal Privoznik <mprivozn@redhat.com>
-
由 Jiri Denemark 提交于
Since qemuDomainDeviceDefPostParse callback requires qemuCaps, we need to make sure it gets the capabilities stored in the domain's private data if the domain is running. Passing NULL may cause QEMU capabilities probing to be triggered in case QEMU binary changed in the meantime. When this happens while a running domain object is locked, QMP event delivered to the domain before QEMU capabilities probing finishes will deadlock the event loop. QEMU capabilities lookup (via domainPostParseDataAlloc callback) is hidden inside virDomainDeviceDefPostParseOne with no way to pass qemuCaps to virDomainDeviceDef* functions. This patch fixes all remaining paths leading to virDomainDeviceDefPostParse. Signed-off-by: NJiri Denemark <jdenemar@redhat.com> Reviewed-by: NMichal Privoznik <mprivozn@redhat.com>
-
由 Jiri Denemark 提交于
Since qemuDomainDefPostParse callback requires qemuCaps, we need to make sure it gets the capabilities stored in the domain's private data if the domain is running. Passing NULL may cause QEMU capabilities probing to be triggered in case QEMU binary changed in the meantime. When this happens while a running domain object is locked, QMP event delivered to the domain before QEMU capabilities probing finishes will deadlock the event loop. Several general functions from domain_conf.c were lazily passing NULL as the parseOpaque pointer instead of letting their callers pass the right data. This patch fixes all paths leading to virDomainDefCopy to do the right thing. Signed-off-by: NJiri Denemark <jdenemar@redhat.com> Reviewed-by: NMichal Privoznik <mprivozn@redhat.com>
-
- 06 8月, 2019 10 次提交
-
-
由 Vitaly Kuznetsov 提交于
Current code doesn't allow us to add sub-features as we always print the closing '/>'. As a preparatory change to implementing 'direct' sub-feature for 'stimer' feature switch to printing closing tag individually. No functional change. Signed-off-by: NVitaly Kuznetsov <vkuznets@redhat.com> Reviewed-by: NJán Tomko <jtomko@redhat.com> Signed-off-by: NJán Tomko <jtomko@redhat.com>
-
由 Michal Privoznik 提交于
This piece of code will be re-used later. Signed-off-by: NMichal Privoznik <mprivozn@redhat.com> ACKed-by: NPeter Krempa <pkrempa@redhat.com>
-
由 Michal Privoznik 提交于
Currently, the way we format PCI address is using printf-s precision, e.g. "%.4x". This works if we don't want to print any value outside of bounds (which is usually the case). However, turns out, PCI domain can be 0x10000 which doesn't work well with our format strings. However, if we change the format string to "%04x" then we still pad small values with zeroes but also we are able to print values that are larger than four digits. In fact, this format string used by kernel to print a PCI address: "%04x:%02x:%02x.%d" The other three format strings (for bus, device and function) are changed too, so that we use the same format string as kernel. Signed-off-by: NMichal Privoznik <mprivozn@redhat.com> Reviewed-by: NJán Tomko <jtomko@redhat.com>
-
由 Michal Privoznik 提交于
The format string for a PCI address is copied over and over again, often with slight adjustments. Introduce global VIR_PCI_DEVICE_ADDRESS_FMT macro that holds the formatting string and use it wherever possible. Signed-off-by: NMichal Privoznik <mprivozn@redhat.com> Reviewed-by: NJán Tomko <jtomko@redhat.com>
-
由 Wang Huaqiang 提交于
A new algorithm for detecting the vcpus and monitor type conflicts between new monitor an existing allocation and monitor groups. After refactoring, since we are verifying both @vcpus and monitor type @tag at the same time, the validating function name has been renamed from virDomainResctrlMonValidateVcpus to virDomainResctrlValidateMonitor. Signed-off-by: NWang Huaqiang <huaqiang.wang@intel.com> Reviewed-by: NMichal Privoznik <mprivozn@redhat.com>
-
由 Wang Huaqiang 提交于
'virResctrlAllocIsEmpty' checks if cache allocation or memory bandwidth allocation settings are specified in configuration file. It is not proper to be used in checking memory bandwidth allocation is specified in XML settings because this function could not distinguish memory bandwidth allocations from cache allocations. Here using the local variable @n, which indicates the cache allocation groups or memory bandwidth groups depending on the context it is in, to decide if append a new @resctrl object. If @n is zero and no monitors groups specified in XML, then we should not append a new @resctrl object to @def->resctrls. This kind of replacement is also more efficient and avoiding a long function calling path. Signed-off-by: NWang Huaqiang <huaqiang.wang@intel.com> Reviewed-by: NMichal Privoznik <mprivozn@redhat.com>
-
由 Wang Huaqiang 提交于
Let 'virDomainResctrlVcpuMatch' to retrieve a pointer of virDomainResctrlDefPtr in its third parameter instead of virResctrlAllocPtr, if @vcpus is matched with the vcpus of some resctrl allocation in list of @def->resctrls. Signed-off-by: NWang Huaqiang <huaqiang.wang@intel.com> Reviewed-by: NMichal Privoznik <mprivozn@redhat.com>
-
由 Wang Huaqiang 提交于
Creating object and judging if it is successfully created in fewer lines. Signed-off-by: NWang Huaqiang <huaqiang.wang@intel.com> Reviewed-by: NMichal Privoznik <mprivozn@redhat.com>
-
由 Wang Huaqiang 提交于
code cleanup for 'virDomainCachetuneDefParse' and 'virDomainMemorytuneDefParse'. Signed-off-by: NWang Huaqiang <huaqiang.wang@intel.com> Reviewed-by: NMichal Privoznik <mprivozn@redhat.com>
-
由 Wang Huaqiang 提交于
Remove some redundant space and line. Signed-off-by: NWang Huaqiang <huaqiang.wang@intel.com> Reviewed-by: NMichal Privoznik <mprivozn@redhat.com>
-
- 27 7月, 2019 1 次提交
-
-
由 Eric Blake 提交于
Wire up the use of a checkpoint list into each domain, similar to the existing snapshot list. This includes adding a function for checking that a redefine operation fits in with the existing list, as well as various filtering capabilities over the list contents. Signed-off-by: NEric Blake <eblake@redhat.com> Reviewed-by: NDaniel P. Berrangé <berrange@redhat.com>
-
- 26 7月, 2019 2 次提交
-
-
由 Stefan Berger 提交于
Since swtpm does not support getting started without password once it was created with encryption enabled, we don't allow encryption to be removed. Similarly, we do not allow encryption to be added once swtpm has run. We also prevent chaning the type of the TPM backend since the encrypted state is still around and the next time one was to switch back to the emulator backend and forgot the encryption the TPM would not work. Signed-off-by: NStefan Berger <stefanb@linux.ibm.com> Reviewed-by: NDaniel P. Berrangé <berrange@redhat.com>
-
由 Stefan Berger 提交于
Extend the TPM device XML parser and XML generator with emulator state encryption support. Signed-off-by: NStefan Berger <stefanb@linux.ibm.com> Reviewed-by: NDaniel P. Berrangé <berrange@redhat.com>
-