Re: [RFC 4/5] libvhost-user: prevent over-running max RAM slots

2022-01-05 Thread Stefan Hajnoczi
On Wed, Dec 15, 2021 at 10:29:54PM +, Raphael Norwitz wrote: > When VHOST_USER_PROTOCOL_F_CONFIGURE_MEM_SLOTS support was added to > libvhost-user, no guardrails were added to protect against QEMU > attempting to hot-add too many RAM slots to a VM with a libvhost-user > based backed attached. >

[RFC 4/5] libvhost-user: prevent over-running max RAM slots

2021-12-15 Thread Raphael Norwitz
When VHOST_USER_PROTOCOL_F_CONFIGURE_MEM_SLOTS support was added to libvhost-user, no guardrails were added to protect against QEMU attempting to hot-add too many RAM slots to a VM with a libvhost-user based backed attached. This change adds the missing error handling by introducing a check on the