* [PATCH 0/2] hw/usb: Do not build USB subsystem if not required @ 2021-04-24 22:41 Philippe Mathieu-Daudé 2021-04-24 22:41 ` [PATCH 1/2] hw/usb/host-stub: Remove unused header Philippe Mathieu-Daudé ` (2 more replies) 0 siblings, 3 replies; 8+ messages in thread From: Philippe Mathieu-Daudé @ 2021-04-24 22:41 UTC (permalink / raw) To: qemu-devel Cc: Paolo Bonzini, Thomas Huth, Gerd Hoffmann, Philippe Mathieu-Daudé Not all targets use USB: allow the build system to not build it if not selected. Philippe Mathieu-Daudé (2): hw/usb/host-stub: Remove unused header hw/usb: Do not build USB subsystem if not required hw/usb/host-stub.c | 1 - stubs/usb-dev-stub.c | 25 +++++++++++++++++++++++++ MAINTAINERS | 1 + hw/usb/meson.build | 9 +++------ stubs/meson.build | 1 + 5 files changed, 30 insertions(+), 7 deletions(-) create mode 100644 stubs/usb-dev-stub.c -- 2.26.3 ^ permalink raw reply [flat|nested] 8+ messages in thread
* [PATCH 1/2] hw/usb/host-stub: Remove unused header 2021-04-24 22:41 [PATCH 0/2] hw/usb: Do not build USB subsystem if not required Philippe Mathieu-Daudé @ 2021-04-24 22:41 ` Philippe Mathieu-Daudé 2021-05-03 2:30 ` Richard Henderson 2021-04-24 22:41 ` [PATCH 2/2] hw/usb: Do not build USB subsystem if not required Philippe Mathieu-Daudé 2021-05-02 20:13 ` [PATCH 0/2] " Philippe Mathieu-Daudé 2 siblings, 1 reply; 8+ messages in thread From: Philippe Mathieu-Daudé @ 2021-04-24 22:41 UTC (permalink / raw) To: qemu-devel Cc: Paolo Bonzini, Thomas Huth, Gerd Hoffmann, Philippe Mathieu-Daudé Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org> --- hw/usb/host-stub.c | 1 - 1 file changed, 1 deletion(-) diff --git a/hw/usb/host-stub.c b/hw/usb/host-stub.c index 538ed29684c..80809ceba54 100644 --- a/hw/usb/host-stub.c +++ b/hw/usb/host-stub.c @@ -31,7 +31,6 @@ */ #include "qemu/osdep.h" -#include "ui/console.h" #include "hw/usb.h" #include "monitor/monitor.h" -- 2.26.3 ^ permalink raw reply related [flat|nested] 8+ messages in thread
* Re: [PATCH 1/2] hw/usb/host-stub: Remove unused header 2021-04-24 22:41 ` [PATCH 1/2] hw/usb/host-stub: Remove unused header Philippe Mathieu-Daudé @ 2021-05-03 2:30 ` Richard Henderson 0 siblings, 0 replies; 8+ messages in thread From: Richard Henderson @ 2021-05-03 2:30 UTC (permalink / raw) To: Philippe Mathieu-Daudé, qemu-devel Cc: Paolo Bonzini, Thomas Huth, Gerd Hoffmann On 4/24/21 3:41 PM, Philippe Mathieu-Daudé wrote: > Signed-off-by: Philippe Mathieu-Daudé<f4bug@amsat.org> > --- > hw/usb/host-stub.c | 1 - > 1 file changed, 1 deletion(-) Reviewed-by: Richard Henderson <richard.henderson@linaro.org> r~ ^ permalink raw reply [flat|nested] 8+ messages in thread
* [PATCH 2/2] hw/usb: Do not build USB subsystem if not required 2021-04-24 22:41 [PATCH 0/2] hw/usb: Do not build USB subsystem if not required Philippe Mathieu-Daudé 2021-04-24 22:41 ` [PATCH 1/2] hw/usb/host-stub: Remove unused header Philippe Mathieu-Daudé @ 2021-04-24 22:41 ` Philippe Mathieu-Daudé 2021-05-03 2:38 ` Richard Henderson 2021-05-02 20:13 ` [PATCH 0/2] " Philippe Mathieu-Daudé 2 siblings, 1 reply; 8+ messages in thread From: Philippe Mathieu-Daudé @ 2021-04-24 22:41 UTC (permalink / raw) To: qemu-devel Cc: Paolo Bonzini, Thomas Huth, Gerd Hoffmann, Philippe Mathieu-Daudé If the Kconfig 'USB' value is not selected, it is pointless to build the USB core components. Add a stub for the HMP commands and usbdevice_create() which is called by usb_device_add in softmmu/vl.c. Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org> --- stubs/usb-dev-stub.c | 25 +++++++++++++++++++++++++ MAINTAINERS | 1 + hw/usb/meson.build | 9 +++------ stubs/meson.build | 1 + 4 files changed, 30 insertions(+), 6 deletions(-) create mode 100644 stubs/usb-dev-stub.c diff --git a/stubs/usb-dev-stub.c b/stubs/usb-dev-stub.c new file mode 100644 index 00000000000..b1adeeb4548 --- /dev/null +++ b/stubs/usb-dev-stub.c @@ -0,0 +1,25 @@ +/* + * QEMU USB device emulation stubs + * + * Copyright (C) 2021 Philippe Mathieu-Daudé <f4bug@amsat.org> + * + * SPDX-License-Identifier: GPL-2.0-or-later + */ + +#include "qemu/osdep.h" +#include "qemu/error-report.h" +#include "sysemu/sysemu.h" +#include "monitor/monitor.h" +#include "hw/usb.h" + +USBDevice *usbdevice_create(const char *driver) +{ + error_report("Support for USB devices not built-in"); + + return NULL; +} + +void hmp_info_usb(Monitor *mon, const QDict *qdict) +{ + monitor_printf(mon, "Support for USB devices not built-in\n"); +} diff --git a/MAINTAINERS b/MAINTAINERS index 36055f14c59..cd63d3efd8b 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -1804,6 +1804,7 @@ USB M: Gerd Hoffmann <kraxel@redhat.com> S: Maintained F: hw/usb/* +F: stubs/usb-dev-stub.c F: tests/qtest/usb-*-test.c F: docs/usb2.txt F: docs/usb-storage.txt diff --git a/hw/usb/meson.build b/hw/usb/meson.build index fb7a74e73ae..f357270d0b6 100644 --- a/hw/usb/meson.build +++ b/hw/usb/meson.build @@ -1,17 +1,14 @@ hw_usb_modules = {} # usb subsystem core -softmmu_ss.add(files( +softmmu_ss.add(when: 'CONFIG_USB', if_true: files( 'bus.c', 'combined-packet.c', 'core.c', - 'pcap.c', - 'libhw.c' -)) - -softmmu_ss.add(when: 'CONFIG_USB', if_true: files( 'desc.c', 'desc-msos.c', + 'libhw.c', + 'pcap.c', )) # usb host adapters diff --git a/stubs/meson.build b/stubs/meson.build index be6f6d609e5..3faef16892b 100644 --- a/stubs/meson.build +++ b/stubs/meson.build @@ -50,6 +50,7 @@ endif if have_system stub_ss.add(files('semihost.c')) + stub_ss.add(files('usb-dev-stub.c')) stub_ss.add(files('xen-hw-stub.c')) else stub_ss.add(files('qdev.c')) -- 2.26.3 ^ permalink raw reply related [flat|nested] 8+ messages in thread
* Re: [PATCH 2/2] hw/usb: Do not build USB subsystem if not required 2021-04-24 22:41 ` [PATCH 2/2] hw/usb: Do not build USB subsystem if not required Philippe Mathieu-Daudé @ 2021-05-03 2:38 ` Richard Henderson 0 siblings, 0 replies; 8+ messages in thread From: Richard Henderson @ 2021-05-03 2:38 UTC (permalink / raw) To: Philippe Mathieu-Daudé, qemu-devel Cc: Paolo Bonzini, Thomas Huth, Gerd Hoffmann On 4/24/21 3:41 PM, Philippe Mathieu-Daudé wrote: > If the Kconfig 'USB' value is not selected, it is pointless to > build the USB core components. Add a stub for the HMP commands > and usbdevice_create() which is called by usb_device_add in > softmmu/vl.c. > > Signed-off-by: Philippe Mathieu-Daudé<f4bug@amsat.org> > --- > stubs/usb-dev-stub.c | 25 +++++++++++++++++++++++++ > MAINTAINERS | 1 + > hw/usb/meson.build | 9 +++------ > stubs/meson.build | 1 + > 4 files changed, 30 insertions(+), 6 deletions(-) > create mode 100644 stubs/usb-dev-stub.c Reviewed-by: Richard Henderson <richard.henderson@linaro.org> r~ ^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH 0/2] hw/usb: Do not build USB subsystem if not required 2021-04-24 22:41 [PATCH 0/2] hw/usb: Do not build USB subsystem if not required Philippe Mathieu-Daudé 2021-04-24 22:41 ` [PATCH 1/2] hw/usb/host-stub: Remove unused header Philippe Mathieu-Daudé 2021-04-24 22:41 ` [PATCH 2/2] hw/usb: Do not build USB subsystem if not required Philippe Mathieu-Daudé @ 2021-05-02 20:13 ` Philippe Mathieu-Daudé 2021-05-03 12:25 ` Gerd Hoffmann 2 siblings, 1 reply; 8+ messages in thread From: Philippe Mathieu-Daudé @ 2021-05-02 20:13 UTC (permalink / raw) To: qemu-devel, Gerd Hoffmann; +Cc: Paolo Bonzini, Thomas Huth ping? On 4/25/21 12:41 AM, Philippe Mathieu-Daudé wrote: > Not all targets use USB: allow the build system to not > build it if not selected. > > Philippe Mathieu-Daudé (2): > hw/usb/host-stub: Remove unused header > hw/usb: Do not build USB subsystem if not required > > hw/usb/host-stub.c | 1 - > stubs/usb-dev-stub.c | 25 +++++++++++++++++++++++++ > MAINTAINERS | 1 + > hw/usb/meson.build | 9 +++------ > stubs/meson.build | 1 + > 5 files changed, 30 insertions(+), 7 deletions(-) > create mode 100644 stubs/usb-dev-stub.c > ^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH 0/2] hw/usb: Do not build USB subsystem if not required 2021-05-02 20:13 ` [PATCH 0/2] " Philippe Mathieu-Daudé @ 2021-05-03 12:25 ` Gerd Hoffmann 2021-05-03 12:45 ` Philippe Mathieu-Daudé 0 siblings, 1 reply; 8+ messages in thread From: Gerd Hoffmann @ 2021-05-03 12:25 UTC (permalink / raw) To: Philippe Mathieu-Daudé; +Cc: Paolo Bonzini, Thomas Huth, qemu-devel On Sun, May 02, 2021 at 10:13:10PM +0200, Philippe Mathieu-Daudé wrote: > ping? Added to usb queue now. (now that the 6.0 freeze is over I'm starting to collect non-bugfix patches again ...) take care, Gerd ^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH 0/2] hw/usb: Do not build USB subsystem if not required 2021-05-03 12:25 ` Gerd Hoffmann @ 2021-05-03 12:45 ` Philippe Mathieu-Daudé 0 siblings, 0 replies; 8+ messages in thread From: Philippe Mathieu-Daudé @ 2021-05-03 12:45 UTC (permalink / raw) To: Gerd Hoffmann; +Cc: Paolo Bonzini, Thomas Huth, qemu-devel On 5/3/21 2:25 PM, Gerd Hoffmann wrote: > On Sun, May 02, 2021 at 10:13:10PM +0200, Philippe Mathieu-Daudé wrote: >> ping? > > Added to usb queue now. > > (now that the 6.0 freeze is over I'm starting to collect non-bugfix > patches again ...) I was worried this series got lost. Thank you! Phil. ^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2021-05-03 12:49 UTC | newest] Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- 2021-04-24 22:41 [PATCH 0/2] hw/usb: Do not build USB subsystem if not required Philippe Mathieu-Daudé 2021-04-24 22:41 ` [PATCH 1/2] hw/usb/host-stub: Remove unused header Philippe Mathieu-Daudé 2021-05-03 2:30 ` Richard Henderson 2021-04-24 22:41 ` [PATCH 2/2] hw/usb: Do not build USB subsystem if not required Philippe Mathieu-Daudé 2021-05-03 2:38 ` Richard Henderson 2021-05-02 20:13 ` [PATCH 0/2] " Philippe Mathieu-Daudé 2021-05-03 12:25 ` Gerd Hoffmann 2021-05-03 12:45 ` Philippe Mathieu-Daudé
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).