]> git.ipfire.org Git - thirdparty/libvirt.git/commit
qemu: relax shared memory check for vhostuser daemons
authorJán Tomko <jtomko@redhat.com>
Mon, 13 Mar 2023 12:56:47 +0000 (13:56 +0100)
committerJán Tomko <jtomko@redhat.com>
Tue, 14 Mar 2023 16:10:01 +0000 (17:10 +0100)
commitd5c7b7870e45575f81fffcb611c2546d0e02e778
tree2245b8841db266acad5f68ac9194db08fbec506e
parent0754ab6494a3be6d0c47a501d3b1684c83896f02
qemu: relax shared memory check for vhostuser daemons

For some vhostuser daemons, we validate that the guest memory is shared
with the host.

With earlier versions of QEMU, it was only possible to mark memory
as shared by defining an explicit NUMA topology.  Later, QEMU exposed
the name of the default memory backend (defaultRAMid) so we can mark
that memory as shared.

Since libvirt commit:
  commit bff2ad5d6b1f25da02802273934d2a519159fec7
    qemu: Relax validation for mem->access if guest has no NUMA
we already check for the case when user requests shared memory,
but QEMU did not expose defaultRAMid.

Drop the duplicit check from vhostuser device validation, to make
it pass on hotplug even after libvirtd restart.

This avoids the need to store the defaultRAMid, since we don't really
need it for anything after the VM has been already started.

https://bugzilla.redhat.com/show_bug.cgi?id=2078693
https://bugzilla.redhat.com/show_bug.cgi?id=2177701

Signed-off-by: Ján Tomko <jtomko@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
src/qemu/qemu_validate.c