Skip to contentSkip to conversation

Bluetooth removal, and qtest & misc patches

GIT PULL Applied Thomas Huth 2 participants 3 messages Dec 17, 2019 Kbuild

lore
Share & tools
lore
#0 lore raw

Hi!

The following changes since commit cb88904a54903ef6ba21a68a61d9cd51e2166304:

Merge remote-tracking branch 'remotes/amarkovic/tags/mips-queue-dec-16-2019' into staging (2019-12-16 14:07:56 +0000)

are available in the Git repository at:

https://gitlab.com/huth/qemu.git tags/pull-request-2019-12-17

for you to fetch changes up to 0f555602c7430ae55b5a4bacf39ce9e483e11193:

tests: use g_test_rand_int (2019-12-17 09:05:23 +0100)

----------------------------------------------------------------
* Removal of the deprecated bluetooth code
* Some qtest and misc patches
----------------------------------------------------------------

v2: Unfortunately, I was not able to reproduce the build problem that
Peter reported for the v1 pull request. So I'm trying to work-around the issue now by leaving an empty hw/bt/Kconfig file around this time. I'll remove it by another patch later in a couple of weeks instead.

Cole Robinson (1):
tests: fix modules-test 'duplicate test case' error

Laurent Vivier (1):
pseries: disable migration-test if /dev/kvm cannot be used

Marc-André Lureau (1):
glib: use portable g_setenv()

Markus Armbruster (1):
hw/misc/ivshmem: Bury dead legacy INTx code

Paolo Bonzini (1):
tests: use g_test_rand_int

Thomas Huth (4):
hw/arm/nseries: Replace the bluetooth chardev with a "null" chardev hw/usb: Remove the USB bluetooth dongle device
Remove the core bluetooth code
Remove libbluetooth / bluez from the CI tests

Wainer dos Santos Moschetta (1):
tests/Makefile: Fix check-report.* targets shown in check-help

 .gitlab-ci.yml                             |    2 +-
 Makefile.objs                              |    2 -
 bt-host.c                                  |  198 ---
 bt-vhci.c                                  |  167 --
 configure                                  |   31 -
 hw/Kconfig                                 |    1 -
 hw/Makefile.objs                           |    1 -
 hw/arm/nseries.c                           |   16 +-
 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 ------------
 hw/misc/ivshmem.c                          |   35 -
 hw/usb/Kconfig                             |    5 -
 hw/usb/Makefile.objs                       |    1 -
 hw/usb/dev-bluetooth.c                     |  581 -------
 include/hw/bt.h                            | 2177 --------------------------
 include/sysemu/bt.h                        |   20 -
 include/sysemu/os-win32.h                  |    2 -
 os-win32.c                                 |   22 -
 qemu-deprecated.texi                       |    7 -
 qemu-doc.texi                              |   17 -
 qemu-options.hx                            |   79 -
 tests/Makefile.include                     |    4 +-
 tests/docker/dockerfiles/fedora.docker     |    1 -
 tests/docker/dockerfiles/ubuntu.docker     |    1 -
 tests/docker/dockerfiles/ubuntu1804.docker |    1 -
 tests/ivshmem-test.c                       |    2 +-
 tests/libqtest.c                           |    2 +-
 tests/migration-test.c                     |    3 +-
 tests/modules-test.c                       |    3 +-
 tests/test-bitmap.c                        |    8 +-
 tests/test-crypto-tlscredsx509.c           |    2 +-
 tests/test-crypto-tlssession.c             |    2 +-
 tests/test-io-channel-tls.c                |    2 +-
 tests/test-qga.c                           |    4 +-
 tests/test-vmstate.c                       |    2 +-
 ui/sdl2.c                                  |    2 +-
 vl.c                                       |  136 --
 43 files changed, 26 insertions(+), 9345 deletions(-)
 delete mode 100644 bt-host.c
 delete mode 100644 bt-vhci.c
 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 hw/usb/dev-bluetooth.c
 delete mode 100644 include/hw/bt.h
 delete mode 100644 include/sysemu/bt.h
#1 lore raw

[PULL v2 03/10] Remove the core bluetooth code

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.

Note: hw/bt/Kconfig only gets cleared but not removed here yet. Otherwise there is a problem with the *-softmmu/config-devices.mak.d dependency files - they still contain a reference to this file which gets evaluated first on some build hosts, before the file gets properly recreated. To avoid breaking these builders, we still need the file around for some time. It will get removed in a couple of weeks instead.

Message-Id: <[email protected]>

---
 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/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
Makefile.objs +0 -2
index 11ba1a36bd..4e4d6ddbb3 100644
@@ -65,8 +65,6 @@ common-obj-y += replay/
 
 common-obj-y += ui/
 common-obj-m += ui/
-common-obj-y += bt-host.o bt-vhci.o
-bt-host.o-cflags := $(BLUEZ_CFLAGS)
 
 common-obj-y += dma-helpers.o
 common-obj-y += vl.o
bt-host.c deleted +0 -198

198 lines not on this page · raw message

bt-vhci.c deleted +0 -167

167 lines not on this page · raw message

configure +0 -31
index 2c72e04d23..84b413dbfc 100755
@@ -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"
-  ;;
   --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
 
@@ -6493,7 +6467,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"
@@ -6917,10 +6890,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
hw/Kconfig +0 -1
index b9685b3944..ecf491bf04 100644
@@ -4,7 +4,6 @@ source acpi/Kconfig
 source adc/Kconfig
 source audio/Kconfig
 source block/Kconfig
-source bt/Kconfig
 source char/Kconfig
 source core/Kconfig
 source display/Kconfig
hw/Makefile.objs +0 -1
index 66eef20561..660e2b4373 100644
@@ -5,7 +5,6 @@ devices-dirs-y += acpi/
 devices-dirs-y += adc/
 devices-dirs-y += audio/
 devices-dirs-y += block/
-devices-dirs-y += bt/
 devices-dirs-y += char/
 devices-dirs-y += cpu/
 devices-dirs-y += display/
hw/bt/Kconfig +0 -2
index 554a9ee75e..e69de29bb2 100644
@@ -1,2 +0,0 @@
-config BLUETOOTH
-    bool
hw/bt/Makefile.objs deleted +0 -3
deleted file mode 100644
index 867a7d2e8a..0000000000
@@ -1,3 +0,0 @@
-common-obj-y += core.o l2cap.o sdp.o hci.o hid.o
-common-obj-y += hci-csr.o
-
hw/bt/core.c deleted +0 -143

143 lines not on this page · raw message

hw/bt/hci-csr.c deleted +0 -512

512 lines not on this page · raw message

hw/bt/hci.c deleted +0 -2263

1,886 lines not on this page · raw message

hw/bt/hid.c deleted +0 -553

553 lines not on this page · raw message

hw/bt/l2cap.c deleted +0 -1367

1,367 lines not on this page · raw message

hw/bt/sdp.c deleted +0 -989

989 lines not on this page · raw message

include/hw/bt.h deleted +0 -2177

2,177 lines not on this page · raw message

include/sysemu/bt.h deleted +0 -20
deleted file mode 100644
index 2fd8c0f14b..0000000000

Lines of this file are not shown. View the raw message.

qemu-deprecated.texi +0 -7
index f909be56ae..62680f7bd5 100644

Lines of this file are not shown. View the raw message.

qemu-options.hx +0 -79

79 lines not on this page · raw message

vl.c +0 -136

136 lines not on this page · raw message

The rest of this diff is not shown. View the raw message.

Signature · 1 line
2.18.1

Part of the diff is not shown here. View the raw message.

#2 lore raw
In reply to Thomas Huth
Quoted 20 lines · Thomas Huth

Hi!

The following changes since commit cb88904a54903ef6ba21a68a61d9cd51e2166304:

Merge remote-tracking branch 'remotes/amarkovic/tags/mips-queue-dec-16-2019' into staging (2019-12-16 14:07:56 +0000)

are available in the Git repository at:

https://gitlab.com/huth/qemu.git tags/pull-request-2019-12-17

for you to fetch changes up to 0f555602c7430ae55b5a4bacf39ce9e483e11193:

tests: use g_test_rand_int (2019-12-17 09:05:23 +0100)

----------------------------------------------------------------
* Removal of the deprecated bluetooth code
* Some qtest and misc patches
----------------------------------------------------------------

Quoted 5 lines

v2: Unfortunately, I was not able to reproduce the build problem that
Peter reported for the v1 pull request. So I'm trying to work-around the issue now by leaving an empty hw/bt/Kconfig file around this time. I'll remove it by another patch later in a couple of weeks instead.

This passed without issues on all my build hosts, so your guess about it being down to the deletion of the Kconfig file must be right.

Applied, thanks.

Please update the changelog at https://wiki.qemu.org/ChangeLog/5.0
for any user-visible changes.

-- PMM