[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH v2 2/3] hw/usb: Introduce x-query-usbhost QMP command
From: |
Daniel P . Berrangé |
Subject: |
Re: [PATCH v2 2/3] hw/usb: Introduce x-query-usbhost QMP command |
Date: |
Tue, 11 Jun 2024 13:28:02 +0100 |
User-agent: |
Mutt/2.2.12 (2023-09-09) |
On Tue, Jun 11, 2024 at 12:23:04PM +0200, Philippe Mathieu-Daudé wrote:
> This is a counterpart to the HMP "info usbhost" command. It is being
> added with an "x-" prefix because this QMP command is intended as an
> adhoc debugging tool and will thus not be modelled in QAPI as fully
> structured data, nor will it have long term guaranteed stability.
> The existing HMP command is rewritten to call the QMP command.
>
> Since host-libusb.c can be built as part of the 'hw-usb' module,
> we introduce the libusb_register_hmp_info_hrt() helper to allow late
> registration when the module is loaded.
>
> Suggested-by: Daniel P. Berrangé <berrange@redhat.com>
> Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
> ---
> qapi/machine.json | 18 ++++++++++++++++
> hw/usb/host-libusb.h | 16 ++++++++++++++
> include/hw/usb.h | 3 ---
> hw/usb/bus-stub.c | 7 +++++-
> hw/usb/host-libusb-common.c | 31 ++++++++++++++++++++++++++
> hw/usb/host-libusb.c | 43 +++++++++++++++++++++++++------------
> tests/qtest/qmp-cmd-test.c | 3 +++
> hmp-commands-info.hx | 2 ++
> hw/usb/meson.build | 1 +
> 9 files changed, 106 insertions(+), 18 deletions(-)
> create mode 100644 hw/usb/host-libusb.h
> create mode 100644 hw/usb/host-libusb-common.c
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
With regards,
Daniel
--
|: https://berrange.com -o- https://www.flickr.com/photos/dberrange :|
|: https://libvirt.org -o- https://fstop138.berrange.com :|
|: https://entangle-photo.org -o- https://www.instagram.com/dberrange :|