qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH 1/1] softmmu: fix device deletion events with -device JSON sy


From: Ján Tomko
Subject: Re: [PATCH 1/1] softmmu: fix device deletion events with -device JSON syntax
Date: Wed, 5 Jan 2022 15:37:54 +0100

On a Wednesday in 2022, 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
Signed-off-by: Daniel P. Berrangé <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(-)


Tested-by: Ján Tomko <jtomko@redhat.com>

Jano

Attachment: signature.asc
Description: PGP signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]