[PATCH for-5.0 3/4] Remove the core bluetooth code
Philippe Mathieu-Daudé
f4bug at amsat.org
Sat Feb 1 16:09:05 UTC 2020
On 11/20/19 10:10 AM, Thomas Huth wrote:
> It's been deprecated since QEMU v3.1. We've explicitly asked in the
> deprecation message that people should speak up on qemu-devel in case
> they are still actively using the bluetooth part of QEMU, but nobody
> ever replied that they are really still using it.
>
> I've tried it on my own to use this bluetooth subsystem for one of my
> guests, but I was also not able to get it running anymore: When I was
> trying to pass-through a real bluetooth device, either the guest did
> not see the device at all, or the guest crashed.
>
> Even worse for the emulated device: When running
>
> qemu-system-x86_64 -bt device:keyboard
>
> QEMU crashes once you hit a key.
>
> So it seems like the bluetooth stack is not only neglected, it is
> completely bitrotten, as far as I can tell. The only attention that
> this code got during the past years were some CVEs that have been
> spotted there. So this code is a burden for the developers, without
> any real benefit anymore. Time to remove it.
>
> Signed-off-by: Thomas Huth <thuth at redhat.com>
> ---
> Makefile.objs | 2 -
> bt-host.c | 198 ----
> bt-vhci.c | 167 ----
> configure | 31 -
> hw/Kconfig | 1 -
> hw/Makefile.objs | 1 -
> hw/bt/Kconfig | 2 -
> hw/bt/Makefile.objs | 3 -
> hw/bt/core.c | 143 ---
> hw/bt/hci-csr.c | 512 ----------
> hw/bt/hci.c | 2263 ------------------------------------------
> hw/bt/hid.c | 553 -----------
> hw/bt/l2cap.c | 1367 -------------------------
> hw/bt/sdp.c | 989 ------------------
> include/hw/bt.h | 2177 ----------------------------------------
> include/sysemu/bt.h | 20 -
> qemu-deprecated.texi | 7 -
> qemu-options.hx | 79 --
> vl.c | 136 ---
> 19 files changed, 8651 deletions(-)
> delete mode 100644 bt-host.c
> delete mode 100644 bt-vhci.c
> delete mode 100644 hw/bt/Kconfig
> delete mode 100644 hw/bt/Makefile.objs
> delete mode 100644 hw/bt/core.c
> delete mode 100644 hw/bt/hci-csr.c
> delete mode 100644 hw/bt/hci.c
> delete mode 100644 hw/bt/hid.c
> delete mode 100644 hw/bt/l2cap.c
> delete mode 100644 hw/bt/sdp.c
> delete mode 100644 include/hw/bt.h
> delete mode 100644 include/sysemu/bt.h
>
[...]> diff --git a/configure b/configure
> index 6099be1d84..ecce4ada2d 100755
> --- a/configure
> +++ b/configure
> @@ -349,7 +349,6 @@ unset target_list_exclude
> # Distributions want to ensure that several features are compiled in, and it
> # is impossible without a --enable-foo that exits if a feature is not found.
>
> -bluez=""
> brlapi=""
> curl=""
> curses=""
> @@ -1151,10 +1150,6 @@ for opt do
> ;;
> --enable-brlapi) brlapi="yes"
> ;;
> - --disable-bluez) bluez="no"
> - ;;
> - --enable-bluez) bluez="yes"
> - ;;
Now than I'm bisecting over this commit, I realize removing this
option was not a good idea, we should have done like commit
cb6414dfec8 or 315d3184525:
@@ -886,10 +885,6 @@ for opt do
- --disable-uuid) uuid="no"
- ;;
- --enable-uuid) uuid="yes"
- ;;
...
+ --enable-uuid|--disable-uuid)
+ echo "$0: $opt is obsolete, UUID support is always built" >&2
+ ;;
> --disable-kvm) kvm="no"
> ;;
> --enable-kvm) kvm="yes"
> @@ -1762,7 +1757,6 @@ disabled with --disable-FEATURE, default is enabled if available:
> curl curl connectivity
> membarrier membarrier system call (for Linux 4.14+ or Windows)
> fdt fdt device tree
> - bluez bluez stack connectivity
> kvm KVM acceleration support
> hax HAX acceleration support
> hvf Hypervisor.framework acceleration support
> @@ -3665,26 +3659,6 @@ EOF
> fi
> fi # test "$curl"
>
> -##########################################
> -# bluez support probe
> -if test "$bluez" != "no" ; then
> - cat > $TMPC << EOF
> -#include <bluetooth/bluetooth.h>
> -int main(void) { return bt_error(0); }
> -EOF
> - bluez_cflags=$($pkg_config --cflags bluez 2>/dev/null)
> - bluez_libs=$($pkg_config --libs bluez 2>/dev/null)
> - if compile_prog "$bluez_cflags" "$bluez_libs" ; then
> - bluez=yes
> - libs_softmmu="$bluez_libs $libs_softmmu"
> - else
> - if test "$bluez" = "yes" ; then
> - feature_not_found "bluez" "Install bluez-libs/libbluetooth devel"
> - fi
> - bluez="no"
> - fi
> -fi
> -
> ##########################################
> # glib support probe
>
> @@ -6509,7 +6483,6 @@ if test "$xen" = "yes" ; then
> echo "xen ctrl version $xen_ctrl_version"
> fi
> echo "brlapi support $brlapi"
> -echo "bluez support $bluez"
> echo "Documentation $docs"
> echo "PIE $pie"
> echo "vde support $vde"
> @@ -6933,10 +6906,6 @@ if test "$brlapi" = "yes" ; then
> echo "CONFIG_BRLAPI=y" >> $config_host_mak
> echo "BRLAPI_LIBS=$brlapi_libs" >> $config_host_mak
> fi
> -if test "$bluez" = "yes" ; then
> - echo "CONFIG_BLUEZ=y" >> $config_host_mak
> - echo "BLUEZ_CFLAGS=$bluez_cflags" >> $config_host_mak
> -fi
> if test "$gtk" = "yes" ; then
> echo "CONFIG_GTK=m" >> $config_host_mak
> echo "GTK_CFLAGS=$gtk_cflags" >> $config_host_mak
[...]
More information about the libvir-list
mailing list