id = 1645 title = "qemu error `hotplug memory\" error=\"QMP command failed: a used vhost backend has no free memory slots left\"`" state = "opened" created_at = "2023-05-11T09:43:25.568Z" closed_at = "n/a" labels = [] url = "https://gitlab.com/qemu-project/qemu/-/issues/1645" host-os = "CentOS Linux release 7.9.2009 (Core)" host-arch = "x86" qemu-version = "QEMU emulator version 6.1.0 (kata-static)" guest-os = "CentOS Linux release 7.9.2009 (Core)" guest-arch = "x86" description = """When I create a Qemu VM with 8 Gpus and hot-plugging memory, this will return the error QMP command failed: a used vhost backend has no free memory slots left. I read some source file https://gitlab.com/qemu-project/qemu/-/blob/master/hw/virtio/vhost-user.c#L2077, and debug show u->user->memory_slots is 32, but this https://gitlab.com/qemu-project/qemu/-/blob/master/hw/virtio/vhost.c#L62 used_memslots is bigger than u->user->memory_slots. `u->user->memory_slots` is defined 32 by https://gitlab.com/qemu-project/qemu/-/blob/master/subprojects/libvhost-user/libvhost-user.h#L37, but I also see VHOST_USER_MAX_RAM_SLOTS defined 512 under x86 architecture. Can I improve `u->user->memory_slots` by any way?""" reproduce = """1.crate kata containers with 8 Gpus 2.kata containers return error""" additional = """"""