qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: "Philippe Mathieu-Daudé" <philmd@linaro.org>
To: "Daniel P . Berrangé" <berrange@redhat.com>, qemu-devel@nongnu.org
Cc: Paolo Bonzini <pbonzini@redhat.com>,
	Thomas Huth <thuth@redhat.com>,
	"Dr. David Alan Gilbert" <dave@treblig.org>,
	Markus Armbruster <armbru@redhat.com>
Subject: Re: [PATCH v2 2/3] hw/usb: Introduce x-query-usbhost QMP command
Date: Tue, 18 Jun 2024 17:33:13 +0200	[thread overview]
Message-ID: <6072516b-b8db-443e-b32d-3bcd597cce48@linaro.org> (raw)
In-Reply-To: <7c8cf4f0-c717-47dd-8390-41c7fd7d0a0b@linaro.org>

On 18/6/24 16:15, Philippe Mathieu-Daudé wrote:
> On 11/6/24 12:23, 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


>> diff --git a/hw/usb/bus-stub.c b/hw/usb/bus-stub.c
>> index fcabe8429e..948429bb33 100644
>> --- a/hw/usb/bus-stub.c
>> +++ b/hw/usb/bus-stub.c
>> @@ -11,7 +11,6 @@
>>   #include "qapi/error.h"
>>   #include "qapi/qapi-commands-machine.h"
>>   #include "sysemu/sysemu.h"
>> -#include "monitor/monitor.h"
>>   #include "hw/usb.h"
>>   USBDevice *usbdevice_create(const char *driver)
>> @@ -26,3 +25,9 @@ HumanReadableText *qmp_x_query_usb(Error **errp)
>>       error_setg(errp, "Support for USB devices not built-in");
>>       return NULL;
>>   }

Also missing:

    #ifdef CONFIG_USB_LIBUSB

>> +HumanReadableText *qmp_x_query_usbhost(Error **errp)
>> +{
>> +    error_setg(errp, "Support for USB devices not built-in");
>> +    return NULL;
>> +}

    #endif

But still failing the build-without-defaults job:

▶ 59/61 /x86_64/qmp/x-query-usbhost - 
ERROR:../tests/qtest/qmp-cmd-test.c:88:test_query: assertion failed: 
(error) FAIL

So dropping patches 2 & 3 for now.


  reply	other threads:[~2024-06-18 15:34 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-06-11 10:23 [PATCH v2 0/3] hw/usb: Introduce x-query-usbhost QMP command Philippe Mathieu-Daudé
2024-06-11 10:23 ` [PATCH v2 1/3] hw/usb: Remove unused 'host.h' header Philippe Mathieu-Daudé
2024-06-11 12:25   ` Daniel P. Berrangé
2024-06-11 10:23 ` [PATCH v2 2/3] hw/usb: Introduce x-query-usbhost QMP command Philippe Mathieu-Daudé
2024-06-11 12:28   ` Daniel P. Berrangé
2024-06-18 14:15   ` Philippe Mathieu-Daudé
2024-06-18 15:33     ` Philippe Mathieu-Daudé [this message]
2024-06-11 10:23 ` [PATCH v2 3/3] monitor: Remove monitor_register_hmp() Philippe Mathieu-Daudé
2024-06-11 12:30   ` Daniel P. Berrangé
2024-06-18 10:57 ` [PATCH v2 0/3] hw/usb: Introduce x-query-usbhost QMP command Philippe Mathieu-Daudé

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=6072516b-b8db-443e-b32d-3bcd597cce48@linaro.org \
    --to=philmd@linaro.org \
    --cc=armbru@redhat.com \
    --cc=berrange@redhat.com \
    --cc=dave@treblig.org \
    --cc=pbonzini@redhat.com \
    --cc=qemu-devel@nongnu.org \
    --cc=thuth@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).