[PATCH 0/1] Fix -device JSON support wrt hotplug

Daniel P. Berrangé posted 1 patch 2 years, 3 months ago
Test checkpatch passed
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/qemu tags/patchew/20220105123847.4047954-1-berrange@redhat.com
qapi/qdev.json                 |  5 ++++-
softmmu/vl.c                   |  4 +++-
tests/qtest/device-plug-test.c | 19 +++++++++++++++++++
3 files changed, 26 insertions(+), 2 deletions(-)
[PATCH 0/1] Fix -device JSON support wrt hotplug
Posted by Daniel P. Berrangé 2 years, 3 months ago
Libvirt switched to using -device JSON support, but we discovered in
testing that it is broken for hotplug, never sending DEVICE_DELETED
events. This is caused by a subtle refcount leak.

Daniel P. Berrangé (1):
  softmmu: fix device deletion events with -device JSON syntax

 qapi/qdev.json                 |  5 ++++-
 softmmu/vl.c                   |  4 +++-
 tests/qtest/device-plug-test.c | 19 +++++++++++++++++++
 3 files changed, 26 insertions(+), 2 deletions(-)

-- 
2.33.1



Re: [PATCH 0/1] Fix -device JSON support wrt hotplug
Posted by Kevin Wolf 2 years, 3 months ago
Am 05.01.2022 um 13:38 hat Daniel P. Berrangé geschrieben:
> Libvirt switched to using -device JSON support, but we discovered in
> testing that it is broken for hotplug, never sending DEVICE_DELETED
> events. This is caused by a subtle refcount leak.

Oops, so I fell again in the trap of this interface returning a strong
reference... Maybe it's just me, but I find it highly unintuitive.

Thanks, applied to the block branch.

Kevin