diff --git a/Kconfig.host b/Kconfig.host index faf58d9af513fa8f18882bf8ab0b04bd6fc67b57..e124f33231c1df784038b539918756306687433b 100644 --- a/Kconfig.host +++ b/Kconfig.host @@ -53,3 +53,6 @@ config VFIO_USER_SERVER_ALLOWED config HV_BALLOON_POSSIBLE bool + +config UB + bool diff --git a/hw/Kconfig b/hw/Kconfig index 9ca7b38c31f1a42a0a6f4262cb5a8e79464cac0b..c91c0ba0cc09d86086310dc682db6394e31ded35 100644 --- a/hw/Kconfig +++ b/hw/Kconfig @@ -44,6 +44,7 @@ source virtio/Kconfig source vfio/Kconfig source xen/Kconfig source watchdog/Kconfig +source ub/Kconfig # arch Kconfig source arm/Kconfig diff --git a/hw/meson.build b/hw/meson.build index f01fac4617c99a3cc567f84f84025f0597bb1ecb..51857f5613b721db50e9a7c2444d8878a89ea138 100644 --- a/hw/meson.build +++ b/hw/meson.build @@ -67,3 +67,4 @@ subdir('sparc') subdir('sparc64') subdir('tricore') subdir('xtensa') +subdir('ub') diff --git a/hw/ub/Kconfig b/hw/ub/Kconfig new file mode 100644 index 0000000000000000000000000000000000000000..df08fc61afe6654bbd63175b09751034518a9e15 --- /dev/null +++ b/hw/ub/Kconfig @@ -0,0 +1,3 @@ +config HW_UB + bool + default y if UB diff --git a/hw/ub/hisi/meson.build b/hw/ub/hisi/meson.build new file mode 100644 index 0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 diff --git a/hw/ub/hisi/trace-events b/hw/ub/hisi/trace-events new file mode 100644 index 0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 diff --git a/hw/ub/meson.build b/hw/ub/meson.build new file mode 100644 index 0000000000000000000000000000000000000000..21c3f0ea6c208b2c473af9746c698cedf681194a --- /dev/null +++ b/hw/ub/meson.build @@ -0,0 +1,5 @@ +ub_ss = ss.source_set() +ub_ss.add(files( +)) +system_ss.add_all(when: 'CONFIG_HW_UB', if_true: ub_ss) +subdir('hisi') diff --git a/hw/ub/trace-events b/hw/ub/trace-events new file mode 100644 index 0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 diff --git a/meson.build b/meson.build index d379a719273cf642a92ba2aebd731333cf6e557e..1dcfb794fa718b11c09c87fd6dcda14534964460 100644 --- a/meson.build +++ b/meson.build @@ -580,6 +580,11 @@ have_hugepage_pod = get_option('hugepage_pod') \ config_host_data.set('CONFIG_HUGEPAGE_POD', have_hugepage_pod) +# ub +have_ub = get_option('ub') \ + .require(targetos == 'linux', error_message: 'UB is supported only on Linux') \ + .allowed() + # vhost have_vhost_user = get_option('vhost_user') \ .disable_auto_if(targetos != 'linux') \ @@ -2287,6 +2292,7 @@ config_host_data.set('CONFIG_VHOST_NET_VDPA', have_vhost_net_vdpa) config_host_data.set('CONFIG_VHOST_KERNEL', have_vhost_kernel) config_host_data.set('CONFIG_VHOST_USER', have_vhost_user) config_host_data.set('CONFIG_VHOST_CRYPTO', have_vhost_user_crypto) +config_host_data.set('CONFIG_UB', have_ub) config_host_data.set('CONFIG_VHOST_VDPA', have_vhost_vdpa) config_host_data.set('CONFIG_VMNET', vmnet.found()) config_host_data.set('CONFIG_VHOST_USER_BLK_SERVER', have_vhost_user_blk_server) @@ -2999,6 +3005,7 @@ host_kconfig = \ (have_ivshmem ? ['CONFIG_IVSHMEM=y'] : []) + \ (opengl.found() ? ['CONFIG_OPENGL=y'] : []) + \ (x11.found() ? ['CONFIG_X11=y'] : []) + \ + (have_ub ? ['CONFIG_UB=y'] : []) + \ (have_vhost_user ? ['CONFIG_VHOST_USER=y'] : []) + \ (have_vhost_vdpa ? ['CONFIG_VHOST_VDPA=y'] : []) + \ (have_vhost_kernel ? ['CONFIG_VHOST_KERNEL=y'] : []) + \ @@ -3454,6 +3461,8 @@ if have_system 'system', 'ui', 'hw/remote', + 'hw/ub', + 'hw/ub/hisi' ] endif if have_system or have_user @@ -4226,6 +4235,7 @@ endif summary_info += {'D-Bus display': dbus_display} summary_info += {'QOM debugging': get_option('qom_cast_debug')} summary_info += {'Relocatable install': get_option('relocatable')} +summary_info += {'ub support': have_ub} summary_info += {'vhost-kernel support': have_vhost_kernel} summary_info += {'vhost-net support': have_vhost_net} summary_info += {'vhost-user support': have_vhost_user} diff --git a/meson_options.txt b/meson_options.txt index f446612ff6d6cdf200edf82fae86b16e1fc9e6c3..6152543e5d304e66bb9e896d1c9394f113ec1819 100644 --- a/meson_options.txt +++ b/meson_options.txt @@ -291,6 +291,9 @@ option('pipewire', type: 'feature', value: 'auto', option('sndio', type: 'feature', value: 'auto', description: 'sndio sound support') +option('ub', type: 'feature', value: 'auto', + description: 'unify bus support') + option('vhost_kernel', type: 'feature', value: 'auto', description: 'vhost kernel backend support') option('vhost_net', type: 'feature', value: 'auto', diff --git a/scripts/meson-buildoptions.sh b/scripts/meson-buildoptions.sh index 06f4f803c901becc62d9a2492bbd41adb110ccc1..7f8f043039e3489914dee1bc5da11837b8103327 100644 --- a/scripts/meson-buildoptions.sh +++ b/scripts/meson-buildoptions.sh @@ -52,6 +52,8 @@ meson_options_help() { printf "%s\n" ' Set available tracing backends [log] (choices:' printf "%s\n" ' dtrace/ftrace/log/nop/simple/syslog/ust)' printf "%s\n" ' --enable-tsan enable thread sanitizer' + printf "%s\n" ' --enable-ub enable unify bus' + printf "%s\n" ' --disable-ub disable unify bus' printf "%s\n" ' --firmwarepath=VALUES search PATH for firmware files [share/qemu-' printf "%s\n" ' firmware]' printf "%s\n" ' --iasl=VALUE Path to ACPI disassembler' @@ -189,6 +191,7 @@ meson_options_help() { printf "%s\n" ' tools build support utilities that come with QEMU' printf "%s\n" ' tpm TPM support' printf "%s\n" ' u2f U2F emulation support' + printf "%s\n" ' ub unify bus support' printf "%s\n" ' usb-redir libusbredir support' printf "%s\n" ' vde vde network backend support' printf "%s\n" ' vdi vdi image format support' @@ -513,6 +516,8 @@ _meson_option_parse() { --disable-tsan) printf "%s" -Dtsan=false ;; --enable-u2f) printf "%s" -Du2f=enabled ;; --disable-u2f) printf "%s" -Du2f=disabled ;; + --enable-ub) printf "%s" -Dub=enabled ;; + --disable-ub) printf "%s" -Dub=disabled ;; --enable-usb-redir) printf "%s" -Dusb_redir=enabled ;; --disable-usb-redir) printf "%s" -Dusb_redir=disabled ;; --enable-vde) printf "%s" -Dvde=enabled ;;