[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PULL 37/48] usb: build usb-host as module
From: |
Peter Krempa |
Subject: |
Re: [PULL 37/48] usb: build usb-host as module |
Date: |
Thu, 22 Jul 2021 16:10:03 +0200 |
User-agent: |
Mutt/2.0.7 (2021-05-04) |
adding libvirt-list
On Thu, Jul 08, 2021 at 17:17:37 +0200, Paolo Bonzini wrote:
> From: Gerd Hoffmann <kraxel@redhat.com>
>
> Drop one more shared library dependency (libusb) from core qemu.
>
> Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
> Reviewed-by: Jose R. Ziviani <jziviani@suse.de>
> Message-Id: <20210624103836.2382472-34-kraxel@redhat.com>
> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
> ---
> hw/usb/host-libusb.c | 1 +
> hw/usb/meson.build | 8 ++++++--
> 2 files changed, 7 insertions(+), 2 deletions(-)
After this commit libvirt is no longer detecting the 'hostdevice'
property of 'usb-host'. In fact 'device-list-properties' is returning:
"desc": "Device 'usb-host' not found"
> diff --git a/hw/usb/host-libusb.c b/hw/usb/host-libusb.c
> index 2b7f87872c..c0f314462a 100644
> --- a/hw/usb/host-libusb.c
> +++ b/hw/usb/host-libusb.c
> @@ -1777,6 +1777,7 @@ static TypeInfo usb_host_dev_info = {
> .class_init = usb_host_class_initfn,
> .instance_init = usb_host_instance_init,
> };
> +module_obj(TYPE_USB_HOST_DEVICE);
>
> static void usb_host_register_types(void)
> {
> diff --git a/hw/usb/meson.build b/hw/usb/meson.build
> index 817f3e027a..3ca6127937 100644
> --- a/hw/usb/meson.build
> +++ b/hw/usb/meson.build
> @@ -72,8 +72,12 @@ if usbredir.found()
> endif
>
> # usb pass-through
> -softmmu_ss.add(when: ['CONFIG_USB', libusb],
> - if_true: files('host-libusb.c'))
> +if config_host.has_key('CONFIG_USB_LIBUSB')
The problem is in this condition as it's evaluated as false. When I
replace it with libusb.found(), everything works as it used to.
Unfortunately I don't know what the real goa behind using
CONFIG_USB_LIBUSB here was to see whether my approach is good.
> + usbhost_ss = ss.source_set()
> + usbhost_ss.add(when: ['CONFIG_USB', libusb],
> + if_true: files('host-libusb.c'))
> + hw_usb_modules += {'host': usbhost_ss}
> +endif
>
> softmmu_ss.add(when: ['CONFIG_USB', 'CONFIG_XEN', libusb], if_true:
> files('xen-usb.c'))
>
> --
> 2.31.1
>
>
>
- [PULL 24/48] modules: target-specific module build infrastructure, (continued)
- [PULL 24/48] modules: target-specific module build infrastructure, Paolo Bonzini, 2021/07/08
- [PULL 25/48] modules: add documentation for module sourcesets, Paolo Bonzini, 2021/07/08
- [PULL 21/48] modules: add tracepoints, Paolo Bonzini, 2021/07/08
- [PULL 22/48] modules: check arch and block load on mismatch, Paolo Bonzini, 2021/07/08
- [PULL 29/48] accel: autoload modules, Paolo Bonzini, 2021/07/08
- [PULL 28/48] modules: hook up modules.h to docs build, Paolo Bonzini, 2021/07/08
- [PULL 30/48] accel: add qtest module annotations, Paolo Bonzini, 2021/07/08
- [PULL 32/48] accel: add tcg module annotations, Paolo Bonzini, 2021/07/08
- [PULL 35/48] usb: drop usb_host_dev_is_scsi_storage hook, Paolo Bonzini, 2021/07/08
- [PULL 37/48] usb: build usb-host as module, Paolo Bonzini, 2021/07/08
- Re: [PULL 37/48] usb: build usb-host as module,
Peter Krempa <=
- [PULL 34/48] monitor: allow register hmp commands, Paolo Bonzini, 2021/07/08
- [PULL 33/48] accel: build tcg modular, Paolo Bonzini, 2021/07/08
- [PULL 26/48] modules: add module_obj() note to QOM docs, Paolo Bonzini, 2021/07/08
- [PULL 39/48] target/i386: Added MSRPM and IOPM size check, Paolo Bonzini, 2021/07/08
- [PULL 40/48] target/i386: Added DR6 and DR7 consistency checks, Paolo Bonzini, 2021/07/08
- [PULL 36/48] monitor/usb: register 'info usbhost' dynamically, Paolo Bonzini, 2021/07/08
- [PULL 38/48] monitor/tcg: move tcg hmp commands to accel/tcg, register them dynamically, Paolo Bonzini, 2021/07/08
- [PULL 45/48] hw/arm: add dependency on OR_IRQ for XLNX_VERSAL, Paolo Bonzini, 2021/07/08
- [PULL 48/48] configure: allow the selection of alternate config in the build, Paolo Bonzini, 2021/07/08