On 05/01/2022 13.38, Daniel P. Berrangé wrote:
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 no unusable for its purpose, so
we add a new 'json-cli-hotplug' feature to indicate the
-device supports JSON without breaking hotplug.

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

We're mostly using "Fixes:" to refer to previous commit IDs, and "Resolves:" for referring to bugs in the gitlab issue tracker, so in case you respin, I'd suggest to replace it (but both keywords should work to close issues, so it's just a cosmetical thing).

Signed-off-by: Daniel P. Berrangé <berra...@redhat.com>
---
  qapi/qdev.json                 |  5 ++++-
  softmmu/vl.c                   |  4 +++-
  tests/qtest/device-plug-test.c | 19 +++++++++++++++++++
  3 files changed, 26 insertions(+), 2 deletions(-)

Reviewed-by: Thomas Huth <th...@redhat.com>


Reply via email to