>>>>>>>>>>>
By default QEMU will use TCG (ie pure emulation), but it supports different possible hardware accelerators on different host OSes. The QEMU command line option "-accel help" will tell you which ones have been compiled into a particular QEMU binary, and you can use "-accel name-of-accelerator" to enable the one you want. Not all are available on all hosts. On Linux you can use KVM, and this is the oldest and best tested of the "use the host CPU's hardware virtualization support" accelerators. Also supported are "hax" (intel HAXM), "hvf" (macOS Hypervisor.framework), and "whpx" (Windows Hypervisor Platform).
In all cases(i.e hardware acceleration), the guest CPU architecture must be the same as the host CPU architecture (eg x86-on-x86, or arm-on-arm), and there must be specific support in QEMU for using a particular accelerator on the architecture you care about (for instance as of late 2020 we support Hypervisor.framework only for x86), and the accelerator itself might be host-OS specific (eg "whpx" is Windows hosts only).
<<<<<<<<<<<<<
lake@localhost:~/software/qemu-4.0.0$ ./configure --help |grep kvm
kvm KVM acceleration support
About QEMU System and User mode, Refer to Qemu2.x user mode/Ubuntu18 for Chroot/ARM qemu-user-static/CONFIG_BINFMT_MISC/Ubuntu/ARM/Rootfs_hushui的博客-CSDN博客
## build system mode only
./configure --target-list=aarch64-softmmu,arm-softmmu,x86_64-softmmu,i386-softmmu --enable-debug --enable-gtk --enable-vnc --prefix=$HOME/usr --disable-user
make
...
CC i386-softmmu/gdbstub-xml.o
CC i386-softmmu/trace/generated-helpers.o
LINK x86_64-softmmu/qemu-system-x86_64
LINK i386-softmmu/qemu-system-i386
jhula@ShSwDev2:~/tmp/qemu-4.2.0$ find . -name "qemu-system*"
./aarch64-softmmu/qemu-system-aarch64
./x86_64-softmmu/qemu-system-x86_64
./i386-softmmu/qemu-system-i386
./arm-softmmu/qemu-system-arm
### build system and user mod
qemu-4.0.0$ ./configure --target-list=aarch64-softmmu,arm-softmmu,x86_64-softmmu,i386-softmmu,aarch64-linux-user,arm-linux-user,i386-linux-user,x86_64-linux-user --enable-debug --enable-gtk --enable-vnc --prefix=$HOME/usr
Install prefix /home/lake/usr
BIOS directory /home/lake/usr/share/qemu
firmware path /home/lake/usr/share/qemu-firmware
binary directory /home/lake/usr/bin
library directory /home/lake/usr/lib
module directory /home/lake/usr/lib/qemu
libexec directory /home/lake/usr/libexec
include directory /home/lake/usr/include
config directory /home/lake/usr/etc
local state directory /home/lake/usr/var
Manual directory /home/lake/usr/share/man
ELF interp prefix /usr/gnemul/qemu-%M
Source path /home/lake/software/qemu-4.0.0
GIT binary git
GIT submodules
C compiler cc
Host C compiler cc
C++ compiler c++
Objective-C compiler clang
ARFLAGS rv
CFLAGS -g
QEMU_CFLAGS -I/usr/include/pixman-1 -I$(SRC_PATH)/dtc/libfdt -pthread -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include -fPIE -DPIE -m64 -mcx16 -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -Wstrict-prototypes -Wredundant-decls -Wall -Wundef -Wwrite-strings -Wmissing-prototypes -fno-strict-aliasing -fno-common -fwrapv -std=gnu99 -Wendif-labels -Wno-missing-include-dirs -Wempty-body -Wnested-externs -Wformat-security -Wformat-y2k -Winit-self -Wignored-qualifiers -Wold-style-declaration -Wold-style-definition -Wtype-limits -fstack-protector-strong -I/usr/include/libpng12 -I$(SRC_PATH)/capstone/include
LDFLAGS -Wl,--warn-common -Wl,-z,relro -Wl,-z,now -pie -m64 -g
QEMU_LDFLAGS -L$(BUILD_DIR)/dtc/libfdt
make make
install install
python python -B (2.7.12)
slirp support internal
smbd /usr/sbin/smbd
module support no
host CPU x86_64
host big endian no
target list aarch64-softmmu arm-softmmu aarch64-linux-user arm-linux-user i386-linux-user x86_64-linux-user
gprof enabled no
sparse enabled no
strip binaries no
profiler no
static build no
SDL support no
SDL image support no
GTK support yes (3.18.9)
GTK GL support no
VTE support no
TLS priority NORMAL
GNUTLS support no
libgcrypt no
nettle yes (3.2)
libtasn1 no
PAM no
iconv support yes
curses support no
virgl support no
curl support no
mingw32 support no
Audio drivers pa oss
Block whitelist (rw)
Block whitelist (ro)
VirtFS support yes
Multipath support no
VNC support yes
VNC SASL support no
VNC JPEG support no
VNC PNG support yes
xen support no
brlapi support no
bluez support no
Documentation no
PIE yes
vde support no
netmap support no
Linux AIO support no
ATTR/XATTR support yes
Install blobs yes
KVM support yes
HAX support no
HVF support no
WHPX support no
TCG support yes
TCG debug enabled yes
TCG interpreter no
malloc trim support yes
RDMA support no
PVRDMA support no
fdt support git
membarrier no
preadv support yes
fdatasync yes
madvise yes
posix_madvise yes
posix_memalign yes
libcap-ng support no
vhost-net support yes
vhost-crypto support yes
vhost-scsi support yes
vhost-vsock support yes
vhost-user support yes
Trace backends log
spice support no
rbd support no
xfsctl support no
smartcard support no
libusb no
usb net redir no
OpenGL support no
OpenGL dmabufs no
libiscsi support no
libnfs support no
build guest agent yes
QGA VSS support no
QGA w32 disk info no
QGA MSI support no
seccomp support no
coroutine backend ucontext
coroutine pool yes
debug stack usage no
mutex debugging yes
crypto afalg no
GlusterFS support no
gcov gcov
gcov enabled no
TPM support yes
libssh2 support no
TPM passthrough
TPM emulator
QOM debugging yes
Live block migration yes
lzo support no
snappy support no
bzip2 support yes
lzfse support no
NUMA host support yes
libxml2 no
tcmalloc support no
jemalloc support no
avx2 optimization yes
replication support yes
VxHS block device no
bochs support yes
cloop support yes
dmg support yes
qcow v1 support yes
vdi support yes
vvfat support yes
qed support yes
parallels support yes
sheepdog support yes
capstone internal
docker yes
libpmem support no
libudev no
default devices yes
NOTE: cross-compilers enabled: 'cc'