head 1.2; access; symbols pkgsrc-2021Q1:1.1.0.2 pkgsrc-2021Q1-base:1.1; locks; strict; comment @# @; 1.2 date 2021.04.08.15.43.17; author nia; state dead; branches; next 1.1; commitid WkyFrwYRG92okvOC; 1.1 date 2021.02.20.22.55.19; author ryoon; state Exp; branches; next ; commitid pthhkM7c2fZqevIC; desc @@ 1.2 log @Remove qemu51, nvmm patches, linux support etc were merged into qemu @ text @$NetBSD: patch-configure,v 1.1 2021/02/20 22:55:19 ryoon Exp $ Add NVMM support. Fix jemalloc detection. --- configure.orig 2020-08-11 19:17:15.000000000 +0000 +++ configure @@@@ -246,6 +246,17 @@@@ supported_whpx_target() { return 1 } +supported_nvmm_target() { + test "$nvmm" = "yes" || return 1 + glob "$1" "*-softmmu" || return 1 + case "${1%-softmmu}" in + i386|x86_64) + return 0 + ;; + esac + return 1 +} + supported_target() { case "$1" in *-softmmu) @@@@ -273,6 +284,7 @@@@ supported_target() { supported_hax_target "$1" && return 0 supported_hvf_target "$1" && return 0 supported_whpx_target "$1" && return 0 + supported_nvmm_target "$1" && return 0 print_error "TCG disabled, but hardware accelerator not available for '$target'" return 1 } @@@@ -395,6 +407,7 @@@@ kvm="no" hax="no" hvf="no" whpx="no" +nvmm="no" rdma="" pvrdma="" gprof="no" @@@@ -847,6 +860,7 @@@@ DragonFly) NetBSD) bsd="yes" hax="yes" + nvmm="" make="${MAKE-gmake}" audio_drv_list="oss try-sdl" audio_possible_drivers="oss sdl" @@@@ -1233,6 +1247,10 @@@@ for opt do ;; --enable-whpx) whpx="yes" ;; + --disable-nvmm) nvmm="no" + ;; + --enable-nvmm) nvmm="yes" + ;; --disable-tcg-interpreter) tcg_interpreter="no" ;; --enable-tcg-interpreter) tcg_interpreter="yes" @@@@ -1879,6 +1897,7 @@@@ disabled with --disable-FEATURE, default hax HAX acceleration support hvf Hypervisor.framework acceleration support whpx Windows Hypervisor Platform acceleration support + nvmm NetBSD Virtual Machine Monitor acceleration support rdma Enable RDMA-based migration pvrdma Enable PVRDMA support vde support for vde network @@@@ -2966,6 +2985,20 @@@@ if test "$whpx" != "no" ; then fi ########################################## +# NetBSD Virtual Machine Monitor (NVMM) accelerator check +if test "$nvmm" != "no" ; then + if check_include "nvmm.h" ; then + nvmm="yes" + LIBS="-lnvmm $LIBS" + else + if test "$nvmm" = "yes"; then + feature_not_found "NVMM" "NVMM is not available" + fi + nvmm="no" + fi +fi + +########################################## # Sparse probe if test "$sparse" != "no" ; then if has cgcc; then @@@@ -4736,8 +4769,11 @@@@ int main(void) { } EOF - if compile_prog "" "-ljemalloc" ; then - LIBS="-ljemalloc $LIBS" + jemalloc_cflags=$($pkg_config --cflags jemalloc) + jemalloc_libs=$($pkg_config --libs jemalloc) + if compile_prog "" "$jemalloc_libs" ; then + LIBS="$jemalloc_libs $LIBS" + QEMU_CFLAGS="$QEMU_CFLAGS $jemalloc_cflags" else feature_not_found "jemalloc" "install jemalloc devel" fi @@@@ -6934,6 +6970,7 @@@@ echo "KVM support $kvm" echo "HAX support $hax" echo "HVF support $hvf" echo "WHPX support $whpx" +echo "NVMM support $nvmm" echo "TCG support $tcg" if test "$tcg" = "yes" ; then echo "TCG debug enabled $debug_tcg" @@@@ -8332,6 +8369,9 @@@@ fi if test "$target_aligned_only" = "yes" ; then echo "TARGET_ALIGNED_ONLY=y" >> $config_target_mak fi +if supported_nvmm_target $target; then + echo "CONFIG_NVMM=y" >> $config_target_mak +fi if test "$target_bigendian" = "yes" ; then echo "TARGET_WORDS_BIGENDIAN=y" >> $config_target_mak fi @ 1.1 log @emulators/qemu51: import qemu-5.1.0nb13 QEMU is a FAST! processor emulator using dynamic translation to achieve good emulation speed, QEMU has two operating modes: * Full system emulation. In this mode, QEMU emulates a full system (for example a PC), including a processor and various peripherals. It can be used to launch different Operating Systems without rebooting the PC or to debug system code. * User mode emulation (Linux host only). In this mode, QEMU can launch Linux processes compiled for one CPU on another CPU. It can be used to launch the Wine Windows API emulator or to ease cross-compilation and cross-debugging. This package contains Qemu 5.1.0 with NetBSD NVMM support. @ text @d1 1 a1 1 $NetBSD: patch-configure,v 1.29 2020/08/12 18:31:27 ryoon Exp $ @