When the device is going away (e.g., hot-unplug), an associated chardev should be freed and made available for use for other devices.
An earlier hack did this for virtio serial ports, do it in a generic way and remove the virtio-serial specific hack. Amit Shah (2): qdev: Add a 'free' method to disassociate chardev from qdev device virtio-console: no need to remove char handlers explicitly hw/qdev-properties.c | 11 +++++++++++ hw/virtio-console.c | 10 ---------- 2 files changed, 11 insertions(+), 10 deletions(-) -- 1.7.7.5