Skip to content
Snippets Groups Projects
user avatar
Daniel P. Berrangé authored
The -device JSON syntax impl leaks a reference on the created
DeviceState instance. As a result when you hot-unplug the
device, the device_finalize method won't be called and thus
it will fail to emit the required DEVICE_DELETED event.

A 'json-cli' feature was previously added against the
'device_add' QMP command QAPI schema to indicated to mgmt
apps that -device supported JSON syntax. Given the hotplug
bug that feature flag is not usable for its purpose, so
we add a new 'json-cli-hotplug' feature to indicate the
-device supports JSON without breaking hotplug.

Fixes: 5dacda51
Resolves: https://gitlab.com/qemu-project/qemu/-/issues/802


Signed-off-by: default avatarDaniel P. Berrangé <berrange@redhat.com>
Message-Id: <20220105123847.4047954-2-berrange@redhat.com>
Reviewed-by: default avatarLaurent Vivier <lvivier@redhat.com>
Tested-by: default avatarJán Tomko <jtomko@redhat.com>
Reviewed-by: default avatarThomas Huth <thuth@redhat.com>
Signed-off-by: default avatarKevin Wolf <kwolf@redhat.com>
64b4529a
History