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: Thomas Huth
Subject: Re: [PATCH 1/1] softmmu: fix device deletion events with -device JSON syntax
Date: Wed, 5 Jan 2022 13:49:16 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.4.0

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é <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(-)

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




reply via email to

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