[libvirt PATCH] qemu: Reset stored memlock limit when stopping QEMU

Jiri Denemark posted 1 patch 1 year, 9 months ago
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/libvirt tags/patchew/f8ca1256c5a3edbf7a0b1f2db8bd57ce8b553f6f.1659525902.git.jdenemar@redhat.com
src/qemu/qemu_domain.c | 3 +++
1 file changed, 3 insertions(+)
[libvirt PATCH] qemu: Reset stored memlock limit when stopping QEMU
Posted by Jiri Denemark 1 year, 9 months ago
When resetting private data after stopping QEMU process we should also
reset the original memory locking limit (both normal and pre-migration)
as they are not relevant anymore.

Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
---
 src/qemu/qemu_domain.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/src/qemu/qemu_domain.c b/src/qemu/qemu_domain.c
index a53c25f36e..12c58a25b9 100644
--- a/src/qemu/qemu_domain.c
+++ b/src/qemu/qemu_domain.c
@@ -1705,6 +1705,9 @@ qemuDomainObjPrivateDataClear(qemuDomainObjPrivate *priv)
         g_slist_free_full(g_steal_pointer(&priv->dbusVMStateIds), g_free);
 
     priv->dbusVMState = false;
+
+    priv->originalMemlock = 0;
+    priv->preMigrationMemlock = 0;
 }
 
 
-- 
2.35.1
Re: [libvirt PATCH] qemu: Reset stored memlock limit when stopping QEMU
Posted by Erik Skultety 1 year, 9 months ago
On Wed, Aug 03, 2022 at 01:25:02PM +0200, Jiri Denemark wrote:
> When resetting private data after stopping QEMU process we should also
> reset the original memory locking limit (both normal and pre-migration)
> as they are not relevant anymore.
> 
> Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
> ---
Reviewed-by: Erik Skultety <eskultet@redhat.com>