Skip to content
Snippets Groups Projects
Commit 64b4529a authored by Daniel P. Berrangé's avatar Daniel P. Berrangé Committed by Kevin Wolf
Browse files

softmmu: fix device deletion events with -device JSON syntax

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>
parent eac32e22
No related branches found
No related tags found
No related merge requests found
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment