- 16 10月, 2019 3 次提交
-
-
由 Ján Tomko 提交于
Since commit 44e7f029 util: rewrite auto cleanup macros to use glib's equivalent VIR_AUTOPTR aliases to g_autoptr. Replace all of its use by the GLib macro version. Signed-off-by: NJán Tomko <jtomko@redhat.com> Reviewed-by: NMichal Privoznik <mprivozn@redhat.com>
-
由 Ján Tomko 提交于
Since commit 44e7f029 util: rewrite auto cleanup macros to use glib's equivalent VIR_AUTOFREE is just an alias for g_autofree. Use the GLib macros directly instead of our custom aliases. Signed-off-by: NJán Tomko <jtomko@redhat.com> Reviewed-by: NMichal Privoznik <mprivozn@redhat.com>
-
由 Ján Tomko 提交于
Since commit 44e7f029 util: rewrite auto cleanup macros to use glib's equivalent VIR_AUTOCLEAN is just an alias for g_auto. Use the GLib macros directly instead of our custom aliases. Signed-off-by: NJán Tomko <jtomko@redhat.com> Reviewed-by: NMichal Privoznik <mprivozn@redhat.com>
-
- 15 10月, 2019 4 次提交
-
-
由 Ján Tomko 提交于
Prefer the GLib version of the macro. Signed-off-by: NJán Tomko <jtomko@redhat.com> Reviewed-by: NMichal Privoznik <mprivozn@redhat.com>
-
由 Ján Tomko 提交于
Also define the macro for building with GLib older than 2.60 Signed-off-by: NJán Tomko <jtomko@redhat.com> Reviewed-by: NMichal Privoznik <mprivozn@redhat.com>
-
由 Ján Tomko 提交于
Use G_GNUC_UNUSED from GLib instead of ATTRIBUTE_UNUSED. Signed-off-by: NJán Tomko <jtomko@redhat.com> Reviewed-by: NMichal Privoznik <mprivozn@redhat.com>
-
由 Ján Tomko 提交于
Introduced in GLib 2.10. Signed-off-by: NJán Tomko <jtomko@redhat.com> Reviewed-by: NMichal Privoznik <mprivozn@redhat.com>
-
- 10 10月, 2019 3 次提交
-
-
由 Daniel Henrique Barboza 提交于
This patch adds the implementation of the ccf-assist pSeries feature, based on the QEMU_CAPS_MACHINE_PSERIES_CAP_CCF_ASSIST capability that was added in the previous patch. Reviewed-by: NCole Robinson <crobinso@redhat.com> Signed-off-by: NDaniel Henrique Barboza <danielhb413@gmail.com>
-
由 Jonathon Jongsma 提交于
This device is a very simple framebuffer device supported by qemu that is mostly intended to use as a boot framebuffer in conjunction with a vgpu. However, there is also a standalone ramfb device that can be used as a primary display device and is useful for e.g. aarch64 guests where different memory mappings between the host and guest can prevent use of other devices with framebuffers such as virtio-vga. https://bugzilla.redhat.com/show_bug.cgi?id=1679680 describes the issues in more detail. Reviewed-by: NCole Robinson <crobinso@redhat.com> Signed-off-by: NJonathon Jongsma <jjongsma@redhat.com>
-
由 Cole Robinson 提交于
It is the only user. Rename it to match the local style Reviewed-by: NMichal Privoznik <mprivozn@redhat.com> Signed-off-by: NCole Robinson <crobinso@redhat.com>
-
- 07 10月, 2019 1 次提交
-
-
由 Daniel P. Berrangé 提交于
We're using gnulib to get ffs, ffsl, rotl32, count_one_bits, and count_leading_zeros. Except for rotl32 they can all be replaced with gcc/clangs builtins. rotl32 is a one-line trivial function. Reviewed-by: NJán Tomko <jtomko@redhat.com> Signed-off-by: NDaniel P. Berrangé <berrange@redhat.com>
-
- 27 9月, 2019 3 次提交
-
-
由 Laine Stump 提交于
Before the refactoring that properly separated the network driver from the hypervisor driver and forced all interaction to go through public APIs, all network usage counters were zeroed when the network driver was initialized, and the network driver's now-deprecated "semi-private" API networkNotifyActualDevice() was called for every interface of every domain as each hypervisor "reconnected" its domains during a libvirtd restart, and this would refresh the usage count for each network. Post-driver-split, during libvirtd restart/reconnection of the running domains, the function virDomainNetNotifyActualDevice() is called by each hypervisor driver for every interface of every domain restart, and this function has code to re-register interfaces, but it only calls into the network driver to re-register those ports that don't already have a valid portid (ie. one that is not simply all 0), assuming that those with valid portids are already known (and counted) by the network driver. commit 7ab9bdd4 recently modified the network driver so that, in most cases, it properly resyncs each network's connection count during libvirtd (or maybe virtnetworkd) restart by iterating through the network's port list. This doesn't account for the case where a network is destroyed and restarted while there are running domains that have active ports on the network. In that case, the entire port list and connection count for that network is lost, and now even a restart of libvirtd/virtnetworkd/virtqemud, which in the past would resync the connection count, doesn't help (the network driver thinks there are no active ports, while the hypervisor driver knows about all the active ports, but mistakenly believes that the network driver also knows). The solution to this is to not just bypass valid portids during the call to virDomainNetworkNotifyActualDevice(). Instead, we query the network driver about the portid that was preserved in the domain status, and if it is not registered, we register it. (NB: while it would technically be correct to just generate a new portid for these cases, it makes for less churn in portids (and thus may make troubleshooting simpler) if we make the small fix to virDomainNetDefActualToNetworkPort() that preserves existing valid portids rather than unconditionally generating a new one.) Signed-off-by: NLaine Stump <laine@redhat.com> Reviewed-by: NMichal Privoznik <mprivozn@redhat.com>
-
由 Laine Stump 提交于
define a VIR_DEFINE_AUTOPTR_FUNC() to autofree virNetworkPortDefs, and convert all uses of virNetworkPortDefPtr that are appropriate to use it. This coincidentally fixes multiple potential memory leaks (in failure cases) in networkPortCreateXML() Signed-off-by: NLaine Stump <laine@redhat.com> Reviewed-by: NMichal Privoznik <mprivozn@redhat.com>
-
由 Laine Stump 提交于
A virDomainNetDef object in a domain's nets array might contain a virDomainHostdevDef, and when this is the case, the domain's hostdevs array will also have a pointer to this embedded hostdev (this is done so that internal functions that need to perform some operation on all hostdevs won't leave out the type='hostdev' network interfaces). When a network device was updated with virDomainUpdateDeviceFlags(), we were replacing the entry in the nets array (and free'ing the original) but forgetting about the pointer in the hostdevs array (which would then point to the now-free'd hostdev contained in the old net object.) This often resulted in a libvirtd crash. The solution is to add a function, virDomainNetUpdate(), called by qemuDomainUpdateDeviceConfig(), that updates the hostdevs array appropriately along with the nets array. Resolves: https://bugzilla.redhat.com/1558934Signed-off-by: NLaine Stump <laine@redhat.com> Reviewed-by: NMichal Privoznik <mprivozn@redhat.com>
-
- 26 9月, 2019 1 次提交
-
-
由 Michal Privoznik 提交于
The private data for video definition is created in virDomainVideoDefNew() and we attempt to free it in virDomainVideoDefFree(). This seems to work, except the free function calls clear function which zeroes out the whole structure and thus virObjectUnref() which is called on private data does nothing. 2,568 bytes in 107 blocks are definitely lost in loss record 207 of 213 at 0x4A35476: calloc (vg_replace_malloc.c:752) by 0x50A6048: virAllocVar (viralloc.c:346) by 0x513CC5A: virObjectNew (virobject.c:243) by 0x4DC1DEE: qemuDomainVideoPrivateNew (qemu_domain.c:1337) by 0x51A6BD6: virDomainVideoDefNew (domain_conf.c:2831) by 0x51B9F06: virDomainVideoDefParseXML (domain_conf.c:15541) by 0x51CB761: virDomainDefParseXML (domain_conf.c:21158) by 0x51C5973: virDomainDefParseNode (domain_conf.c:21708) by 0x51C583A: virDomainDefParse (domain_conf.c:21663) by 0x51C58AE: virDomainDefParseFile (domain_conf.c:21688) Signed-off-by: NMichal Privoznik <mprivozn@redhat.com> Reviewed-by: NErik Skultety <eskultet@redhat.com>
-
- 25 9月, 2019 5 次提交
-
-
由 Michal Privoznik 提交于
In bc1e924c we've introduced video driver name and whilst doing so we've utilized VIR_ENUM_IMPL() macro. Then, in domain XML parsing code the generated virDomainVideoBackendTypeFromString() is called and its return value is assigned directly to an unsigned int variable which is wrong. Also, the video driver enum has 'default' value which is not formatted into domain XML but is accepted during parsing. Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
-
由 Marc-André Lureau 提交于
Signed-off-by: NMarc-André Lureau <marcandre.lureau@redhat.com> Reviewed-by: NCole Robinson <crobinso@redhat.com>
-
由 Marc-André Lureau 提交于
Add qemuVhostUserFetchConfigs() to discover vhost-user helpers. qemuVhostUserFillDomainGPU() will find the first matching GPU helper with the required capabilities and set the associated vhost_user_binary. Signed-off-by: NMarc-André Lureau <marcandre.lureau@redhat.com> Reviewed-by: NCole Robinson <crobinso@redhat.com>
-
由 Marc-André Lureau 提交于
vhost-user-gpu helper takes --render-node option to specify on which GPU should the renderning be done. Signed-off-by: NMarc-André Lureau <marcandre.lureau@redhat.com> Reviewed-by: NJán Tomko <jtomko@redhat.com>
-
由 Marc-André Lureau 提交于
Accept a new driver name attribute to specify usage of helper process, ex: <video> <driver name='vhostuser'/> <model type='virtio'/> </video> Signed-off-by: NMarc-André Lureau <marcandre.lureau@redhat.com> Reviewed-by: NJán Tomko <jtomko@redhat.com>
-
- 20 9月, 2019 1 次提交
-
-
由 Laine Stump 提交于
When the bridge re-attach handling was moved out of the network driver and into the hypervisor driver (commit b806a60e) as a part of the refactor to split the network driver into a separate daemon, the check was accidentally changed to only check for type='bridge'. The check for type in this case needs to check for type='network' as well. (at the time we thought that the two types could be conflated for interface actual type, but this turned out to be too problematic to do). Signed-off-by: NLaine Stump <laine@redhat.com> Reviewed-by: NDaniel P. Berrangé <berrange@redhat.com>
-
- 19 9月, 2019 5 次提交
-
-
由 Peter Krempa 提交于
Use VIR_AUTOPTR for temporary locals and get rid of the cleanup label. Signed-off-by: NPeter Krempa <pkrempa@redhat.com> Reviewed-by: NJiri Denemark <jdenemar@redhat.com>
-
由 Peter Krempa 提交于
Refactor functions using these two object types together with VIR_AUTOPTR. Signed-off-by: NPeter Krempa <pkrempa@redhat.com> Reviewed-by: NJiri Denemark <jdenemar@redhat.com>
-
由 Peter Krempa 提交于
Clean up functions which grab and free the context to use VIR_AUTOPTR. Signed-off-by: NPeter Krempa <pkrempa@redhat.com> Reviewed-by: NJiri Denemark <jdenemar@redhat.com>
-
由 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 3 次提交
-
-
由 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>
-