mirror of https://github.com/xemu-project/xemu.git
Testing and plugin updates:
- include vhost tests in qtest - clean-up gcov ephemera in clean/.gitignore - lcitool and docker updates - mention .editorconfig in devel notes - switch Centos8 to Centos Stream 8 - remove TCG tracing support - add coverage plugin using drcov format - expand abilities of libinsn.so plugin - use correct logging for i386 int cases - move reset of plugin data to start of block - deprecate ppc6432abi - fix TARGET_ABI_FMT_ptr for softmmu builds -----BEGIN PGP SIGNATURE----- iQEzBAABCgAdFiEEZoWumedRZ7yvyN81+9DbCVqeKkQFAmIDy/oACgkQ+9DbCVqe KkTZwgf9HZxHqR12DYjcJtgka2AD8d4GzpkNdKJprN6HVaISmZMvkEwmL8qAaVuK vXHM/ZdpMpm9vtGtPEI77nhE9414bVTiejpd/q0PeSBZTGT3QudN1C9qyjB3gJrQ Y8dgIGvf+IJDfUin8YAgpuR8ccDwBEBkLIOXaHdQBrWYyj7j4JbyWuI9jUHUybUK VPFnx97AqFRBrzWpzA2lhHTF/A6wxJsjaDt+JEXrjb9US8nKSzFEQY0L5AWlyAKs yGVCoVr+eKxGqGXIjM18fEy2SYqwr8Nr4EWPIBuhZjFpd0BP+q5ANvmCGS8F9IUF XJLmq2sYtZos8h5tjpxbmmnx7IZM/Q== =mfAN -----END PGP SIGNATURE----- Merge remote-tracking branch 'remotes/stsquad/tags/pull-testing-and-plugins-090222-1' into staging Testing and plugin updates: - include vhost tests in qtest - clean-up gcov ephemera in clean/.gitignore - lcitool and docker updates - mention .editorconfig in devel notes - switch Centos8 to Centos Stream 8 - remove TCG tracing support - add coverage plugin using drcov format - expand abilities of libinsn.so plugin - use correct logging for i386 int cases - move reset of plugin data to start of block - deprecate ppc6432abi - fix TARGET_ABI_FMT_ptr for softmmu builds # gpg: Signature made Wed 09 Feb 2022 14:13:14 GMT # gpg: using RSA key 6685AE99E75167BCAFC8DF35FBD0DB095A9E2A44 # gpg: Good signature from "Alex Bennée (Master Work Key) <alex.bennee@linaro.org>" [full] # Primary key fingerprint: 6685 AE99 E751 67BC AFC8 DF35 FBD0 DB09 5A9E 2A44 * remotes/stsquad/tags/pull-testing-and-plugins-090222-1: (28 commits) include/exec: fix softmmu version of TARGET_ABI_FMT_lx linux-user: Remove the deprecated ppc64abi32 target plugins: move reset of plugin data to tb_start target/i386: use CPU_LOG_INT for IRQ servicing tests/plugins: add instruction matching to libinsn.so tests/plugin: allow libinsn.so per-CPU counts contrib/plugins: add a drcov plugin plugins: add helper functions for coverage plugins tracing: excise the tcg related from tracetool tracing: remove the trace-tcg includes from the build tracing: remove TCG memory access tracing docs: remove references to TCG tracing tests/tcg/sh4: disable another unreliable test tests: Update CentOS 8 container to CentOS Stream 8 tests/lcitool: Allow lcitool-refresh in out-of-tree builds, too gitlab: fall back to commit hash in qemu-setup filename docs/devel: mention our .editorconfig tests/lcitool: Install libibumad to cover RDMA on Debian based distros tests: Manually remove libxml2 on MSYS2 runners tests/lcitool: Refresh submodule and remove libxml2 ... Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
This commit is contained in:
commit
da36afa2d8
|
@ -32,7 +32,6 @@ windows_msys2_task:
|
||||||
mingw-w64-x86_64-libgcrypt
|
mingw-w64-x86_64-libgcrypt
|
||||||
mingw-w64-x86_64-libpng
|
mingw-w64-x86_64-libpng
|
||||||
mingw-w64-x86_64-libssh
|
mingw-w64-x86_64-libssh
|
||||||
mingw-w64-x86_64-libxml2
|
|
||||||
mingw-w64-x86_64-snappy
|
mingw-w64-x86_64-snappy
|
||||||
mingw-w64-x86_64-libusb
|
mingw-w64-x86_64-libusb
|
||||||
mingw-w64-x86_64-usbredir
|
mingw-w64-x86_64-usbredir
|
||||||
|
|
|
@ -15,3 +15,4 @@ GTAGS
|
||||||
*.depend_raw
|
*.depend_raw
|
||||||
*.swp
|
*.swp
|
||||||
*.patch
|
*.patch
|
||||||
|
*.gcov
|
||||||
|
|
|
@ -473,33 +473,6 @@ tsan-build:
|
||||||
TARGETS: x86_64-softmmu ppc64-softmmu riscv64-softmmu x86_64-linux-user
|
TARGETS: x86_64-softmmu ppc64-softmmu riscv64-softmmu x86_64-linux-user
|
||||||
MAKE_CHECK_ARGS: bench V=1
|
MAKE_CHECK_ARGS: bench V=1
|
||||||
|
|
||||||
# These targets are on the way out
|
|
||||||
build-deprecated:
|
|
||||||
extends: .native_build_job_template
|
|
||||||
needs:
|
|
||||||
job: amd64-debian-user-cross-container
|
|
||||||
variables:
|
|
||||||
IMAGE: debian-all-test-cross
|
|
||||||
CONFIGURE_ARGS: --disable-tools
|
|
||||||
MAKE_CHECK_ARGS: build-tcg
|
|
||||||
TARGETS: ppc64abi32-linux-user
|
|
||||||
artifacts:
|
|
||||||
expire_in: 2 days
|
|
||||||
paths:
|
|
||||||
- build
|
|
||||||
|
|
||||||
# We split the check-tcg step as test failures are expected but we still
|
|
||||||
# want to catch the build breaking.
|
|
||||||
check-deprecated:
|
|
||||||
extends: .native_test_job_template
|
|
||||||
needs:
|
|
||||||
- job: build-deprecated
|
|
||||||
artifacts: true
|
|
||||||
variables:
|
|
||||||
IMAGE: debian-all-test-cross
|
|
||||||
MAKE_CHECK_ARGS: check-tcg
|
|
||||||
allow_failure: true
|
|
||||||
|
|
||||||
# gprof/gcov are GCC features
|
# gprof/gcov are GCC features
|
||||||
build-gprof-gcov:
|
build-gprof-gcov:
|
||||||
extends: .native_build_job_template
|
extends: .native_build_job_template
|
||||||
|
|
|
@ -11,6 +11,6 @@ MAKE='/usr/local/bin/gmake'
|
||||||
NINJA='/usr/local/bin/ninja'
|
NINJA='/usr/local/bin/ninja'
|
||||||
PACKAGING_COMMAND='pkg'
|
PACKAGING_COMMAND='pkg'
|
||||||
PIP3='/usr/local/bin/pip-3.8'
|
PIP3='/usr/local/bin/pip-3.8'
|
||||||
PKGS='alsa-lib bash bzip2 ca_root_nss capstone4 ccache cdrkit-genisoimage ctags curl cyrus-sasl dbus diffutils dtc gettext git glib gmake gnutls gsed gtk3 libepoxy libffi libgcrypt libjpeg-turbo libnfs libspice-server libssh libtasn1 libxml2 llvm lttng-ust lzo2 meson ncurses nettle ninja opencv p5-Test-Harness perl5 pixman pkgconf png py38-numpy py38-pillow py38-pip py38-sphinx py38-sphinx_rtd_theme py38-virtualenv py38-yaml python3 rpm2cpio sdl2 sdl2_image snappy spice-protocol tesseract texinfo usbredir virglrenderer vte3 zstd'
|
PKGS='alsa-lib bash bzip2 ca_root_nss capstone4 ccache cdrkit-genisoimage ctags curl cyrus-sasl dbus diffutils dtc fusefs-libs3 gettext git glib gmake gnutls gsed gtk3 libepoxy libffi libgcrypt libjpeg-turbo libnfs libspice-server libssh libtasn1 llvm lzo2 meson ncurses nettle ninja opencv p5-Test-Harness perl5 pixman pkgconf png py38-numpy py38-pillow py38-pip py38-sphinx py38-sphinx_rtd_theme py38-virtualenv py38-yaml python3 rpm2cpio sdl2 sdl2_image snappy spice-protocol tesseract texinfo usbredir virglrenderer vte3 zstd'
|
||||||
PYPI_PKGS=''
|
PYPI_PKGS=''
|
||||||
PYTHON='/usr/local/bin/python3'
|
PYTHON='/usr/local/bin/python3'
|
||||||
|
|
|
@ -11,6 +11,6 @@ MAKE='/usr/local/bin/gmake'
|
||||||
NINJA='/usr/local/bin/ninja'
|
NINJA='/usr/local/bin/ninja'
|
||||||
PACKAGING_COMMAND='pkg'
|
PACKAGING_COMMAND='pkg'
|
||||||
PIP3='/usr/local/bin/pip-3.8'
|
PIP3='/usr/local/bin/pip-3.8'
|
||||||
PKGS='alsa-lib bash bzip2 ca_root_nss capstone4 ccache cdrkit-genisoimage ctags curl cyrus-sasl dbus diffutils dtc gettext git glib gmake gnutls gsed gtk3 libepoxy libffi libgcrypt libjpeg-turbo libnfs libspice-server libssh libtasn1 libxml2 llvm lttng-ust lzo2 meson ncurses nettle ninja opencv p5-Test-Harness perl5 pixman pkgconf png py38-numpy py38-pillow py38-pip py38-sphinx py38-sphinx_rtd_theme py38-virtualenv py38-yaml python3 rpm2cpio sdl2 sdl2_image snappy spice-protocol tesseract texinfo usbredir virglrenderer vte3 zstd'
|
PKGS='alsa-lib bash bzip2 ca_root_nss capstone4 ccache cdrkit-genisoimage ctags curl cyrus-sasl dbus diffutils dtc fusefs-libs3 gettext git glib gmake gnutls gsed gtk3 libepoxy libffi libgcrypt libjpeg-turbo libnfs libspice-server libssh libtasn1 llvm lzo2 meson ncurses nettle ninja opencv p5-Test-Harness perl5 pixman pkgconf png py38-numpy py38-pillow py38-pip py38-sphinx py38-sphinx_rtd_theme py38-virtualenv py38-yaml python3 rpm2cpio sdl2 sdl2_image snappy spice-protocol tesseract texinfo usbredir virglrenderer vte3 zstd'
|
||||||
PYPI_PKGS=''
|
PYPI_PKGS=''
|
||||||
PYTHON='/usr/local/bin/python3'
|
PYTHON='/usr/local/bin/python3'
|
||||||
|
|
|
@ -11,6 +11,6 @@ MAKE='/usr/local/bin/gmake'
|
||||||
NINJA='/usr/local/bin/ninja'
|
NINJA='/usr/local/bin/ninja'
|
||||||
PACKAGING_COMMAND='brew'
|
PACKAGING_COMMAND='brew'
|
||||||
PIP3='/usr/local/bin/pip3'
|
PIP3='/usr/local/bin/pip3'
|
||||||
PKGS='bash bc bzip2 capstone ccache cpanminus ctags curl dbus diffutils dtc gcovr gettext git glib gnu-sed gnutls gtk+3 jemalloc jpeg-turbo libepoxy libffi libgcrypt libiscsi libnfs libpng libslirp libssh libtasn1 libusb libxml2 llvm lzo make meson ncurses nettle ninja perl pixman pkg-config python3 rpm2cpio sdl2 sdl2_image snappy sparse spice-protocol tesseract texinfo usbredir vde vte3 zlib zstd'
|
PKGS='bash bc bzip2 capstone ccache cpanminus ctags curl dbus diffutils dtc gcovr gettext git glib gnu-sed gnutls gtk+3 jemalloc jpeg-turbo libepoxy libffi libgcrypt libiscsi libnfs libpng libslirp libssh libtasn1 libusb llvm lzo make meson ncurses nettle ninja perl pixman pkg-config python3 rpm2cpio sdl2 sdl2_image snappy sparse spice-protocol tesseract texinfo usbredir vde vte3 zlib zstd'
|
||||||
PYPI_PKGS='PyYAML numpy pillow sphinx sphinx-rtd-theme virtualenv'
|
PYPI_PKGS='PyYAML numpy pillow sphinx sphinx-rtd-theme virtualenv'
|
||||||
PYTHON='/usr/local/bin/python3'
|
PYTHON='/usr/local/bin/python3'
|
||||||
|
|
|
@ -14,7 +14,7 @@
|
||||||
- make -j$(expr $(nproc) + 1) all check-build $MAKE_CHECK_ARGS
|
- make -j$(expr $(nproc) + 1) all check-build $MAKE_CHECK_ARGS
|
||||||
- if grep -q "EXESUF=.exe" config-host.mak;
|
- if grep -q "EXESUF=.exe" config-host.mak;
|
||||||
then make installer;
|
then make installer;
|
||||||
version="$(git describe --match v[0-9]*)";
|
version="$(git describe --match v[0-9]* 2>/dev/null || git rev-parse --short HEAD)";
|
||||||
mv -v qemu-setup*.exe qemu-setup-${version}.exe;
|
mv -v qemu-setup*.exe qemu-setup-${version}.exe;
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
|
@ -44,7 +44,6 @@ msys2-64bit:
|
||||||
mingw-w64-x86_64-libssh
|
mingw-w64-x86_64-libssh
|
||||||
mingw-w64-x86_64-libtasn1
|
mingw-w64-x86_64-libtasn1
|
||||||
mingw-w64-x86_64-libusb
|
mingw-w64-x86_64-libusb
|
||||||
mingw-w64-x86_64-libxml2
|
|
||||||
mingw-w64-x86_64-nettle
|
mingw-w64-x86_64-nettle
|
||||||
mingw-w64-x86_64-ninja
|
mingw-w64-x86_64-ninja
|
||||||
mingw-w64-x86_64-pixman
|
mingw-w64-x86_64-pixman
|
||||||
|
@ -80,7 +79,6 @@ msys2-32bit:
|
||||||
mingw-w64-i686-libssh
|
mingw-w64-i686-libssh
|
||||||
mingw-w64-i686-libtasn1
|
mingw-w64-i686-libtasn1
|
||||||
mingw-w64-i686-libusb
|
mingw-w64-i686-libusb
|
||||||
mingw-w64-i686-libxml2
|
|
||||||
mingw-w64-i686-lzo2
|
mingw-w64-i686-lzo2
|
||||||
mingw-w64-i686-ninja
|
mingw-w64-i686-ninja
|
||||||
mingw-w64-i686-pixman
|
mingw-w64-i686-pixman
|
||||||
|
|
|
@ -66,4 +66,4 @@
|
||||||
url = https://gitlab.com/qemu-project/vbootrom.git
|
url = https://gitlab.com/qemu-project/vbootrom.git
|
||||||
[submodule "tests/lcitool/libvirt-ci"]
|
[submodule "tests/lcitool/libvirt-ci"]
|
||||||
path = tests/lcitool/libvirt-ci
|
path = tests/lcitool/libvirt-ci
|
||||||
url = http://gitlab.com/libvirt/libvirt-ci
|
url = https://gitlab.com/libvirt/libvirt-ci.git
|
||||||
|
|
|
@ -3585,6 +3585,7 @@ F: .travis.yml
|
||||||
F: scripts/ci/
|
F: scripts/ci/
|
||||||
F: tests/docker/
|
F: tests/docker/
|
||||||
F: tests/vm/
|
F: tests/vm/
|
||||||
|
F: tests/lcitool/
|
||||||
F: scripts/archive-source.sh
|
F: scripts/archive-source.sh
|
||||||
W: https://gitlab.com/qemu-project/qemu/pipelines
|
W: https://gitlab.com/qemu-project/qemu/pipelines
|
||||||
W: https://travis-ci.org/qemu/qemu
|
W: https://travis-ci.org/qemu/qemu
|
||||||
|
|
3
Makefile
3
Makefile
|
@ -206,7 +206,8 @@ recurse-clean: $(addsuffix /clean, $(ROM_DIRS))
|
||||||
clean: recurse-clean
|
clean: recurse-clean
|
||||||
-$(quiet-@)test -f build.ninja && $(NINJA) $(NINJAFLAGS) -t clean || :
|
-$(quiet-@)test -f build.ninja && $(NINJA) $(NINJAFLAGS) -t clean || :
|
||||||
-$(quiet-@)test -f build.ninja && $(NINJA) $(NINJAFLAGS) clean-ctlist || :
|
-$(quiet-@)test -f build.ninja && $(NINJA) $(NINJAFLAGS) clean-ctlist || :
|
||||||
find . \( -name '*.so' -o -name '*.dll' -o -name '*.[oda]' \) -type f \
|
find . \( -name '*.so' -o -name '*.dll' -o \
|
||||||
|
-name '*.[oda]' -o -name '*.gcno' \) -type f \
|
||||||
! -path ./roms/edk2/ArmPkg/Library/GccLto/liblto-aarch64.a \
|
! -path ./roms/edk2/ArmPkg/Library/GccLto/liblto-aarch64.a \
|
||||||
! -path ./roms/edk2/ArmPkg/Library/GccLto/liblto-arm.a \
|
! -path ./roms/edk2/ArmPkg/Library/GccLto/liblto-arm.a \
|
||||||
-exec rm {} +
|
-exec rm {} +
|
||||||
|
|
|
@ -13,14 +13,6 @@
|
||||||
* See the COPYING file in the top-level directory.
|
* See the COPYING file in the top-level directory.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
static void atomic_trace_rmw_pre(CPUArchState *env, target_ulong addr,
|
|
||||||
MemOpIdx oi)
|
|
||||||
{
|
|
||||||
CPUState *cpu = env_cpu(env);
|
|
||||||
|
|
||||||
trace_guest_rmw_before_exec(cpu, addr, oi);
|
|
||||||
}
|
|
||||||
|
|
||||||
static void atomic_trace_rmw_post(CPUArchState *env, target_ulong addr,
|
static void atomic_trace_rmw_post(CPUArchState *env, target_ulong addr,
|
||||||
MemOpIdx oi)
|
MemOpIdx oi)
|
||||||
{
|
{
|
||||||
|
@ -28,24 +20,12 @@ static void atomic_trace_rmw_post(CPUArchState *env, target_ulong addr,
|
||||||
}
|
}
|
||||||
|
|
||||||
#if HAVE_ATOMIC128
|
#if HAVE_ATOMIC128
|
||||||
static void atomic_trace_ld_pre(CPUArchState *env, target_ulong addr,
|
|
||||||
MemOpIdx oi)
|
|
||||||
{
|
|
||||||
trace_guest_ld_before_exec(env_cpu(env), addr, oi);
|
|
||||||
}
|
|
||||||
|
|
||||||
static void atomic_trace_ld_post(CPUArchState *env, target_ulong addr,
|
static void atomic_trace_ld_post(CPUArchState *env, target_ulong addr,
|
||||||
MemOpIdx oi)
|
MemOpIdx oi)
|
||||||
{
|
{
|
||||||
qemu_plugin_vcpu_mem_cb(env_cpu(env), addr, oi, QEMU_PLUGIN_MEM_R);
|
qemu_plugin_vcpu_mem_cb(env_cpu(env), addr, oi, QEMU_PLUGIN_MEM_R);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void atomic_trace_st_pre(CPUArchState *env, target_ulong addr,
|
|
||||||
MemOpIdx oi)
|
|
||||||
{
|
|
||||||
trace_guest_st_before_exec(env_cpu(env), addr, oi);
|
|
||||||
}
|
|
||||||
|
|
||||||
static void atomic_trace_st_post(CPUArchState *env, target_ulong addr,
|
static void atomic_trace_st_post(CPUArchState *env, target_ulong addr,
|
||||||
MemOpIdx oi)
|
MemOpIdx oi)
|
||||||
{
|
{
|
||||||
|
|
|
@ -77,7 +77,6 @@ ABI_TYPE ATOMIC_NAME(cmpxchg)(CPUArchState *env, target_ulong addr,
|
||||||
PAGE_READ | PAGE_WRITE, retaddr);
|
PAGE_READ | PAGE_WRITE, retaddr);
|
||||||
DATA_TYPE ret;
|
DATA_TYPE ret;
|
||||||
|
|
||||||
atomic_trace_rmw_pre(env, addr, oi);
|
|
||||||
#if DATA_SIZE == 16
|
#if DATA_SIZE == 16
|
||||||
ret = atomic16_cmpxchg(haddr, cmpv, newv);
|
ret = atomic16_cmpxchg(haddr, cmpv, newv);
|
||||||
#else
|
#else
|
||||||
|
@ -97,7 +96,6 @@ ABI_TYPE ATOMIC_NAME(ld)(CPUArchState *env, target_ulong addr,
|
||||||
PAGE_READ, retaddr);
|
PAGE_READ, retaddr);
|
||||||
DATA_TYPE val;
|
DATA_TYPE val;
|
||||||
|
|
||||||
atomic_trace_ld_pre(env, addr, oi);
|
|
||||||
val = atomic16_read(haddr);
|
val = atomic16_read(haddr);
|
||||||
ATOMIC_MMU_CLEANUP;
|
ATOMIC_MMU_CLEANUP;
|
||||||
atomic_trace_ld_post(env, addr, oi);
|
atomic_trace_ld_post(env, addr, oi);
|
||||||
|
@ -110,7 +108,6 @@ void ATOMIC_NAME(st)(CPUArchState *env, target_ulong addr, ABI_TYPE val,
|
||||||
DATA_TYPE *haddr = atomic_mmu_lookup(env, addr, oi, DATA_SIZE,
|
DATA_TYPE *haddr = atomic_mmu_lookup(env, addr, oi, DATA_SIZE,
|
||||||
PAGE_WRITE, retaddr);
|
PAGE_WRITE, retaddr);
|
||||||
|
|
||||||
atomic_trace_st_pre(env, addr, oi);
|
|
||||||
atomic16_set(haddr, val);
|
atomic16_set(haddr, val);
|
||||||
ATOMIC_MMU_CLEANUP;
|
ATOMIC_MMU_CLEANUP;
|
||||||
atomic_trace_st_post(env, addr, oi);
|
atomic_trace_st_post(env, addr, oi);
|
||||||
|
@ -124,7 +121,6 @@ ABI_TYPE ATOMIC_NAME(xchg)(CPUArchState *env, target_ulong addr, ABI_TYPE val,
|
||||||
PAGE_READ | PAGE_WRITE, retaddr);
|
PAGE_READ | PAGE_WRITE, retaddr);
|
||||||
DATA_TYPE ret;
|
DATA_TYPE ret;
|
||||||
|
|
||||||
atomic_trace_rmw_pre(env, addr, oi);
|
|
||||||
ret = qatomic_xchg__nocheck(haddr, val);
|
ret = qatomic_xchg__nocheck(haddr, val);
|
||||||
ATOMIC_MMU_CLEANUP;
|
ATOMIC_MMU_CLEANUP;
|
||||||
atomic_trace_rmw_post(env, addr, oi);
|
atomic_trace_rmw_post(env, addr, oi);
|
||||||
|
@ -138,7 +134,6 @@ ABI_TYPE ATOMIC_NAME(X)(CPUArchState *env, target_ulong addr, \
|
||||||
DATA_TYPE *haddr = atomic_mmu_lookup(env, addr, oi, DATA_SIZE, \
|
DATA_TYPE *haddr = atomic_mmu_lookup(env, addr, oi, DATA_SIZE, \
|
||||||
PAGE_READ | PAGE_WRITE, retaddr); \
|
PAGE_READ | PAGE_WRITE, retaddr); \
|
||||||
DATA_TYPE ret; \
|
DATA_TYPE ret; \
|
||||||
atomic_trace_rmw_pre(env, addr, oi); \
|
|
||||||
ret = qatomic_##X(haddr, val); \
|
ret = qatomic_##X(haddr, val); \
|
||||||
ATOMIC_MMU_CLEANUP; \
|
ATOMIC_MMU_CLEANUP; \
|
||||||
atomic_trace_rmw_post(env, addr, oi); \
|
atomic_trace_rmw_post(env, addr, oi); \
|
||||||
|
@ -171,7 +166,6 @@ ABI_TYPE ATOMIC_NAME(X)(CPUArchState *env, target_ulong addr, \
|
||||||
XDATA_TYPE *haddr = atomic_mmu_lookup(env, addr, oi, DATA_SIZE, \
|
XDATA_TYPE *haddr = atomic_mmu_lookup(env, addr, oi, DATA_SIZE, \
|
||||||
PAGE_READ | PAGE_WRITE, retaddr); \
|
PAGE_READ | PAGE_WRITE, retaddr); \
|
||||||
XDATA_TYPE cmp, old, new, val = xval; \
|
XDATA_TYPE cmp, old, new, val = xval; \
|
||||||
atomic_trace_rmw_pre(env, addr, oi); \
|
|
||||||
smp_mb(); \
|
smp_mb(); \
|
||||||
cmp = qatomic_read__nocheck(haddr); \
|
cmp = qatomic_read__nocheck(haddr); \
|
||||||
do { \
|
do { \
|
||||||
|
@ -216,7 +210,6 @@ ABI_TYPE ATOMIC_NAME(cmpxchg)(CPUArchState *env, target_ulong addr,
|
||||||
PAGE_READ | PAGE_WRITE, retaddr);
|
PAGE_READ | PAGE_WRITE, retaddr);
|
||||||
DATA_TYPE ret;
|
DATA_TYPE ret;
|
||||||
|
|
||||||
atomic_trace_rmw_pre(env, addr, oi);
|
|
||||||
#if DATA_SIZE == 16
|
#if DATA_SIZE == 16
|
||||||
ret = atomic16_cmpxchg(haddr, BSWAP(cmpv), BSWAP(newv));
|
ret = atomic16_cmpxchg(haddr, BSWAP(cmpv), BSWAP(newv));
|
||||||
#else
|
#else
|
||||||
|
@ -236,7 +229,6 @@ ABI_TYPE ATOMIC_NAME(ld)(CPUArchState *env, target_ulong addr,
|
||||||
PAGE_READ, retaddr);
|
PAGE_READ, retaddr);
|
||||||
DATA_TYPE val;
|
DATA_TYPE val;
|
||||||
|
|
||||||
atomic_trace_ld_pre(env, addr, oi);
|
|
||||||
val = atomic16_read(haddr);
|
val = atomic16_read(haddr);
|
||||||
ATOMIC_MMU_CLEANUP;
|
ATOMIC_MMU_CLEANUP;
|
||||||
atomic_trace_ld_post(env, addr, oi);
|
atomic_trace_ld_post(env, addr, oi);
|
||||||
|
@ -249,7 +241,6 @@ void ATOMIC_NAME(st)(CPUArchState *env, target_ulong addr, ABI_TYPE val,
|
||||||
DATA_TYPE *haddr = atomic_mmu_lookup(env, addr, oi, DATA_SIZE,
|
DATA_TYPE *haddr = atomic_mmu_lookup(env, addr, oi, DATA_SIZE,
|
||||||
PAGE_WRITE, retaddr);
|
PAGE_WRITE, retaddr);
|
||||||
|
|
||||||
atomic_trace_st_pre(env, addr, oi);
|
|
||||||
val = BSWAP(val);
|
val = BSWAP(val);
|
||||||
atomic16_set(haddr, val);
|
atomic16_set(haddr, val);
|
||||||
ATOMIC_MMU_CLEANUP;
|
ATOMIC_MMU_CLEANUP;
|
||||||
|
@ -264,7 +255,6 @@ ABI_TYPE ATOMIC_NAME(xchg)(CPUArchState *env, target_ulong addr, ABI_TYPE val,
|
||||||
PAGE_READ | PAGE_WRITE, retaddr);
|
PAGE_READ | PAGE_WRITE, retaddr);
|
||||||
ABI_TYPE ret;
|
ABI_TYPE ret;
|
||||||
|
|
||||||
atomic_trace_rmw_pre(env, addr, oi);
|
|
||||||
ret = qatomic_xchg__nocheck(haddr, BSWAP(val));
|
ret = qatomic_xchg__nocheck(haddr, BSWAP(val));
|
||||||
ATOMIC_MMU_CLEANUP;
|
ATOMIC_MMU_CLEANUP;
|
||||||
atomic_trace_rmw_post(env, addr, oi);
|
atomic_trace_rmw_post(env, addr, oi);
|
||||||
|
@ -278,7 +268,6 @@ ABI_TYPE ATOMIC_NAME(X)(CPUArchState *env, target_ulong addr, \
|
||||||
DATA_TYPE *haddr = atomic_mmu_lookup(env, addr, oi, DATA_SIZE, \
|
DATA_TYPE *haddr = atomic_mmu_lookup(env, addr, oi, DATA_SIZE, \
|
||||||
PAGE_READ | PAGE_WRITE, retaddr); \
|
PAGE_READ | PAGE_WRITE, retaddr); \
|
||||||
DATA_TYPE ret; \
|
DATA_TYPE ret; \
|
||||||
atomic_trace_rmw_pre(env, addr, oi); \
|
|
||||||
ret = qatomic_##X(haddr, BSWAP(val)); \
|
ret = qatomic_##X(haddr, BSWAP(val)); \
|
||||||
ATOMIC_MMU_CLEANUP; \
|
ATOMIC_MMU_CLEANUP; \
|
||||||
atomic_trace_rmw_post(env, addr, oi); \
|
atomic_trace_rmw_post(env, addr, oi); \
|
||||||
|
@ -308,7 +297,6 @@ ABI_TYPE ATOMIC_NAME(X)(CPUArchState *env, target_ulong addr, \
|
||||||
XDATA_TYPE *haddr = atomic_mmu_lookup(env, addr, oi, DATA_SIZE, \
|
XDATA_TYPE *haddr = atomic_mmu_lookup(env, addr, oi, DATA_SIZE, \
|
||||||
PAGE_READ | PAGE_WRITE, retaddr); \
|
PAGE_READ | PAGE_WRITE, retaddr); \
|
||||||
XDATA_TYPE ldo, ldn, old, new, val = xval; \
|
XDATA_TYPE ldo, ldn, old, new, val = xval; \
|
||||||
atomic_trace_rmw_pre(env, addr, oi); \
|
|
||||||
smp_mb(); \
|
smp_mb(); \
|
||||||
ldn = qatomic_read__nocheck(haddr); \
|
ldn = qatomic_read__nocheck(haddr); \
|
||||||
do { \
|
do { \
|
||||||
|
|
|
@ -2140,7 +2140,6 @@ static inline uint64_t cpu_load_helper(CPUArchState *env, abi_ptr addr,
|
||||||
{
|
{
|
||||||
uint64_t ret;
|
uint64_t ret;
|
||||||
|
|
||||||
trace_guest_ld_before_exec(env_cpu(env), addr, oi);
|
|
||||||
ret = full_load(env, addr, oi, retaddr);
|
ret = full_load(env, addr, oi, retaddr);
|
||||||
qemu_plugin_vcpu_mem_cb(env_cpu(env), addr, oi, QEMU_PLUGIN_MEM_R);
|
qemu_plugin_vcpu_mem_cb(env_cpu(env), addr, oi, QEMU_PLUGIN_MEM_R);
|
||||||
return ret;
|
return ret;
|
||||||
|
@ -2487,7 +2486,6 @@ static inline void cpu_store_helper(CPUArchState *env, target_ulong addr,
|
||||||
uint64_t val, MemOpIdx oi, uintptr_t ra,
|
uint64_t val, MemOpIdx oi, uintptr_t ra,
|
||||||
FullStoreHelper *full_store)
|
FullStoreHelper *full_store)
|
||||||
{
|
{
|
||||||
trace_guest_st_before_exec(env_cpu(env), addr, oi);
|
|
||||||
full_store(env, addr, val, oi, ra);
|
full_store(env, addr, val, oi, ra);
|
||||||
qemu_plugin_vcpu_mem_cb(env_cpu(env), addr, oi, QEMU_PLUGIN_MEM_W);
|
qemu_plugin_vcpu_mem_cb(env_cpu(env), addr, oi, QEMU_PLUGIN_MEM_W);
|
||||||
}
|
}
|
||||||
|
|
|
@ -854,10 +854,20 @@ static void plugin_gen_inject(const struct qemu_plugin_tb *plugin_tb)
|
||||||
|
|
||||||
bool plugin_gen_tb_start(CPUState *cpu, const TranslationBlock *tb, bool mem_only)
|
bool plugin_gen_tb_start(CPUState *cpu, const TranslationBlock *tb, bool mem_only)
|
||||||
{
|
{
|
||||||
struct qemu_plugin_tb *ptb = tcg_ctx->plugin_tb;
|
|
||||||
bool ret = false;
|
bool ret = false;
|
||||||
|
|
||||||
if (test_bit(QEMU_PLUGIN_EV_VCPU_TB_TRANS, cpu->plugin_mask)) {
|
if (test_bit(QEMU_PLUGIN_EV_VCPU_TB_TRANS, cpu->plugin_mask)) {
|
||||||
|
struct qemu_plugin_tb *ptb = tcg_ctx->plugin_tb;
|
||||||
|
int i;
|
||||||
|
|
||||||
|
/* reset callbacks */
|
||||||
|
for (i = 0; i < PLUGIN_N_CB_SUBTYPES; i++) {
|
||||||
|
if (ptb->cbs[i]) {
|
||||||
|
g_array_set_size(ptb->cbs[i], 0);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
ptb->n = 0;
|
||||||
|
|
||||||
ret = true;
|
ret = true;
|
||||||
|
|
||||||
ptb->vaddr = tb->pc;
|
ptb->vaddr = tb->pc;
|
||||||
|
@ -868,6 +878,9 @@ bool plugin_gen_tb_start(CPUState *cpu, const TranslationBlock *tb, bool mem_onl
|
||||||
|
|
||||||
plugin_gen_empty_callback(PLUGIN_GEN_FROM_TB);
|
plugin_gen_empty_callback(PLUGIN_GEN_FROM_TB);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
tcg_ctx->plugin_insn = NULL;
|
||||||
|
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -904,23 +917,19 @@ void plugin_gen_insn_end(void)
|
||||||
plugin_gen_empty_callback(PLUGIN_GEN_AFTER_INSN);
|
plugin_gen_empty_callback(PLUGIN_GEN_AFTER_INSN);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
* There are cases where we never get to finalise a translation - for
|
||||||
|
* example a page fault during translation. As a result we shouldn't
|
||||||
|
* do any clean-up here and make sure things are reset in
|
||||||
|
* plugin_gen_tb_start.
|
||||||
|
*/
|
||||||
void plugin_gen_tb_end(CPUState *cpu)
|
void plugin_gen_tb_end(CPUState *cpu)
|
||||||
{
|
{
|
||||||
struct qemu_plugin_tb *ptb = tcg_ctx->plugin_tb;
|
struct qemu_plugin_tb *ptb = tcg_ctx->plugin_tb;
|
||||||
int i;
|
|
||||||
|
|
||||||
/* collect instrumentation requests */
|
/* collect instrumentation requests */
|
||||||
qemu_plugin_tb_trans_cb(cpu, ptb);
|
qemu_plugin_tb_trans_cb(cpu, ptb);
|
||||||
|
|
||||||
/* inject the instrumentation at the appropriate places */
|
/* inject the instrumentation at the appropriate places */
|
||||||
plugin_gen_inject(ptb);
|
plugin_gen_inject(ptb);
|
||||||
|
|
||||||
/* clean up */
|
|
||||||
for (i = 0; i < PLUGIN_N_CB_SUBTYPES; i++) {
|
|
||||||
if (ptb->cbs[i]) {
|
|
||||||
g_array_set_size(ptb->cbs[i], 0);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
ptb->n = 0;
|
|
||||||
tcg_ctx->plugin_insn = NULL;
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -250,7 +250,6 @@ uint8_t cpu_ldb_mmu(CPUArchState *env, abi_ptr addr,
|
||||||
uint8_t ret;
|
uint8_t ret;
|
||||||
|
|
||||||
validate_memop(oi, MO_UB);
|
validate_memop(oi, MO_UB);
|
||||||
trace_guest_ld_before_exec(env_cpu(env), addr, oi);
|
|
||||||
haddr = cpu_mmu_lookup(env, addr, oi, ra, MMU_DATA_LOAD);
|
haddr = cpu_mmu_lookup(env, addr, oi, ra, MMU_DATA_LOAD);
|
||||||
ret = ldub_p(haddr);
|
ret = ldub_p(haddr);
|
||||||
clear_helper_retaddr();
|
clear_helper_retaddr();
|
||||||
|
@ -265,7 +264,6 @@ uint16_t cpu_ldw_be_mmu(CPUArchState *env, abi_ptr addr,
|
||||||
uint16_t ret;
|
uint16_t ret;
|
||||||
|
|
||||||
validate_memop(oi, MO_BEUW);
|
validate_memop(oi, MO_BEUW);
|
||||||
trace_guest_ld_before_exec(env_cpu(env), addr, oi);
|
|
||||||
haddr = cpu_mmu_lookup(env, addr, oi, ra, MMU_DATA_LOAD);
|
haddr = cpu_mmu_lookup(env, addr, oi, ra, MMU_DATA_LOAD);
|
||||||
ret = lduw_be_p(haddr);
|
ret = lduw_be_p(haddr);
|
||||||
clear_helper_retaddr();
|
clear_helper_retaddr();
|
||||||
|
@ -280,7 +278,6 @@ uint32_t cpu_ldl_be_mmu(CPUArchState *env, abi_ptr addr,
|
||||||
uint32_t ret;
|
uint32_t ret;
|
||||||
|
|
||||||
validate_memop(oi, MO_BEUL);
|
validate_memop(oi, MO_BEUL);
|
||||||
trace_guest_ld_before_exec(env_cpu(env), addr, oi);
|
|
||||||
haddr = cpu_mmu_lookup(env, addr, oi, ra, MMU_DATA_LOAD);
|
haddr = cpu_mmu_lookup(env, addr, oi, ra, MMU_DATA_LOAD);
|
||||||
ret = ldl_be_p(haddr);
|
ret = ldl_be_p(haddr);
|
||||||
clear_helper_retaddr();
|
clear_helper_retaddr();
|
||||||
|
@ -295,7 +292,6 @@ uint64_t cpu_ldq_be_mmu(CPUArchState *env, abi_ptr addr,
|
||||||
uint64_t ret;
|
uint64_t ret;
|
||||||
|
|
||||||
validate_memop(oi, MO_BEUQ);
|
validate_memop(oi, MO_BEUQ);
|
||||||
trace_guest_ld_before_exec(env_cpu(env), addr, oi);
|
|
||||||
haddr = cpu_mmu_lookup(env, addr, oi, ra, MMU_DATA_LOAD);
|
haddr = cpu_mmu_lookup(env, addr, oi, ra, MMU_DATA_LOAD);
|
||||||
ret = ldq_be_p(haddr);
|
ret = ldq_be_p(haddr);
|
||||||
clear_helper_retaddr();
|
clear_helper_retaddr();
|
||||||
|
@ -310,7 +306,6 @@ uint16_t cpu_ldw_le_mmu(CPUArchState *env, abi_ptr addr,
|
||||||
uint16_t ret;
|
uint16_t ret;
|
||||||
|
|
||||||
validate_memop(oi, MO_LEUW);
|
validate_memop(oi, MO_LEUW);
|
||||||
trace_guest_ld_before_exec(env_cpu(env), addr, oi);
|
|
||||||
haddr = cpu_mmu_lookup(env, addr, oi, ra, MMU_DATA_LOAD);
|
haddr = cpu_mmu_lookup(env, addr, oi, ra, MMU_DATA_LOAD);
|
||||||
ret = lduw_le_p(haddr);
|
ret = lduw_le_p(haddr);
|
||||||
clear_helper_retaddr();
|
clear_helper_retaddr();
|
||||||
|
@ -325,7 +320,6 @@ uint32_t cpu_ldl_le_mmu(CPUArchState *env, abi_ptr addr,
|
||||||
uint32_t ret;
|
uint32_t ret;
|
||||||
|
|
||||||
validate_memop(oi, MO_LEUL);
|
validate_memop(oi, MO_LEUL);
|
||||||
trace_guest_ld_before_exec(env_cpu(env), addr, oi);
|
|
||||||
haddr = cpu_mmu_lookup(env, addr, oi, ra, MMU_DATA_LOAD);
|
haddr = cpu_mmu_lookup(env, addr, oi, ra, MMU_DATA_LOAD);
|
||||||
ret = ldl_le_p(haddr);
|
ret = ldl_le_p(haddr);
|
||||||
clear_helper_retaddr();
|
clear_helper_retaddr();
|
||||||
|
@ -340,7 +334,6 @@ uint64_t cpu_ldq_le_mmu(CPUArchState *env, abi_ptr addr,
|
||||||
uint64_t ret;
|
uint64_t ret;
|
||||||
|
|
||||||
validate_memop(oi, MO_LEUQ);
|
validate_memop(oi, MO_LEUQ);
|
||||||
trace_guest_ld_before_exec(env_cpu(env), addr, oi);
|
|
||||||
haddr = cpu_mmu_lookup(env, addr, oi, ra, MMU_DATA_LOAD);
|
haddr = cpu_mmu_lookup(env, addr, oi, ra, MMU_DATA_LOAD);
|
||||||
ret = ldq_le_p(haddr);
|
ret = ldq_le_p(haddr);
|
||||||
clear_helper_retaddr();
|
clear_helper_retaddr();
|
||||||
|
@ -354,7 +347,6 @@ void cpu_stb_mmu(CPUArchState *env, abi_ptr addr, uint8_t val,
|
||||||
void *haddr;
|
void *haddr;
|
||||||
|
|
||||||
validate_memop(oi, MO_UB);
|
validate_memop(oi, MO_UB);
|
||||||
trace_guest_st_before_exec(env_cpu(env), addr, oi);
|
|
||||||
haddr = cpu_mmu_lookup(env, addr, oi, ra, MMU_DATA_STORE);
|
haddr = cpu_mmu_lookup(env, addr, oi, ra, MMU_DATA_STORE);
|
||||||
stb_p(haddr, val);
|
stb_p(haddr, val);
|
||||||
clear_helper_retaddr();
|
clear_helper_retaddr();
|
||||||
|
@ -367,7 +359,6 @@ void cpu_stw_be_mmu(CPUArchState *env, abi_ptr addr, uint16_t val,
|
||||||
void *haddr;
|
void *haddr;
|
||||||
|
|
||||||
validate_memop(oi, MO_BEUW);
|
validate_memop(oi, MO_BEUW);
|
||||||
trace_guest_st_before_exec(env_cpu(env), addr, oi);
|
|
||||||
haddr = cpu_mmu_lookup(env, addr, oi, ra, MMU_DATA_STORE);
|
haddr = cpu_mmu_lookup(env, addr, oi, ra, MMU_DATA_STORE);
|
||||||
stw_be_p(haddr, val);
|
stw_be_p(haddr, val);
|
||||||
clear_helper_retaddr();
|
clear_helper_retaddr();
|
||||||
|
@ -380,7 +371,6 @@ void cpu_stl_be_mmu(CPUArchState *env, abi_ptr addr, uint32_t val,
|
||||||
void *haddr;
|
void *haddr;
|
||||||
|
|
||||||
validate_memop(oi, MO_BEUL);
|
validate_memop(oi, MO_BEUL);
|
||||||
trace_guest_st_before_exec(env_cpu(env), addr, oi);
|
|
||||||
haddr = cpu_mmu_lookup(env, addr, oi, ra, MMU_DATA_STORE);
|
haddr = cpu_mmu_lookup(env, addr, oi, ra, MMU_DATA_STORE);
|
||||||
stl_be_p(haddr, val);
|
stl_be_p(haddr, val);
|
||||||
clear_helper_retaddr();
|
clear_helper_retaddr();
|
||||||
|
@ -393,7 +383,6 @@ void cpu_stq_be_mmu(CPUArchState *env, abi_ptr addr, uint64_t val,
|
||||||
void *haddr;
|
void *haddr;
|
||||||
|
|
||||||
validate_memop(oi, MO_BEUQ);
|
validate_memop(oi, MO_BEUQ);
|
||||||
trace_guest_st_before_exec(env_cpu(env), addr, oi);
|
|
||||||
haddr = cpu_mmu_lookup(env, addr, oi, ra, MMU_DATA_STORE);
|
haddr = cpu_mmu_lookup(env, addr, oi, ra, MMU_DATA_STORE);
|
||||||
stq_be_p(haddr, val);
|
stq_be_p(haddr, val);
|
||||||
clear_helper_retaddr();
|
clear_helper_retaddr();
|
||||||
|
@ -406,7 +395,6 @@ void cpu_stw_le_mmu(CPUArchState *env, abi_ptr addr, uint16_t val,
|
||||||
void *haddr;
|
void *haddr;
|
||||||
|
|
||||||
validate_memop(oi, MO_LEUW);
|
validate_memop(oi, MO_LEUW);
|
||||||
trace_guest_st_before_exec(env_cpu(env), addr, oi);
|
|
||||||
haddr = cpu_mmu_lookup(env, addr, oi, ra, MMU_DATA_STORE);
|
haddr = cpu_mmu_lookup(env, addr, oi, ra, MMU_DATA_STORE);
|
||||||
stw_le_p(haddr, val);
|
stw_le_p(haddr, val);
|
||||||
clear_helper_retaddr();
|
clear_helper_retaddr();
|
||||||
|
@ -419,7 +407,6 @@ void cpu_stl_le_mmu(CPUArchState *env, abi_ptr addr, uint32_t val,
|
||||||
void *haddr;
|
void *haddr;
|
||||||
|
|
||||||
validate_memop(oi, MO_LEUL);
|
validate_memop(oi, MO_LEUL);
|
||||||
trace_guest_st_before_exec(env_cpu(env), addr, oi);
|
|
||||||
haddr = cpu_mmu_lookup(env, addr, oi, ra, MMU_DATA_STORE);
|
haddr = cpu_mmu_lookup(env, addr, oi, ra, MMU_DATA_STORE);
|
||||||
stl_le_p(haddr, val);
|
stl_le_p(haddr, val);
|
||||||
clear_helper_retaddr();
|
clear_helper_retaddr();
|
||||||
|
@ -432,7 +419,6 @@ void cpu_stq_le_mmu(CPUArchState *env, abi_ptr addr, uint64_t val,
|
||||||
void *haddr;
|
void *haddr;
|
||||||
|
|
||||||
validate_memop(oi, MO_LEUQ);
|
validate_memop(oi, MO_LEUQ);
|
||||||
trace_guest_st_before_exec(env_cpu(env), addr, oi);
|
|
||||||
haddr = cpu_mmu_lookup(env, addr, oi, ra, MMU_DATA_STORE);
|
haddr = cpu_mmu_lookup(env, addr, oi, ra, MMU_DATA_STORE);
|
||||||
stq_le_p(haddr, val);
|
stq_le_p(haddr, val);
|
||||||
clear_helper_retaddr();
|
clear_helper_retaddr();
|
||||||
|
|
|
@ -58,8 +58,7 @@ block_ss.add(when: 'CONFIG_QED', if_true: files(
|
||||||
'qed-table.c',
|
'qed-table.c',
|
||||||
'qed.c',
|
'qed.c',
|
||||||
))
|
))
|
||||||
block_ss.add(when: [libxml2, 'CONFIG_PARALLELS'],
|
block_ss.add(when: 'CONFIG_PARALLELS', if_true: files('parallels.c', 'parallels-ext.c'))
|
||||||
if_true: files('parallels.c', 'parallels-ext.c'))
|
|
||||||
block_ss.add(when: 'CONFIG_WIN32', if_true: files('file-win32.c', 'win32-aio.c'))
|
block_ss.add(when: 'CONFIG_WIN32', if_true: files('file-win32.c', 'win32-aio.c'))
|
||||||
block_ss.add(when: 'CONFIG_POSIX', if_true: [files('file-posix.c'), coref, iokit])
|
block_ss.add(when: 'CONFIG_POSIX', if_true: [files('file-posix.c'), coref, iokit])
|
||||||
block_ss.add(when: libiscsi, if_true: files('iscsi-opts.c'))
|
block_ss.add(when: libiscsi, if_true: files('iscsi-opts.c'))
|
||||||
|
|
|
@ -1,8 +0,0 @@
|
||||||
TARGET_ARCH=ppc64
|
|
||||||
TARGET_ABI32=y
|
|
||||||
TARGET_BASE_ARCH=ppc
|
|
||||||
TARGET_ABI_DIR=ppc
|
|
||||||
TARGET_SYSTBL_ABI=common,nospu,32
|
|
||||||
TARGET_SYSTBL=syscall.tbl
|
|
||||||
TARGET_WORDS_BIGENDIAN=y
|
|
||||||
TARGET_XML_FILES= gdb-xml/power64-core.xml gdb-xml/power-fpu.xml gdb-xml/power-altivec.xml gdb-xml/power-spe.xml gdb-xml/power-vsx.xml
|
|
|
@ -1252,8 +1252,6 @@ if eval test -z "\${cross_cc_$cpu}"; then
|
||||||
fi
|
fi
|
||||||
|
|
||||||
default_target_list=""
|
default_target_list=""
|
||||||
deprecated_targets_list=ppc64abi32-linux-user
|
|
||||||
deprecated_features=""
|
|
||||||
mak_wilds=""
|
mak_wilds=""
|
||||||
|
|
||||||
if [ "$linux_user" != no ]; then
|
if [ "$linux_user" != no ]; then
|
||||||
|
@ -1281,16 +1279,6 @@ if [ "$bsd_user" = "yes" ]; then
|
||||||
mak_wilds="${mak_wilds} $source_path/configs/targets/*-bsd-user.mak"
|
mak_wilds="${mak_wilds} $source_path/configs/targets/*-bsd-user.mak"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# If the user doesn't explicitly specify a deprecated target we will
|
|
||||||
# skip it.
|
|
||||||
if test -z "$target_list"; then
|
|
||||||
if test -z "$target_list_exclude"; then
|
|
||||||
target_list_exclude="$deprecated_targets_list"
|
|
||||||
else
|
|
||||||
target_list_exclude="$target_list_exclude,$deprecated_targets_list"
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
|
|
||||||
for config in $mak_wilds; do
|
for config in $mak_wilds; do
|
||||||
target="$(basename "$config" .mak)"
|
target="$(basename "$config" .mak)"
|
||||||
if echo "$target_list_exclude" | grep -vq "$target"; then
|
if echo "$target_list_exclude" | grep -vq "$target"; then
|
||||||
|
@ -1309,11 +1297,9 @@ Standard options:
|
||||||
--prefix=PREFIX install in PREFIX [$prefix]
|
--prefix=PREFIX install in PREFIX [$prefix]
|
||||||
--interp-prefix=PREFIX where to find shared libraries, etc.
|
--interp-prefix=PREFIX where to find shared libraries, etc.
|
||||||
use %M for cpu name [$interp_prefix]
|
use %M for cpu name [$interp_prefix]
|
||||||
--target-list=LIST set target list (default: build all non-deprecated)
|
--target-list=LIST set target list (default: build all)
|
||||||
$(echo Available targets: $default_target_list | \
|
$(echo Available targets: $default_target_list | \
|
||||||
fold -s -w 53 | sed -e 's/^/ /')
|
fold -s -w 53 | sed -e 's/^/ /')
|
||||||
$(echo Deprecated targets: $deprecated_targets_list | \
|
|
||||||
fold -s -w 53 | sed -e 's/^/ /')
|
|
||||||
--target-list-exclude=LIST exclude a set of targets from the default target-list
|
--target-list-exclude=LIST exclude a set of targets from the default target-list
|
||||||
|
|
||||||
Advanced options (experts only):
|
Advanced options (experts only):
|
||||||
|
@ -1797,13 +1783,6 @@ else
|
||||||
done
|
done
|
||||||
fi
|
fi
|
||||||
|
|
||||||
for target in $target_list; do
|
|
||||||
# if a deprecated target is enabled we note it here
|
|
||||||
if echo "$deprecated_targets_list" | grep -q "$target"; then
|
|
||||||
add_to deprecated_features $target
|
|
||||||
fi
|
|
||||||
done
|
|
||||||
|
|
||||||
# see if system emulation was really requested
|
# see if system emulation was really requested
|
||||||
case " $target_list " in
|
case " $target_list " in
|
||||||
*"-softmmu "*) softmmu=yes
|
*"-softmmu "*) softmmu=yes
|
||||||
|
@ -3830,12 +3809,6 @@ else
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if test -n "${deprecated_features}"; then
|
|
||||||
echo "Warning, deprecated features enabled."
|
|
||||||
echo "Please see docs/about/deprecated.rst"
|
|
||||||
echo " features: ${deprecated_features}"
|
|
||||||
fi
|
|
||||||
|
|
||||||
# Save the configure command line for later reuse.
|
# Save the configure command line for later reuse.
|
||||||
cat <<EOD >config.status
|
cat <<EOD >config.status
|
||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
|
|
|
@ -20,6 +20,7 @@ NAMES += howvec
|
||||||
NAMES += lockstep
|
NAMES += lockstep
|
||||||
NAMES += hwprofile
|
NAMES += hwprofile
|
||||||
NAMES += cache
|
NAMES += cache
|
||||||
|
NAMES += drcov
|
||||||
|
|
||||||
SONAMES := $(addsuffix .so,$(addprefix lib,$(NAMES)))
|
SONAMES := $(addsuffix .so,$(addprefix lib,$(NAMES)))
|
||||||
|
|
||||||
|
|
|
@ -0,0 +1,163 @@
|
||||||
|
/*
|
||||||
|
* Copyright (C) 2021, Ivanov Arkady <arkadiy.ivanov@ispras.ru>
|
||||||
|
*
|
||||||
|
* Drcov - a DynamoRIO-based tool that collects coverage information
|
||||||
|
* from a binary. Primary goal this script is to have coverage log
|
||||||
|
* files that work in Lighthouse.
|
||||||
|
*
|
||||||
|
* License: GNU GPL, version 2 or later.
|
||||||
|
* See the COPYING file in the top-level directory.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#include <inttypes.h>
|
||||||
|
#include <assert.h>
|
||||||
|
#include <stdlib.h>
|
||||||
|
#include <inttypes.h>
|
||||||
|
#include <string.h>
|
||||||
|
#include <unistd.h>
|
||||||
|
#include <stdio.h>
|
||||||
|
#include <glib.h>
|
||||||
|
|
||||||
|
#include <qemu-plugin.h>
|
||||||
|
|
||||||
|
QEMU_PLUGIN_EXPORT int qemu_plugin_version = QEMU_PLUGIN_VERSION;
|
||||||
|
|
||||||
|
static char header[] = "DRCOV VERSION: 2\n"
|
||||||
|
"DRCOV FLAVOR: drcov-64\n"
|
||||||
|
"Module Table: version 2, count 1\n"
|
||||||
|
"Columns: id, base, end, entry, path\n";
|
||||||
|
|
||||||
|
static FILE *fp;
|
||||||
|
static const char *file_name = "file.drcov.trace";
|
||||||
|
static GMutex lock;
|
||||||
|
|
||||||
|
typedef struct {
|
||||||
|
uint32_t start;
|
||||||
|
uint16_t size;
|
||||||
|
uint16_t mod_id;
|
||||||
|
bool exec;
|
||||||
|
} bb_entry_t;
|
||||||
|
|
||||||
|
/* Translated blocks */
|
||||||
|
static GPtrArray *blocks;
|
||||||
|
|
||||||
|
static void printf_header(unsigned long count)
|
||||||
|
{
|
||||||
|
fprintf(fp, "%s", header);
|
||||||
|
const char *path = qemu_plugin_path_to_binary();
|
||||||
|
uint64_t start_code = qemu_plugin_start_code();
|
||||||
|
uint64_t end_code = qemu_plugin_end_code();
|
||||||
|
uint64_t entry = qemu_plugin_entry_code();
|
||||||
|
fprintf(fp, "0, 0x%lx, 0x%lx, 0x%lx, %s\n",
|
||||||
|
start_code, end_code, entry, path);
|
||||||
|
fprintf(fp, "BB Table: %ld bbs\n", count);
|
||||||
|
}
|
||||||
|
|
||||||
|
static void printf_char_array32(uint32_t data)
|
||||||
|
{
|
||||||
|
const uint8_t *bytes = (const uint8_t *)(&data);
|
||||||
|
fwrite(bytes, sizeof(char), sizeof(data), fp);
|
||||||
|
}
|
||||||
|
|
||||||
|
static void printf_char_array16(uint16_t data)
|
||||||
|
{
|
||||||
|
const uint8_t *bytes = (const uint8_t *)(&data);
|
||||||
|
fwrite(bytes, sizeof(char), sizeof(data), fp);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
static void printf_el(gpointer data, gpointer user_data)
|
||||||
|
{
|
||||||
|
bb_entry_t *bb = (bb_entry_t *)data;
|
||||||
|
if (bb->exec) {
|
||||||
|
printf_char_array32(bb->start);
|
||||||
|
printf_char_array16(bb->size);
|
||||||
|
printf_char_array16(bb->mod_id);
|
||||||
|
}
|
||||||
|
g_free(bb);
|
||||||
|
}
|
||||||
|
|
||||||
|
static void count_block(gpointer data, gpointer user_data)
|
||||||
|
{
|
||||||
|
unsigned long *count = (unsigned long *) user_data;
|
||||||
|
bb_entry_t *bb = (bb_entry_t *)data;
|
||||||
|
if (bb->exec) {
|
||||||
|
*count = *count + 1;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
static void plugin_exit(qemu_plugin_id_t id, void *p)
|
||||||
|
{
|
||||||
|
unsigned long count = 0;
|
||||||
|
g_mutex_lock(&lock);
|
||||||
|
g_ptr_array_foreach(blocks, count_block, &count);
|
||||||
|
|
||||||
|
/* Print function */
|
||||||
|
printf_header(count);
|
||||||
|
g_ptr_array_foreach(blocks, printf_el, NULL);
|
||||||
|
|
||||||
|
/* Clear */
|
||||||
|
g_ptr_array_free(blocks, true);
|
||||||
|
|
||||||
|
fclose(fp);
|
||||||
|
|
||||||
|
g_mutex_unlock(&lock);
|
||||||
|
}
|
||||||
|
|
||||||
|
static void plugin_init(void)
|
||||||
|
{
|
||||||
|
fp = fopen(file_name, "wb");
|
||||||
|
blocks = g_ptr_array_sized_new(128);
|
||||||
|
}
|
||||||
|
|
||||||
|
static void vcpu_tb_exec(unsigned int cpu_index, void *udata)
|
||||||
|
{
|
||||||
|
bb_entry_t *bb = (bb_entry_t *) udata;
|
||||||
|
|
||||||
|
g_mutex_lock(&lock);
|
||||||
|
bb->exec = true;
|
||||||
|
g_mutex_unlock(&lock);
|
||||||
|
}
|
||||||
|
|
||||||
|
static void vcpu_tb_trans(qemu_plugin_id_t id, struct qemu_plugin_tb *tb)
|
||||||
|
{
|
||||||
|
uint64_t pc = qemu_plugin_tb_vaddr(tb);
|
||||||
|
size_t n = qemu_plugin_tb_n_insns(tb);
|
||||||
|
|
||||||
|
g_mutex_lock(&lock);
|
||||||
|
|
||||||
|
bb_entry_t *bb = g_new0(bb_entry_t, 1);
|
||||||
|
for (int i = 0; i < n; i++) {
|
||||||
|
bb->size += qemu_plugin_insn_size(qemu_plugin_tb_get_insn(tb, i));
|
||||||
|
}
|
||||||
|
|
||||||
|
bb->start = pc;
|
||||||
|
bb->mod_id = 0;
|
||||||
|
bb->exec = false;
|
||||||
|
g_ptr_array_add(blocks, bb);
|
||||||
|
|
||||||
|
g_mutex_unlock(&lock);
|
||||||
|
qemu_plugin_register_vcpu_tb_exec_cb(tb, vcpu_tb_exec,
|
||||||
|
QEMU_PLUGIN_CB_NO_REGS,
|
||||||
|
(void *)bb);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
QEMU_PLUGIN_EXPORT
|
||||||
|
int qemu_plugin_install(qemu_plugin_id_t id, const qemu_info_t *info,
|
||||||
|
int argc, char **argv)
|
||||||
|
{
|
||||||
|
for (int i = 0; i < argc; i++) {
|
||||||
|
g_autofree char **tokens = g_strsplit(argv[i], "=", 2);
|
||||||
|
if (g_strcmp0(tokens[0], "filename") == 0) {
|
||||||
|
file_name = g_strdup(tokens[1]);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
plugin_init();
|
||||||
|
|
||||||
|
qemu_plugin_register_vcpu_tb_trans_cb(id, vcpu_tb_trans);
|
||||||
|
qemu_plugin_register_atexit_cb(id, plugin_exit, NULL);
|
||||||
|
|
||||||
|
return 0;
|
||||||
|
}
|
|
@ -403,13 +403,6 @@ The above, converted to the current supported format::
|
||||||
linux-user mode CPUs
|
linux-user mode CPUs
|
||||||
--------------------
|
--------------------
|
||||||
|
|
||||||
``ppc64abi32`` CPUs (since 5.2)
|
|
||||||
'''''''''''''''''''''''''''''''
|
|
||||||
|
|
||||||
The ``ppc64abi32`` architecture has a number of issues which regularly
|
|
||||||
trip up our CI testing and is suspected to be quite broken. For that
|
|
||||||
reason the maintainers strongly suspect no one actually uses it.
|
|
||||||
|
|
||||||
MIPS ``I7200`` CPU (since 5.2)
|
MIPS ``I7200`` CPU (since 5.2)
|
||||||
''''''''''''''''''''''''''''''
|
''''''''''''''''''''''''''''''
|
||||||
|
|
||||||
|
|
|
@ -601,6 +601,27 @@ the upstream Linux kernel in 2018, and it has also been dropped from glibc, so
|
||||||
there is no new Linux development taking place with this architecture. For
|
there is no new Linux development taking place with this architecture. For
|
||||||
running the old binaries, you can use older versions of QEMU.
|
running the old binaries, you can use older versions of QEMU.
|
||||||
|
|
||||||
|
``ppc64abi32`` CPUs (removed in 7.0)
|
||||||
|
''''''''''''''''''''''''''''''''''''
|
||||||
|
|
||||||
|
The ``ppc64abi32`` architecture has a number of issues which regularly
|
||||||
|
tripped up the CI testing and was suspected to be quite broken. For that
|
||||||
|
reason the maintainers strongly suspected no one actually used it.
|
||||||
|
|
||||||
|
|
||||||
|
TCG introspection features
|
||||||
|
--------------------------
|
||||||
|
|
||||||
|
TCG trace-events (since 6.2)
|
||||||
|
''''''''''''''''''''''''''''
|
||||||
|
|
||||||
|
The ability to add new TCG trace points had bit rotted and as the
|
||||||
|
feature can be replicated with TCG plugins it was removed. If
|
||||||
|
any user is currently using this feature and needs help with
|
||||||
|
converting to using TCG plugins they should contact the qemu-devel
|
||||||
|
mailing list.
|
||||||
|
|
||||||
|
|
||||||
System emulator devices
|
System emulator devices
|
||||||
-----------------------
|
-----------------------
|
||||||
|
|
||||||
|
|
|
@ -12,6 +12,10 @@ patches before submitting.
|
||||||
Formatting and style
|
Formatting and style
|
||||||
********************
|
********************
|
||||||
|
|
||||||
|
The repository includes a ``.editorconfig`` file which can help with
|
||||||
|
getting the right settings for your preferred $EDITOR. See
|
||||||
|
`<https://editorconfig.org/>`_ for details.
|
||||||
|
|
||||||
Whitespace
|
Whitespace
|
||||||
==========
|
==========
|
||||||
|
|
||||||
|
|
|
@ -413,88 +413,3 @@ disabled, this check will have no performance impact.
|
||||||
return ptr;
|
return ptr;
|
||||||
}
|
}
|
||||||
|
|
||||||
"tcg"
|
|
||||||
-----
|
|
||||||
|
|
||||||
Guest code generated by TCG can be traced by defining an event with the "tcg"
|
|
||||||
event property. Internally, this property generates two events:
|
|
||||||
"<eventname>_trans" to trace the event at translation time, and
|
|
||||||
"<eventname>_exec" to trace the event at execution time.
|
|
||||||
|
|
||||||
Instead of using these two events, you should instead use the function
|
|
||||||
"trace_<eventname>_tcg" during translation (TCG code generation). This function
|
|
||||||
will automatically call "trace_<eventname>_trans", and will generate the
|
|
||||||
necessary TCG code to call "trace_<eventname>_exec" during guest code execution.
|
|
||||||
|
|
||||||
Events with the "tcg" property can be declared in the "trace-events" file with a
|
|
||||||
mix of native and TCG types, and "trace_<eventname>_tcg" will gracefully forward
|
|
||||||
them to the "<eventname>_trans" and "<eventname>_exec" events. Since TCG values
|
|
||||||
are not known at translation time, these are ignored by the "<eventname>_trans"
|
|
||||||
event. Because of this, the entry in the "trace-events" file needs two printing
|
|
||||||
formats (separated by a comma)::
|
|
||||||
|
|
||||||
tcg foo(uint8_t a1, TCGv_i32 a2) "a1=%d", "a1=%d a2=%d"
|
|
||||||
|
|
||||||
For example::
|
|
||||||
|
|
||||||
#include "trace-tcg.h"
|
|
||||||
|
|
||||||
void some_disassembly_func (...)
|
|
||||||
{
|
|
||||||
uint8_t a1 = ...;
|
|
||||||
TCGv_i32 a2 = ...;
|
|
||||||
trace_foo_tcg(a1, a2);
|
|
||||||
}
|
|
||||||
|
|
||||||
This will immediately call::
|
|
||||||
|
|
||||||
void trace_foo_trans(uint8_t a1);
|
|
||||||
|
|
||||||
and will generate the TCG code to call::
|
|
||||||
|
|
||||||
void trace_foo(uint8_t a1, uint32_t a2);
|
|
||||||
|
|
||||||
"vcpu"
|
|
||||||
------
|
|
||||||
|
|
||||||
Identifies events that trace vCPU-specific information. It implicitly adds a
|
|
||||||
"CPUState*" argument, and extends the tracing print format to show the vCPU
|
|
||||||
information. If used together with the "tcg" property, it adds a second
|
|
||||||
"TCGv_env" argument that must point to the per-target global TCG register that
|
|
||||||
points to the vCPU when guest code is executed (usually the "cpu_env" variable).
|
|
||||||
|
|
||||||
The "tcg" and "vcpu" properties are currently only honored in the root
|
|
||||||
./trace-events file.
|
|
||||||
|
|
||||||
The following example events::
|
|
||||||
|
|
||||||
foo(uint32_t a) "a=%x"
|
|
||||||
vcpu bar(uint32_t a) "a=%x"
|
|
||||||
tcg vcpu baz(uint32_t a) "a=%x", "a=%x"
|
|
||||||
|
|
||||||
Can be used as::
|
|
||||||
|
|
||||||
#include "trace-tcg.h"
|
|
||||||
|
|
||||||
CPUArchState *env;
|
|
||||||
TCGv_ptr cpu_env;
|
|
||||||
|
|
||||||
void some_disassembly_func(...)
|
|
||||||
{
|
|
||||||
/* trace emitted at this point */
|
|
||||||
trace_foo(0xd1);
|
|
||||||
/* trace emitted at this point */
|
|
||||||
trace_bar(env_cpu(env), 0xd2);
|
|
||||||
/* trace emitted at this point (env) and when guest code is executed (cpu_env) */
|
|
||||||
trace_baz_tcg(env_cpu(env), cpu_env, 0xd3);
|
|
||||||
}
|
|
||||||
|
|
||||||
If the translating vCPU has address 0xc1 and code is later executed by vCPU
|
|
||||||
0xc2, this would be an example output::
|
|
||||||
|
|
||||||
// at guest code translation
|
|
||||||
foo a=0xd1
|
|
||||||
bar cpu=0xc1 a=0xd2
|
|
||||||
baz_trans cpu=0xc1 a=0xd3
|
|
||||||
// at guest code execution
|
|
||||||
baz_exec cpu=0xc2 a=0xd3
|
|
||||||
|
|
|
@ -166,7 +166,6 @@ Other binaries
|
||||||
|
|
||||||
- user mode (PowerPC)
|
- user mode (PowerPC)
|
||||||
|
|
||||||
* ``qemu-ppc64abi32`` TODO.
|
|
||||||
* ``qemu-ppc64`` TODO.
|
* ``qemu-ppc64`` TODO.
|
||||||
* ``qemu-ppc`` TODO.
|
* ``qemu-ppc`` TODO.
|
||||||
|
|
||||||
|
|
|
@ -121,7 +121,7 @@ static inline bool guest_range_valid_untagged(abi_ulong start, abi_ulong len)
|
||||||
})
|
})
|
||||||
#else
|
#else
|
||||||
typedef target_ulong abi_ptr;
|
typedef target_ulong abi_ptr;
|
||||||
#define TARGET_ABI_FMT_ptr TARGET_ABI_FMT_lx
|
#define TARGET_ABI_FMT_ptr TARGET_FMT_lx
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
uint32_t cpu_ldub_data(CPUArchState *env, abi_ptr ptr);
|
uint32_t cpu_ldub_data(CPUArchState *env, abi_ptr ptr);
|
||||||
|
|
|
@ -79,8 +79,6 @@ static inline void glue(gen_helper_, name)(dh_retvar_decl(ret) \
|
||||||
}
|
}
|
||||||
|
|
||||||
#include "helper.h"
|
#include "helper.h"
|
||||||
#include "trace/generated-helpers.h"
|
|
||||||
#include "trace/generated-helpers-wrappers.h"
|
|
||||||
#include "accel/tcg/tcg-runtime.h"
|
#include "accel/tcg/tcg-runtime.h"
|
||||||
#include "accel/tcg/plugin-helpers.h"
|
#include "accel/tcg/plugin-helpers.h"
|
||||||
|
|
||||||
|
|
|
@ -38,7 +38,6 @@ dh_ctype(ret) HELPER(name) (dh_ctype(t1), dh_ctype(t2), dh_ctype(t3), \
|
||||||
#define IN_HELPER_PROTO
|
#define IN_HELPER_PROTO
|
||||||
|
|
||||||
#include "helper.h"
|
#include "helper.h"
|
||||||
#include "trace/generated-helpers.h"
|
|
||||||
#include "accel/tcg/tcg-runtime.h"
|
#include "accel/tcg/tcg-runtime.h"
|
||||||
#include "accel/tcg/plugin-helpers.h"
|
#include "accel/tcg/plugin-helpers.h"
|
||||||
|
|
||||||
|
|
|
@ -59,7 +59,6 @@
|
||||||
| dh_typemask(t5, 5) | dh_typemask(t6, 6) | dh_typemask(t7, 7) },
|
| dh_typemask(t5, 5) | dh_typemask(t6, 6) | dh_typemask(t7, 7) },
|
||||||
|
|
||||||
#include "helper.h"
|
#include "helper.h"
|
||||||
#include "trace/generated-helpers.h"
|
|
||||||
#include "accel/tcg/tcg-runtime.h"
|
#include "accel/tcg/tcg-runtime.h"
|
||||||
#include "accel/tcg/plugin-helpers.h"
|
#include "accel/tcg/plugin-helpers.h"
|
||||||
|
|
||||||
|
|
|
@ -590,4 +590,38 @@ void qemu_plugin_outs(const char *string);
|
||||||
*/
|
*/
|
||||||
bool qemu_plugin_bool_parse(const char *name, const char *val, bool *ret);
|
bool qemu_plugin_bool_parse(const char *name, const char *val, bool *ret);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* qemu_plugin_path_to_binary() - path to binary file being executed
|
||||||
|
*
|
||||||
|
* Return a string representing the path to the binary. For user-mode
|
||||||
|
* this is the main executable. For system emulation we currently
|
||||||
|
* return NULL. The user should g_free() the string once no longer
|
||||||
|
* needed.
|
||||||
|
*/
|
||||||
|
const char *qemu_plugin_path_to_binary(void);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* qemu_plugin_start_code() - returns start of text segment
|
||||||
|
*
|
||||||
|
* Returns the nominal start address of the main text segment in
|
||||||
|
* user-mode. Currently returns 0 for system emulation.
|
||||||
|
*/
|
||||||
|
uint64_t qemu_plugin_start_code(void);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* qemu_plugin_end_code() - returns end of text segment
|
||||||
|
*
|
||||||
|
* Returns the nominal end address of the main text segment in
|
||||||
|
* user-mode. Currently returns 0 for system emulation.
|
||||||
|
*/
|
||||||
|
uint64_t qemu_plugin_end_code(void);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* qemu_plugin_entry_code() - returns start address for module
|
||||||
|
*
|
||||||
|
* Returns the nominal entry address of the main text segment in
|
||||||
|
* user-mode. Currently returns 0 for system emulation.
|
||||||
|
*/
|
||||||
|
uint64_t qemu_plugin_entry_code(void);
|
||||||
|
|
||||||
#endif /* QEMU_PLUGIN_API_H */
|
#endif /* QEMU_PLUGIN_API_H */
|
||||||
|
|
|
@ -1,6 +0,0 @@
|
||||||
#ifndef TRACE_TCG_H
|
|
||||||
#define TRACE_TCG_H
|
|
||||||
|
|
||||||
#include "trace/generated-tcg-tracers.h"
|
|
||||||
|
|
||||||
#endif /* TRACE_TCG_H */
|
|
|
@ -718,7 +718,7 @@ static inline void init_thread(struct target_pt_regs *regs,
|
||||||
#define ELF_MACHINE PPC_ELF_MACHINE
|
#define ELF_MACHINE PPC_ELF_MACHINE
|
||||||
#define ELF_START_MMAP 0x80000000
|
#define ELF_START_MMAP 0x80000000
|
||||||
|
|
||||||
#if defined(TARGET_PPC64) && !defined(TARGET_ABI32)
|
#if defined(TARGET_PPC64)
|
||||||
|
|
||||||
#define elf_check_arch(x) ( (x) == EM_PPC64 )
|
#define elf_check_arch(x) ( (x) == EM_PPC64 )
|
||||||
|
|
||||||
|
@ -870,7 +870,7 @@ static uint32_t get_elf_hwcap2(void)
|
||||||
static inline void init_thread(struct target_pt_regs *_regs, struct image_info *infop)
|
static inline void init_thread(struct target_pt_regs *_regs, struct image_info *infop)
|
||||||
{
|
{
|
||||||
_regs->gpr[1] = infop->start_stack;
|
_regs->gpr[1] = infop->start_stack;
|
||||||
#if defined(TARGET_PPC64) && !defined(TARGET_ABI32)
|
#if defined(TARGET_PPC64)
|
||||||
if (get_ppc64_abi(infop) < 2) {
|
if (get_ppc64_abi(infop) < 2) {
|
||||||
uint64_t val;
|
uint64_t val;
|
||||||
get_user_u64(val, infop->entry + 8);
|
get_user_u64(val, infop->entry + 8);
|
||||||
|
|
|
@ -477,9 +477,7 @@ void setup_rt_frame(int sig, struct target_sigaction *ka,
|
||||||
int i, err = 0;
|
int i, err = 0;
|
||||||
#if defined(TARGET_PPC64)
|
#if defined(TARGET_PPC64)
|
||||||
struct target_sigcontext *sc = 0;
|
struct target_sigcontext *sc = 0;
|
||||||
#if !defined(TARGET_ABI32)
|
|
||||||
struct image_info *image = ((TaskState *)thread_cpu->opaque)->info;
|
struct image_info *image = ((TaskState *)thread_cpu->opaque)->info;
|
||||||
#endif
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
rt_sf_addr = get_sigframe(ka, env, sizeof(*rt_sf));
|
rt_sf_addr = get_sigframe(ka, env, sizeof(*rt_sf));
|
||||||
|
@ -530,7 +528,7 @@ void setup_rt_frame(int sig, struct target_sigaction *ka,
|
||||||
env->gpr[5] = (target_ulong) h2g(&rt_sf->uc);
|
env->gpr[5] = (target_ulong) h2g(&rt_sf->uc);
|
||||||
env->gpr[6] = (target_ulong) h2g(rt_sf);
|
env->gpr[6] = (target_ulong) h2g(rt_sf);
|
||||||
|
|
||||||
#if defined(TARGET_PPC64) && !defined(TARGET_ABI32)
|
#if defined(TARGET_PPC64)
|
||||||
if (get_ppc64_abi(image) < 2) {
|
if (get_ppc64_abi(image) < 2) {
|
||||||
/* ELFv1 PPC64 function pointers are pointers to OPD entries. */
|
/* ELFv1 PPC64 function pointers are pointers to OPD entries. */
|
||||||
struct target_func_ptr *handler =
|
struct target_func_ptr *handler =
|
||||||
|
@ -562,7 +560,7 @@ sigsegv:
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#if !defined(TARGET_PPC64) || defined(TARGET_ABI32)
|
#if !defined(TARGET_PPC64)
|
||||||
long do_sigreturn(CPUPPCState *env)
|
long do_sigreturn(CPUPPCState *env)
|
||||||
{
|
{
|
||||||
struct target_sigcontext *sc = NULL;
|
struct target_sigcontext *sc = NULL;
|
||||||
|
@ -575,12 +573,9 @@ long do_sigreturn(CPUPPCState *env)
|
||||||
if (!lock_user_struct(VERIFY_READ, sc, sc_addr, 1))
|
if (!lock_user_struct(VERIFY_READ, sc, sc_addr, 1))
|
||||||
goto sigsegv;
|
goto sigsegv;
|
||||||
|
|
||||||
#if defined(TARGET_PPC64)
|
|
||||||
set.sig[0] = sc->oldmask + ((uint64_t)(sc->_unused[3]) << 32);
|
|
||||||
#else
|
|
||||||
__get_user(set.sig[0], &sc->oldmask);
|
__get_user(set.sig[0], &sc->oldmask);
|
||||||
__get_user(set.sig[1], &sc->_unused[3]);
|
__get_user(set.sig[1], &sc->_unused[3]);
|
||||||
#endif
|
|
||||||
target_to_host_sigset_internal(&blocked, &set);
|
target_to_host_sigset_internal(&blocked, &set);
|
||||||
set_sigmask(&blocked);
|
set_sigmask(&blocked);
|
||||||
|
|
||||||
|
|
|
@ -36,7 +36,7 @@ struct target_pt_regs {
|
||||||
abi_ulong link;
|
abi_ulong link;
|
||||||
abi_ulong xer;
|
abi_ulong xer;
|
||||||
abi_ulong ccr;
|
abi_ulong ccr;
|
||||||
#if defined(TARGET_PPC64) && !defined(TARGET_ABI32)
|
#if defined(TARGET_PPC64)
|
||||||
abi_ulong softe;
|
abi_ulong softe;
|
||||||
#else
|
#else
|
||||||
abi_ulong mq; /* 601 only (not used at present) */
|
abi_ulong mq; /* 601 only (not used at present) */
|
||||||
|
@ -58,7 +58,7 @@ struct target_revectored_struct {
|
||||||
* flags masks
|
* flags masks
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#if defined(TARGET_PPC64) && !defined(TARGET_ABI32)
|
#if defined(TARGET_PPC64)
|
||||||
#ifdef TARGET_WORDS_BIGENDIAN
|
#ifdef TARGET_WORDS_BIGENDIAN
|
||||||
#define UNAME_MACHINE "ppc64"
|
#define UNAME_MACHINE "ppc64"
|
||||||
#else
|
#else
|
||||||
|
|
|
@ -1558,7 +1558,7 @@ struct target_stat64 {
|
||||||
struct target_stat {
|
struct target_stat {
|
||||||
abi_ulong st_dev;
|
abi_ulong st_dev;
|
||||||
abi_ulong st_ino;
|
abi_ulong st_ino;
|
||||||
#if defined(TARGET_PPC64) && !defined(TARGET_ABI32)
|
#if defined(TARGET_PPC64)
|
||||||
abi_ulong st_nlink;
|
abi_ulong st_nlink;
|
||||||
unsigned int st_mode;
|
unsigned int st_mode;
|
||||||
#else
|
#else
|
||||||
|
@ -1579,12 +1579,12 @@ struct target_stat {
|
||||||
abi_ulong target_st_ctime_nsec;
|
abi_ulong target_st_ctime_nsec;
|
||||||
abi_ulong __unused4;
|
abi_ulong __unused4;
|
||||||
abi_ulong __unused5;
|
abi_ulong __unused5;
|
||||||
#if defined(TARGET_PPC64) && !defined(TARGET_ABI32)
|
#if defined(TARGET_PPC64)
|
||||||
abi_ulong __unused6;
|
abi_ulong __unused6;
|
||||||
#endif
|
#endif
|
||||||
};
|
};
|
||||||
|
|
||||||
#if !defined(TARGET_PPC64) || defined(TARGET_ABI32)
|
#if !defined(TARGET_PPC64)
|
||||||
#define TARGET_HAS_STRUCT_STAT64
|
#define TARGET_HAS_STRUCT_STAT64
|
||||||
struct QEMU_PACKED target_stat64 {
|
struct QEMU_PACKED target_stat64 {
|
||||||
unsigned long long st_dev;
|
unsigned long long st_dev;
|
||||||
|
|
10
meson.build
10
meson.build
|
@ -453,11 +453,6 @@ if not get_option('linux_io_uring').auto() or have_block
|
||||||
required: get_option('linux_io_uring'),
|
required: get_option('linux_io_uring'),
|
||||||
method: 'pkg-config', kwargs: static_kwargs)
|
method: 'pkg-config', kwargs: static_kwargs)
|
||||||
endif
|
endif
|
||||||
libxml2 = not_found
|
|
||||||
if not get_option('libxml2').auto() or have_block
|
|
||||||
libxml2 = dependency('libxml-2.0', required: get_option('libxml2'),
|
|
||||||
method: 'pkg-config', kwargs: static_kwargs)
|
|
||||||
endif
|
|
||||||
libnfs = not_found
|
libnfs = not_found
|
||||||
if not get_option('libnfs').auto() or have_block
|
if not get_option('libnfs').auto() or have_block
|
||||||
libnfs = dependency('libnfs', version: '>=1.9.3',
|
libnfs = dependency('libnfs', version: '>=1.9.3',
|
||||||
|
@ -2362,19 +2357,15 @@ tracetool_depends = files(
|
||||||
'scripts/tracetool/backend/simple.py',
|
'scripts/tracetool/backend/simple.py',
|
||||||
'scripts/tracetool/backend/syslog.py',
|
'scripts/tracetool/backend/syslog.py',
|
||||||
'scripts/tracetool/backend/ust.py',
|
'scripts/tracetool/backend/ust.py',
|
||||||
'scripts/tracetool/format/tcg_h.py',
|
|
||||||
'scripts/tracetool/format/ust_events_c.py',
|
'scripts/tracetool/format/ust_events_c.py',
|
||||||
'scripts/tracetool/format/ust_events_h.py',
|
'scripts/tracetool/format/ust_events_h.py',
|
||||||
'scripts/tracetool/format/__init__.py',
|
'scripts/tracetool/format/__init__.py',
|
||||||
'scripts/tracetool/format/d.py',
|
'scripts/tracetool/format/d.py',
|
||||||
'scripts/tracetool/format/tcg_helper_c.py',
|
|
||||||
'scripts/tracetool/format/simpletrace_stap.py',
|
'scripts/tracetool/format/simpletrace_stap.py',
|
||||||
'scripts/tracetool/format/c.py',
|
'scripts/tracetool/format/c.py',
|
||||||
'scripts/tracetool/format/h.py',
|
'scripts/tracetool/format/h.py',
|
||||||
'scripts/tracetool/format/tcg_helper_h.py',
|
|
||||||
'scripts/tracetool/format/log_stap.py',
|
'scripts/tracetool/format/log_stap.py',
|
||||||
'scripts/tracetool/format/stap.py',
|
'scripts/tracetool/format/stap.py',
|
||||||
'scripts/tracetool/format/tcg_helper_wrapper_h.py',
|
|
||||||
'scripts/tracetool/__init__.py',
|
'scripts/tracetool/__init__.py',
|
||||||
'scripts/tracetool/transform.py',
|
'scripts/tracetool/transform.py',
|
||||||
'scripts/tracetool/vcpu.py'
|
'scripts/tracetool/vcpu.py'
|
||||||
|
@ -3496,7 +3487,6 @@ summary_info += {'bzip2 support': libbzip2}
|
||||||
summary_info += {'lzfse support': liblzfse}
|
summary_info += {'lzfse support': liblzfse}
|
||||||
summary_info += {'zstd support': zstd}
|
summary_info += {'zstd support': zstd}
|
||||||
summary_info += {'NUMA host support': config_host.has_key('CONFIG_NUMA')}
|
summary_info += {'NUMA host support': config_host.has_key('CONFIG_NUMA')}
|
||||||
summary_info += {'libxml2': libxml2}
|
|
||||||
summary_info += {'capstone': capstone_opt == 'internal' ? capstone_opt : capstone}
|
summary_info += {'capstone': capstone_opt == 'internal' ? capstone_opt : capstone}
|
||||||
summary_info += {'libpmem support': libpmem}
|
summary_info += {'libpmem support': libpmem}
|
||||||
summary_info += {'libdaxctl support': libdaxctl}
|
summary_info += {'libdaxctl support': libdaxctl}
|
||||||
|
|
|
@ -113,8 +113,6 @@ option('libudev', type : 'feature', value : 'auto',
|
||||||
description: 'Use libudev to enumerate host devices')
|
description: 'Use libudev to enumerate host devices')
|
||||||
option('libusb', type : 'feature', value : 'auto',
|
option('libusb', type : 'feature', value : 'auto',
|
||||||
description: 'libusb support for USB passthrough')
|
description: 'libusb support for USB passthrough')
|
||||||
option('libxml2', type : 'feature', value : 'auto',
|
|
||||||
description: 'libxml2 support for Parallels image format')
|
|
||||||
option('linux_aio', type : 'feature', value : 'auto',
|
option('linux_aio', type : 'feature', value : 'auto',
|
||||||
description: 'Linux AIO support')
|
description: 'Linux AIO support')
|
||||||
option('linux_io_uring', type : 'feature', value : 'auto',
|
option('linux_io_uring', type : 'feature', value : 'auto',
|
||||||
|
|
|
@ -44,6 +44,11 @@
|
||||||
#ifndef CONFIG_USER_ONLY
|
#ifndef CONFIG_USER_ONLY
|
||||||
#include "qemu/plugin-memory.h"
|
#include "qemu/plugin-memory.h"
|
||||||
#include "hw/boards.h"
|
#include "hw/boards.h"
|
||||||
|
#else
|
||||||
|
#include "qemu.h"
|
||||||
|
#ifdef CONFIG_LINUX
|
||||||
|
#include "loader.h"
|
||||||
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* Uninstall and Reset handlers */
|
/* Uninstall and Reset handlers */
|
||||||
|
@ -391,3 +396,46 @@ bool qemu_plugin_bool_parse(const char *name, const char *value, bool *ret)
|
||||||
{
|
{
|
||||||
return name && value && qapi_bool_parse(name, value, ret, NULL);
|
return name && value && qapi_bool_parse(name, value, ret, NULL);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Binary path, start and end locations
|
||||||
|
*/
|
||||||
|
const char *qemu_plugin_path_to_binary(void)
|
||||||
|
{
|
||||||
|
char *path = NULL;
|
||||||
|
#ifdef CONFIG_USER_ONLY
|
||||||
|
TaskState *ts = (TaskState *) current_cpu->opaque;
|
||||||
|
path = g_strdup(ts->bprm->filename);
|
||||||
|
#endif
|
||||||
|
return path;
|
||||||
|
}
|
||||||
|
|
||||||
|
uint64_t qemu_plugin_start_code(void)
|
||||||
|
{
|
||||||
|
uint64_t start = 0;
|
||||||
|
#ifdef CONFIG_USER_ONLY
|
||||||
|
TaskState *ts = (TaskState *) current_cpu->opaque;
|
||||||
|
start = ts->info->start_code;
|
||||||
|
#endif
|
||||||
|
return start;
|
||||||
|
}
|
||||||
|
|
||||||
|
uint64_t qemu_plugin_end_code(void)
|
||||||
|
{
|
||||||
|
uint64_t end = 0;
|
||||||
|
#ifdef CONFIG_USER_ONLY
|
||||||
|
TaskState *ts = (TaskState *) current_cpu->opaque;
|
||||||
|
end = ts->info->end_code;
|
||||||
|
#endif
|
||||||
|
return end;
|
||||||
|
}
|
||||||
|
|
||||||
|
uint64_t qemu_plugin_entry_code(void)
|
||||||
|
{
|
||||||
|
uint64_t entry = 0;
|
||||||
|
#ifdef CONFIG_USER_ONLY
|
||||||
|
TaskState *ts = (TaskState *) current_cpu->opaque;
|
||||||
|
entry = ts->info->entry;
|
||||||
|
#endif
|
||||||
|
return entry;
|
||||||
|
}
|
||||||
|
|
|
@ -1,5 +1,7 @@
|
||||||
{
|
{
|
||||||
qemu_plugin_bool_parse;
|
qemu_plugin_bool_parse;
|
||||||
|
qemu_plugin_end_code;
|
||||||
|
qemu_plugin_entry_code;
|
||||||
qemu_plugin_get_hwaddr;
|
qemu_plugin_get_hwaddr;
|
||||||
qemu_plugin_hwaddr_device_name;
|
qemu_plugin_hwaddr_device_name;
|
||||||
qemu_plugin_hwaddr_is_io;
|
qemu_plugin_hwaddr_is_io;
|
||||||
|
@ -17,6 +19,7 @@
|
||||||
qemu_plugin_n_max_vcpus;
|
qemu_plugin_n_max_vcpus;
|
||||||
qemu_plugin_n_vcpus;
|
qemu_plugin_n_vcpus;
|
||||||
qemu_plugin_outs;
|
qemu_plugin_outs;
|
||||||
|
qemu_plugin_path_to_binary;
|
||||||
qemu_plugin_register_atexit_cb;
|
qemu_plugin_register_atexit_cb;
|
||||||
qemu_plugin_register_flush_cb;
|
qemu_plugin_register_flush_cb;
|
||||||
qemu_plugin_register_vcpu_exit_cb;
|
qemu_plugin_register_vcpu_exit_cb;
|
||||||
|
@ -33,6 +36,7 @@
|
||||||
qemu_plugin_register_vcpu_tb_exec_inline;
|
qemu_plugin_register_vcpu_tb_exec_inline;
|
||||||
qemu_plugin_register_vcpu_tb_trans_cb;
|
qemu_plugin_register_vcpu_tb_trans_cb;
|
||||||
qemu_plugin_reset;
|
qemu_plugin_reset;
|
||||||
|
qemu_plugin_start_code;
|
||||||
qemu_plugin_tb_get_insn;
|
qemu_plugin_tb_get_insn;
|
||||||
qemu_plugin_tb_n_insns;
|
qemu_plugin_tb_n_insns;
|
||||||
qemu_plugin_tb_vaddr;
|
qemu_plugin_tb_vaddr;
|
||||||
|
|
|
@ -307,7 +307,6 @@ our @typeList = (
|
||||||
qr{target_(?:u)?long},
|
qr{target_(?:u)?long},
|
||||||
qr{hwaddr},
|
qr{hwaddr},
|
||||||
# external libraries
|
# external libraries
|
||||||
qr{xml${Ident}},
|
|
||||||
qr{xen\w+_handle},
|
qr{xen\w+_handle},
|
||||||
# Glib definitions
|
# Glib definitions
|
||||||
qr{gchar},
|
qr{gchar},
|
||||||
|
|
|
@ -81,7 +81,6 @@
|
||||||
--disable-libssh \
|
--disable-libssh \
|
||||||
--disable-libudev \
|
--disable-libudev \
|
||||||
--disable-libusb \
|
--disable-libusb \
|
||||||
--disable-libxml2 \
|
|
||||||
--disable-linux-aio \
|
--disable-linux-aio \
|
||||||
--disable-linux-io-uring \
|
--disable-linux-io-uring \
|
||||||
--disable-linux-user \
|
--disable-linux-user \
|
||||||
|
|
|
@ -59,7 +59,6 @@ ENV PACKAGES \
|
||||||
libubsan \
|
libubsan \
|
||||||
libudev-devel \
|
libudev-devel \
|
||||||
libusbx-devel \
|
libusbx-devel \
|
||||||
libxml2-devel \
|
|
||||||
libzstd-devel \
|
libzstd-devel \
|
||||||
llvm \
|
llvm \
|
||||||
lzo-devel \
|
lzo-devel \
|
||||||
|
|
|
@ -402,7 +402,7 @@ echo "Configuring..."
|
||||||
--enable-libiscsi --enable-libnfs --enable-seccomp \
|
--enable-libiscsi --enable-libnfs --enable-seccomp \
|
||||||
--enable-tpm --enable-libssh --enable-lzo --enable-snappy --enable-bzip2 \
|
--enable-tpm --enable-libssh --enable-lzo --enable-snappy --enable-bzip2 \
|
||||||
--enable-numa --enable-rdma --enable-smartcard --enable-virglrenderer \
|
--enable-numa --enable-rdma --enable-smartcard --enable-virglrenderer \
|
||||||
--enable-mpath --enable-libxml2 --enable-glusterfs \
|
--enable-mpath --enable-glusterfs \
|
||||||
--enable-virtfs --enable-zstd
|
--enable-virtfs --enable-zstd
|
||||||
|
|
||||||
echo "Running cov-build..."
|
echo "Running cov-build..."
|
||||||
|
|
|
@ -58,7 +58,6 @@ meson_options_help() {
|
||||||
printf "%s\n" ' libssh ssh block device support'
|
printf "%s\n" ' libssh ssh block device support'
|
||||||
printf "%s\n" ' libudev Use libudev to enumerate host devices'
|
printf "%s\n" ' libudev Use libudev to enumerate host devices'
|
||||||
printf "%s\n" ' libusb libusb support for USB passthrough'
|
printf "%s\n" ' libusb libusb support for USB passthrough'
|
||||||
printf "%s\n" ' libxml2 libxml2 support for Parallels image format'
|
|
||||||
printf "%s\n" ' linux-aio Linux AIO support'
|
printf "%s\n" ' linux-aio Linux AIO support'
|
||||||
printf "%s\n" ' linux-io-uring Linux io_uring support'
|
printf "%s\n" ' linux-io-uring Linux io_uring support'
|
||||||
printf "%s\n" ' lzfse lzfse support for DMG images'
|
printf "%s\n" ' lzfse lzfse support for DMG images'
|
||||||
|
@ -188,8 +187,6 @@ _meson_option_parse() {
|
||||||
--disable-libudev) printf "%s" -Dlibudev=disabled ;;
|
--disable-libudev) printf "%s" -Dlibudev=disabled ;;
|
||||||
--enable-libusb) printf "%s" -Dlibusb=enabled ;;
|
--enable-libusb) printf "%s" -Dlibusb=enabled ;;
|
||||||
--disable-libusb) printf "%s" -Dlibusb=disabled ;;
|
--disable-libusb) printf "%s" -Dlibusb=disabled ;;
|
||||||
--enable-libxml2) printf "%s" -Dlibxml2=enabled ;;
|
|
||||||
--disable-libxml2) printf "%s" -Dlibxml2=disabled ;;
|
|
||||||
--enable-linux-aio) printf "%s" -Dlinux_aio=enabled ;;
|
--enable-linux-aio) printf "%s" -Dlinux_aio=enabled ;;
|
||||||
--disable-linux-aio) printf "%s" -Dlinux_aio=disabled ;;
|
--disable-linux-aio) printf "%s" -Dlinux_aio=disabled ;;
|
||||||
--enable-linux-io-uring) printf "%s" -Dlinux_io_uring=enabled ;;
|
--enable-linux-io-uring) printf "%s" -Dlinux_io_uring=enabled ;;
|
||||||
|
|
|
@ -87,8 +87,6 @@ ALLOWED_TYPES = [
|
||||||
"ssize_t",
|
"ssize_t",
|
||||||
"uintptr_t",
|
"uintptr_t",
|
||||||
"ptrdiff_t",
|
"ptrdiff_t",
|
||||||
# Magic substitution is done by tracetool
|
|
||||||
"TCGv",
|
|
||||||
]
|
]
|
||||||
|
|
||||||
def validate_type(name):
|
def validate_type(name):
|
||||||
|
@ -232,7 +230,7 @@ class Event(object):
|
||||||
"(?:(?:(?P<fmt_trans>\".+),)?\s*(?P<fmt>\".+))?"
|
"(?:(?:(?P<fmt_trans>\".+),)?\s*(?P<fmt>\".+))?"
|
||||||
"\s*")
|
"\s*")
|
||||||
|
|
||||||
_VALID_PROPS = set(["disable", "tcg", "tcg-trans", "tcg-exec", "vcpu"])
|
_VALID_PROPS = set(["disable", "vcpu"])
|
||||||
|
|
||||||
def __init__(self, name, props, fmt, args, lineno, filename, orig=None,
|
def __init__(self, name, props, fmt, args, lineno, filename, orig=None,
|
||||||
event_trans=None, event_exec=None):
|
event_trans=None, event_exec=None):
|
||||||
|
@ -321,15 +319,6 @@ class Event(object):
|
||||||
fmt = [fmt_trans, fmt]
|
fmt = [fmt_trans, fmt]
|
||||||
args = Arguments.build(groups["args"])
|
args = Arguments.build(groups["args"])
|
||||||
|
|
||||||
if "tcg-trans" in props:
|
|
||||||
raise ValueError("Invalid property 'tcg-trans'")
|
|
||||||
if "tcg-exec" in props:
|
|
||||||
raise ValueError("Invalid property 'tcg-exec'")
|
|
||||||
if "tcg" not in props and not isinstance(fmt, str):
|
|
||||||
raise ValueError("Only events with 'tcg' property can have two format strings")
|
|
||||||
if "tcg" in props and isinstance(fmt, str):
|
|
||||||
raise ValueError("Events with 'tcg' property must have two format strings")
|
|
||||||
|
|
||||||
event = Event(name, props, fmt, args, lineno, filename)
|
event = Event(name, props, fmt, args, lineno, filename)
|
||||||
|
|
||||||
# add implicit arguments when using the 'vcpu' property
|
# add implicit arguments when using the 'vcpu' property
|
||||||
|
@ -409,33 +398,7 @@ def read_events(fobj, fname):
|
||||||
e.args = (arg0,) + e.args[1:]
|
e.args = (arg0,) + e.args[1:]
|
||||||
raise
|
raise
|
||||||
|
|
||||||
# transform TCG-enabled events
|
events.append(event)
|
||||||
if "tcg" not in event.properties:
|
|
||||||
events.append(event)
|
|
||||||
else:
|
|
||||||
event_trans = event.copy()
|
|
||||||
event_trans.name += "_trans"
|
|
||||||
event_trans.properties += ["tcg-trans"]
|
|
||||||
event_trans.fmt = event.fmt[0]
|
|
||||||
# ignore TCG arguments
|
|
||||||
args_trans = []
|
|
||||||
for atrans, aorig in zip(
|
|
||||||
event_trans.transform(tracetool.transform.TCG_2_HOST).args,
|
|
||||||
event.args):
|
|
||||||
if atrans == aorig:
|
|
||||||
args_trans.append(atrans)
|
|
||||||
event_trans.args = Arguments(args_trans)
|
|
||||||
|
|
||||||
event_exec = event.copy()
|
|
||||||
event_exec.name += "_exec"
|
|
||||||
event_exec.properties += ["tcg-exec"]
|
|
||||||
event_exec.fmt = event.fmt[1]
|
|
||||||
event_exec.args = event_exec.args.transform(tracetool.transform.TCG_2_HOST)
|
|
||||||
|
|
||||||
new_event = [event_trans, event_exec]
|
|
||||||
event.event_trans, event.event_exec = new_event
|
|
||||||
|
|
||||||
events.extend(new_event)
|
|
||||||
|
|
||||||
return events
|
return events
|
||||||
|
|
||||||
|
|
|
@ -1,83 +0,0 @@
|
||||||
# -*- coding: utf-8 -*-
|
|
||||||
|
|
||||||
"""
|
|
||||||
Generate .h file for TCG code generation.
|
|
||||||
"""
|
|
||||||
|
|
||||||
__author__ = "Lluís Vilanova <vilanova@ac.upc.edu>"
|
|
||||||
__copyright__ = "Copyright 2012-2017, Lluís Vilanova <vilanova@ac.upc.edu>"
|
|
||||||
__license__ = "GPL version 2 or (at your option) any later version"
|
|
||||||
|
|
||||||
__maintainer__ = "Stefan Hajnoczi"
|
|
||||||
__email__ = "stefanha@redhat.com"
|
|
||||||
|
|
||||||
|
|
||||||
from tracetool import out, Arguments
|
|
||||||
import tracetool.vcpu
|
|
||||||
|
|
||||||
|
|
||||||
def vcpu_transform_args(args):
|
|
||||||
assert len(args) == 1
|
|
||||||
return Arguments([
|
|
||||||
args,
|
|
||||||
# NOTE: this name must be kept in sync with the one in "tcg_h"
|
|
||||||
# NOTE: Current helper code uses TCGv_env (CPUArchState*)
|
|
||||||
("TCGv_env", "__tcg_" + args.names()[0]),
|
|
||||||
])
|
|
||||||
|
|
||||||
|
|
||||||
def generate(events, backend, group):
|
|
||||||
if group == "root":
|
|
||||||
header = "trace/trace-root.h"
|
|
||||||
else:
|
|
||||||
header = "trace.h"
|
|
||||||
|
|
||||||
out('/* This file is autogenerated by tracetool, do not edit. */',
|
|
||||||
'/* You must include this file after the inclusion of helper.h */',
|
|
||||||
'',
|
|
||||||
'#ifndef TRACE_%s_GENERATED_TCG_TRACERS_H' % group.upper(),
|
|
||||||
'#define TRACE_%s_GENERATED_TCG_TRACERS_H' % group.upper(),
|
|
||||||
'',
|
|
||||||
'#include "exec/helper-proto.h"',
|
|
||||||
'#include "%s"' % header,
|
|
||||||
'',
|
|
||||||
)
|
|
||||||
|
|
||||||
for e in events:
|
|
||||||
# just keep one of them
|
|
||||||
if "tcg-exec" not in e.properties:
|
|
||||||
continue
|
|
||||||
|
|
||||||
out('static inline void %(name_tcg)s(%(args)s)',
|
|
||||||
'{',
|
|
||||||
name_tcg=e.original.api(e.QEMU_TRACE_TCG),
|
|
||||||
args=tracetool.vcpu.transform_args("tcg_h", e.original))
|
|
||||||
|
|
||||||
if "disable" not in e.properties:
|
|
||||||
args_trans = e.original.event_trans.args
|
|
||||||
args_exec = tracetool.vcpu.transform_args(
|
|
||||||
"tcg_helper_c", e.original.event_exec, "wrapper")
|
|
||||||
if "vcpu" in e.properties:
|
|
||||||
trace_cpu = e.args.names()[0]
|
|
||||||
cond = "trace_event_get_vcpu_state(%(cpu)s,"\
|
|
||||||
" TRACE_%(id)s)"\
|
|
||||||
% dict(
|
|
||||||
cpu=trace_cpu,
|
|
||||||
id=e.original.event_exec.name.upper())
|
|
||||||
else:
|
|
||||||
cond = "true"
|
|
||||||
|
|
||||||
out(' %(name_trans)s(%(argnames_trans)s);',
|
|
||||||
' if (%(cond)s) {',
|
|
||||||
' gen_helper_%(name_exec)s(%(argnames_exec)s);',
|
|
||||||
' }',
|
|
||||||
name_trans=e.original.event_trans.api(e.QEMU_TRACE),
|
|
||||||
name_exec=e.original.event_exec.api(e.QEMU_TRACE),
|
|
||||||
argnames_trans=", ".join(args_trans.names()),
|
|
||||||
argnames_exec=", ".join(args_exec.names()),
|
|
||||||
cond=cond)
|
|
||||||
|
|
||||||
out('}')
|
|
||||||
|
|
||||||
out('',
|
|
||||||
'#endif /* TRACE_%s_GENERATED_TCG_TRACERS_H */' % group.upper())
|
|
|
@ -1,79 +0,0 @@
|
||||||
# -*- coding: utf-8 -*-
|
|
||||||
|
|
||||||
"""
|
|
||||||
Generate trace/generated-helpers.c.
|
|
||||||
"""
|
|
||||||
|
|
||||||
__author__ = "Lluís Vilanova <vilanova@ac.upc.edu>"
|
|
||||||
__copyright__ = "Copyright 2012-2017, Lluís Vilanova <vilanova@ac.upc.edu>"
|
|
||||||
__license__ = "GPL version 2 or (at your option) any later version"
|
|
||||||
|
|
||||||
__maintainer__ = "Stefan Hajnoczi"
|
|
||||||
__email__ = "stefanha@redhat.com"
|
|
||||||
|
|
||||||
|
|
||||||
from tracetool import Arguments, out
|
|
||||||
from tracetool.transform import *
|
|
||||||
import tracetool.vcpu
|
|
||||||
|
|
||||||
|
|
||||||
def vcpu_transform_args(args, mode):
|
|
||||||
assert len(args) == 1
|
|
||||||
# NOTE: this name must be kept in sync with the one in "tcg_h"
|
|
||||||
args = Arguments([(args.types()[0], "__tcg_" + args.names()[0])])
|
|
||||||
if mode == "code":
|
|
||||||
return Arguments([
|
|
||||||
# Does cast from helper requirements to tracing types
|
|
||||||
("CPUState *", "env_cpu(%s)" % args.names()[0]),
|
|
||||||
])
|
|
||||||
else:
|
|
||||||
args = Arguments([
|
|
||||||
# NOTE: Current helper code uses TCGv_env (CPUArchState*)
|
|
||||||
("CPUArchState *", args.names()[0]),
|
|
||||||
])
|
|
||||||
if mode == "header":
|
|
||||||
return args
|
|
||||||
elif mode == "wrapper":
|
|
||||||
return args.transform(HOST_2_TCG)
|
|
||||||
else:
|
|
||||||
assert False
|
|
||||||
|
|
||||||
|
|
||||||
def generate(events, backend, group):
|
|
||||||
if group == "root":
|
|
||||||
header = "trace/trace-root.h"
|
|
||||||
else:
|
|
||||||
header = "trace.h"
|
|
||||||
|
|
||||||
events = [e for e in events
|
|
||||||
if "disable" not in e.properties]
|
|
||||||
|
|
||||||
out('/* This file is autogenerated by tracetool, do not edit. */',
|
|
||||||
'',
|
|
||||||
'#include "qemu/osdep.h"',
|
|
||||||
'#include "cpu.h"',
|
|
||||||
'#include "exec/helper-proto.h"',
|
|
||||||
'#include "%s"' % header,
|
|
||||||
'',
|
|
||||||
)
|
|
||||||
|
|
||||||
for e in events:
|
|
||||||
if "tcg-exec" not in e.properties:
|
|
||||||
continue
|
|
||||||
|
|
||||||
e_args_api = tracetool.vcpu.transform_args(
|
|
||||||
"tcg_helper_c", e.original, "header").transform(
|
|
||||||
HOST_2_TCG_COMPAT, TCG_2_TCG_HELPER_DEF)
|
|
||||||
e_args_call = tracetool.vcpu.transform_args(
|
|
||||||
"tcg_helper_c", e, "code")
|
|
||||||
|
|
||||||
out('void %(name_tcg)s(%(args_api)s)',
|
|
||||||
'{',
|
|
||||||
# NOTE: the check was already performed at TCG-generation time
|
|
||||||
' %(name)s(%(args_call)s);',
|
|
||||||
'}',
|
|
||||||
name_tcg="helper_%s_proxy" % e.api(),
|
|
||||||
name=e.api(e.QEMU_TRACE_NOCHECK),
|
|
||||||
args_api=e_args_api,
|
|
||||||
args_call=", ".join(e_args_call.casted()),
|
|
||||||
)
|
|
|
@ -1,48 +0,0 @@
|
||||||
# -*- coding: utf-8 -*-
|
|
||||||
|
|
||||||
"""
|
|
||||||
Generate trace/generated-helpers.h.
|
|
||||||
"""
|
|
||||||
|
|
||||||
__author__ = "Lluís Vilanova <vilanova@ac.upc.edu>"
|
|
||||||
__copyright__ = "Copyright 2012-2016, Lluís Vilanova <vilanova@ac.upc.edu>"
|
|
||||||
__license__ = "GPL version 2 or (at your option) any later version"
|
|
||||||
|
|
||||||
__maintainer__ = "Stefan Hajnoczi"
|
|
||||||
__email__ = "stefanha@redhat.com"
|
|
||||||
|
|
||||||
|
|
||||||
from tracetool import out
|
|
||||||
from tracetool.transform import *
|
|
||||||
import tracetool.vcpu
|
|
||||||
|
|
||||||
|
|
||||||
def generate(events, backend, group):
|
|
||||||
events = [e for e in events
|
|
||||||
if "disable" not in e.properties]
|
|
||||||
|
|
||||||
out('/* This file is autogenerated by tracetool, do not edit. */',
|
|
||||||
'',
|
|
||||||
)
|
|
||||||
|
|
||||||
for e in events:
|
|
||||||
if "tcg-exec" not in e.properties:
|
|
||||||
continue
|
|
||||||
|
|
||||||
# TCG helper proxy declaration
|
|
||||||
fmt = "DEF_HELPER_FLAGS_%(argc)d(%(name)s, %(flags)svoid%(types)s)"
|
|
||||||
e_args = tracetool.vcpu.transform_args("tcg_helper_c", e.original, "header")
|
|
||||||
args = e_args.transform(HOST_2_TCG_COMPAT, HOST_2_TCG,
|
|
||||||
TCG_2_TCG_HELPER_DECL)
|
|
||||||
types = ", ".join(args.types())
|
|
||||||
if types != "":
|
|
||||||
types = ", " + types
|
|
||||||
|
|
||||||
flags = "TCG_CALL_NO_RWG, "
|
|
||||||
|
|
||||||
out(fmt,
|
|
||||||
flags=flags,
|
|
||||||
argc=len(args),
|
|
||||||
name=e.api() + "_proxy",
|
|
||||||
types=types,
|
|
||||||
)
|
|
|
@ -1,70 +0,0 @@
|
||||||
# -*- coding: utf-8 -*-
|
|
||||||
|
|
||||||
"""
|
|
||||||
Generate trace/generated-helpers-wrappers.h.
|
|
||||||
"""
|
|
||||||
|
|
||||||
__author__ = "Lluís Vilanova <vilanova@ac.upc.edu>"
|
|
||||||
__copyright__ = "Copyright 2012-2016, Lluís Vilanova <vilanova@ac.upc.edu>"
|
|
||||||
__license__ = "GPL version 2 or (at your option) any later version"
|
|
||||||
|
|
||||||
__maintainer__ = "Stefan Hajnoczi"
|
|
||||||
__email__ = "stefanha@redhat.com"
|
|
||||||
|
|
||||||
|
|
||||||
from tracetool import out
|
|
||||||
from tracetool.transform import *
|
|
||||||
import tracetool.vcpu
|
|
||||||
|
|
||||||
|
|
||||||
def generate(events, backend, group):
|
|
||||||
events = [e for e in events
|
|
||||||
if "disable" not in e.properties]
|
|
||||||
|
|
||||||
out('/* This file is autogenerated by tracetool, do not edit. */',
|
|
||||||
'',
|
|
||||||
'#define tcg_temp_new_nop(v) (v)',
|
|
||||||
'#define tcg_temp_free_nop(v)',
|
|
||||||
'',
|
|
||||||
)
|
|
||||||
|
|
||||||
for e in events:
|
|
||||||
if "tcg-exec" not in e.properties:
|
|
||||||
continue
|
|
||||||
|
|
||||||
# tracetool.generate always transforms types to host
|
|
||||||
e_args = tracetool.vcpu.transform_args("tcg_helper_c", e.original, "wrapper")
|
|
||||||
|
|
||||||
# mixed-type to TCG helper bridge
|
|
||||||
args_tcg_compat = e_args.transform(HOST_2_TCG_COMPAT)
|
|
||||||
|
|
||||||
code_new = [
|
|
||||||
"%(tcg_type)s __%(name)s = %(tcg_func)s(%(name)s);" %
|
|
||||||
{"tcg_type": transform_type(type_, HOST_2_TCG),
|
|
||||||
"tcg_func": transform_type(type_, HOST_2_TCG_TMP_NEW),
|
|
||||||
"name": name}
|
|
||||||
for (type_, name) in args_tcg_compat
|
|
||||||
]
|
|
||||||
|
|
||||||
code_free = [
|
|
||||||
"%(tcg_func)s(__%(name)s);" %
|
|
||||||
{"tcg_func": transform_type(type_, HOST_2_TCG_TMP_FREE),
|
|
||||||
"name": name}
|
|
||||||
for (type_, name) in args_tcg_compat
|
|
||||||
]
|
|
||||||
|
|
||||||
gen_name = "gen_helper_" + e.api()
|
|
||||||
|
|
||||||
out('static inline void %(name)s(%(args)s)',
|
|
||||||
'{',
|
|
||||||
' %(code_new)s',
|
|
||||||
' %(proxy_name)s(%(tmp_names)s);',
|
|
||||||
' %(code_free)s',
|
|
||||||
'}',
|
|
||||||
name=gen_name,
|
|
||||||
args=e_args,
|
|
||||||
proxy_name=gen_name + "_proxy",
|
|
||||||
code_new="\n ".join(code_new),
|
|
||||||
code_free="\n ".join(code_free),
|
|
||||||
tmp_names=", ".join(["__%s" % name for _, name in e_args]),
|
|
||||||
)
|
|
|
@ -19,19 +19,9 @@ from tracetool import Arguments, try_import
|
||||||
def transform_event(event):
|
def transform_event(event):
|
||||||
"""Transform event to comply with the 'vcpu' property (if present)."""
|
"""Transform event to comply with the 'vcpu' property (if present)."""
|
||||||
if "vcpu" in event.properties:
|
if "vcpu" in event.properties:
|
||||||
# events with 'tcg-trans' and 'tcg-exec' are auto-generated from
|
|
||||||
# already-patched events
|
|
||||||
assert "tcg-trans" not in event.properties
|
|
||||||
assert "tcg-exec" not in event.properties
|
|
||||||
|
|
||||||
event.args = Arguments([("void *", "__cpu"), event.args])
|
event.args = Arguments([("void *", "__cpu"), event.args])
|
||||||
if "tcg" in event.properties:
|
fmt = "\"cpu=%p \""
|
||||||
fmt = "\"cpu=%p \""
|
event.fmt = fmt + event.fmt
|
||||||
event.fmt = [fmt + event.fmt[0],
|
|
||||||
fmt + event.fmt[1]]
|
|
||||||
else:
|
|
||||||
fmt = "\"cpu=%p \""
|
|
||||||
event.fmt = fmt + event.fmt
|
|
||||||
return event
|
return event
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -167,7 +167,7 @@ bool x86_cpu_exec_interrupt(CPUState *cs, int interrupt_request)
|
||||||
cs->interrupt_request &= ~(CPU_INTERRUPT_HARD |
|
cs->interrupt_request &= ~(CPU_INTERRUPT_HARD |
|
||||||
CPU_INTERRUPT_VIRQ);
|
CPU_INTERRUPT_VIRQ);
|
||||||
intno = cpu_get_pic_interrupt(env);
|
intno = cpu_get_pic_interrupt(env);
|
||||||
qemu_log_mask(CPU_LOG_TB_IN_ASM,
|
qemu_log_mask(CPU_LOG_INT,
|
||||||
"Servicing hardware INT=0x%02x\n", intno);
|
"Servicing hardware INT=0x%02x\n", intno);
|
||||||
do_interrupt_x86_hardirq(env, intno, 1);
|
do_interrupt_x86_hardirq(env, intno, 1);
|
||||||
break;
|
break;
|
||||||
|
@ -175,7 +175,7 @@ bool x86_cpu_exec_interrupt(CPUState *cs, int interrupt_request)
|
||||||
cpu_svm_check_intercept_param(env, SVM_EXIT_VINTR, 0, 0);
|
cpu_svm_check_intercept_param(env, SVM_EXIT_VINTR, 0, 0);
|
||||||
intno = x86_ldl_phys(cs, env->vm_vmcb
|
intno = x86_ldl_phys(cs, env->vm_vmcb
|
||||||
+ offsetof(struct vmcb, control.int_vector));
|
+ offsetof(struct vmcb, control.int_vector));
|
||||||
qemu_log_mask(CPU_LOG_TB_IN_ASM,
|
qemu_log_mask(CPU_LOG_INT,
|
||||||
"Servicing virtual hardware INT=0x%02x\n", intno);
|
"Servicing virtual hardware INT=0x%02x\n", intno);
|
||||||
do_interrupt_x86_hardirq(env, intno, 1);
|
do_interrupt_x86_hardirq(env, intno, 1);
|
||||||
cs->interrupt_request &= ~CPU_INTERRUPT_VIRQ;
|
cs->interrupt_request &= ~CPU_INTERRUPT_VIRQ;
|
||||||
|
|
|
@ -27,7 +27,6 @@
|
||||||
#include "tcg/tcg.h"
|
#include "tcg/tcg.h"
|
||||||
#include "tcg/tcg-op.h"
|
#include "tcg/tcg-op.h"
|
||||||
#include "tcg/tcg-mo.h"
|
#include "tcg/tcg-mo.h"
|
||||||
#include "trace-tcg.h"
|
|
||||||
#include "exec/plugin-gen.h"
|
#include "exec/plugin-gen.h"
|
||||||
|
|
||||||
/* Reduce the number of ifdefs below. This assumes that all uses of
|
/* Reduce the number of ifdefs below. This assumes that all uses of
|
||||||
|
@ -2877,7 +2876,6 @@ void tcg_gen_qemu_ld_i32(TCGv_i32 val, TCGv addr, TCGArg idx, MemOp memop)
|
||||||
tcg_gen_req_mo(TCG_MO_LD_LD | TCG_MO_ST_LD);
|
tcg_gen_req_mo(TCG_MO_LD_LD | TCG_MO_ST_LD);
|
||||||
memop = tcg_canonicalize_memop(memop, 0, 0);
|
memop = tcg_canonicalize_memop(memop, 0, 0);
|
||||||
oi = make_memop_idx(memop, idx);
|
oi = make_memop_idx(memop, idx);
|
||||||
trace_guest_ld_before_tcg(tcg_ctx->cpu, cpu_env, addr, oi);
|
|
||||||
|
|
||||||
orig_memop = memop;
|
orig_memop = memop;
|
||||||
if (!TCG_TARGET_HAS_MEMORY_BSWAP && (memop & MO_BSWAP)) {
|
if (!TCG_TARGET_HAS_MEMORY_BSWAP && (memop & MO_BSWAP)) {
|
||||||
|
@ -2916,7 +2914,6 @@ void tcg_gen_qemu_st_i32(TCGv_i32 val, TCGv addr, TCGArg idx, MemOp memop)
|
||||||
tcg_gen_req_mo(TCG_MO_LD_ST | TCG_MO_ST_ST);
|
tcg_gen_req_mo(TCG_MO_LD_ST | TCG_MO_ST_ST);
|
||||||
memop = tcg_canonicalize_memop(memop, 0, 1);
|
memop = tcg_canonicalize_memop(memop, 0, 1);
|
||||||
oi = make_memop_idx(memop, idx);
|
oi = make_memop_idx(memop, idx);
|
||||||
trace_guest_st_before_tcg(tcg_ctx->cpu, cpu_env, addr, oi);
|
|
||||||
|
|
||||||
if (!TCG_TARGET_HAS_MEMORY_BSWAP && (memop & MO_BSWAP)) {
|
if (!TCG_TARGET_HAS_MEMORY_BSWAP && (memop & MO_BSWAP)) {
|
||||||
swap = tcg_temp_new_i32();
|
swap = tcg_temp_new_i32();
|
||||||
|
@ -2965,7 +2962,6 @@ void tcg_gen_qemu_ld_i64(TCGv_i64 val, TCGv addr, TCGArg idx, MemOp memop)
|
||||||
tcg_gen_req_mo(TCG_MO_LD_LD | TCG_MO_ST_LD);
|
tcg_gen_req_mo(TCG_MO_LD_LD | TCG_MO_ST_LD);
|
||||||
memop = tcg_canonicalize_memop(memop, 1, 0);
|
memop = tcg_canonicalize_memop(memop, 1, 0);
|
||||||
oi = make_memop_idx(memop, idx);
|
oi = make_memop_idx(memop, idx);
|
||||||
trace_guest_ld_before_tcg(tcg_ctx->cpu, cpu_env, addr, oi);
|
|
||||||
|
|
||||||
orig_memop = memop;
|
orig_memop = memop;
|
||||||
if (!TCG_TARGET_HAS_MEMORY_BSWAP && (memop & MO_BSWAP)) {
|
if (!TCG_TARGET_HAS_MEMORY_BSWAP && (memop & MO_BSWAP)) {
|
||||||
|
@ -3013,7 +3009,6 @@ void tcg_gen_qemu_st_i64(TCGv_i64 val, TCGv addr, TCGArg idx, MemOp memop)
|
||||||
tcg_gen_req_mo(TCG_MO_LD_ST | TCG_MO_ST_ST);
|
tcg_gen_req_mo(TCG_MO_LD_ST | TCG_MO_ST_ST);
|
||||||
memop = tcg_canonicalize_memop(memop, 1, 1);
|
memop = tcg_canonicalize_memop(memop, 1, 1);
|
||||||
oi = make_memop_idx(memop, idx);
|
oi = make_memop_idx(memop, idx);
|
||||||
trace_guest_st_before_tcg(tcg_ctx->cpu, cpu_env, addr, oi);
|
|
||||||
|
|
||||||
if (!TCG_TARGET_HAS_MEMORY_BSWAP && (memop & MO_BSWAP)) {
|
if (!TCG_TARGET_HAS_MEMORY_BSWAP && (memop & MO_BSWAP)) {
|
||||||
swap = tcg_temp_new_i64();
|
swap = tcg_temp_new_i64();
|
||||||
|
|
|
@ -34,10 +34,6 @@ endif
|
||||||
ifneq ($(wildcard config-host.mak),)
|
ifneq ($(wildcard config-host.mak),)
|
||||||
export SRC_PATH
|
export SRC_PATH
|
||||||
|
|
||||||
# Get the list of all supported sysemu targets
|
|
||||||
SYSEMU_TARGET_LIST := $(subst -softmmu.mak,,$(notdir \
|
|
||||||
$(wildcard $(SRC_PATH)/configs/*-softmmu.mak)))
|
|
||||||
|
|
||||||
SPEED = quick
|
SPEED = quick
|
||||||
|
|
||||||
# Build up our target list from the filtered list of ninja targets
|
# Build up our target list from the filtered list of ninja targets
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
# THIS FILE WAS AUTO-GENERATED
|
# THIS FILE WAS AUTO-GENERATED
|
||||||
#
|
#
|
||||||
# $ lcitool dockerfile alpine-edge qemu
|
# $ lcitool dockerfile --layers all alpine-edge qemu
|
||||||
#
|
#
|
||||||
# https://gitlab.com/libvirt/libvirt-ci
|
# https://gitlab.com/libvirt/libvirt-ci
|
||||||
|
|
||||||
|
@ -56,7 +56,6 @@ RUN apk update && \
|
||||||
libtasn1-dev \
|
libtasn1-dev \
|
||||||
liburing-dev \
|
liburing-dev \
|
||||||
libusb-dev \
|
libusb-dev \
|
||||||
libxml2-dev \
|
|
||||||
linux-pam-dev \
|
linux-pam-dev \
|
||||||
llvm11 \
|
llvm11 \
|
||||||
lttng-ust-dev \
|
lttng-ust-dev \
|
||||||
|
@ -109,6 +108,7 @@ RUN apk update && \
|
||||||
zlib-dev \
|
zlib-dev \
|
||||||
zlib-static \
|
zlib-static \
|
||||||
zstd-dev && \
|
zstd-dev && \
|
||||||
|
apk list | sort > /packages.txt && \
|
||||||
mkdir -p /usr/libexec/ccache-wrappers && \
|
mkdir -p /usr/libexec/ccache-wrappers && \
|
||||||
ln -s /usr/bin/ccache /usr/libexec/ccache-wrappers/c++ && \
|
ln -s /usr/bin/ccache /usr/libexec/ccache-wrappers/c++ && \
|
||||||
ln -s /usr/bin/ccache /usr/libexec/ccache-wrappers/cc && \
|
ln -s /usr/bin/ccache /usr/libexec/ccache-wrappers/cc && \
|
||||||
|
|
|
@ -1,10 +1,10 @@
|
||||||
# THIS FILE WAS AUTO-GENERATED
|
# THIS FILE WAS AUTO-GENERATED
|
||||||
#
|
#
|
||||||
# $ lcitool dockerfile centos-8 qemu
|
# $ lcitool dockerfile --layers all centos-stream-8 qemu
|
||||||
#
|
#
|
||||||
# https://gitlab.com/libvirt/libvirt-ci
|
# https://gitlab.com/libvirt/libvirt-ci
|
||||||
|
|
||||||
FROM docker.io/library/centos:8
|
FROM quay.io/centos/centos:stream8
|
||||||
|
|
||||||
RUN dnf update -y && \
|
RUN dnf update -y && \
|
||||||
dnf install 'dnf-command(config-manager)' -y && \
|
dnf install 'dnf-command(config-manager)' -y && \
|
||||||
|
@ -69,10 +69,8 @@ RUN dnf update -y && \
|
||||||
libssh-devel \
|
libssh-devel \
|
||||||
libtasn1-devel \
|
libtasn1-devel \
|
||||||
libubsan \
|
libubsan \
|
||||||
libudev-devel \
|
|
||||||
liburing-devel \
|
liburing-devel \
|
||||||
libusbx-devel \
|
libusbx-devel \
|
||||||
libxml2-devel \
|
|
||||||
libzstd-devel \
|
libzstd-devel \
|
||||||
llvm \
|
llvm \
|
||||||
lttng-ust-devel \
|
lttng-ust-devel \
|
||||||
|
|
|
@ -16,7 +16,7 @@ RUN apt update && \
|
||||||
|
|
||||||
# Specify the cross prefix for this image (see tests/docker/common.rc)
|
# Specify the cross prefix for this image (see tests/docker/common.rc)
|
||||||
ENV QEMU_CONFIGURE_OPTS --cross-prefix=powerpc64le-linux-gnu-
|
ENV QEMU_CONFIGURE_OPTS --cross-prefix=powerpc64le-linux-gnu-
|
||||||
ENV DEF_TARGET_LIST ppc64-softmmu,ppc64-linux-user,ppc64abi32-linux-user
|
ENV DEF_TARGET_LIST ppc64-softmmu,ppc64-linux-user
|
||||||
|
|
||||||
# Install extra libraries to increase code coverage
|
# Install extra libraries to increase code coverage
|
||||||
RUN apt update && \
|
RUN apt update && \
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
# THIS FILE WAS AUTO-GENERATED
|
# THIS FILE WAS AUTO-GENERATED
|
||||||
#
|
#
|
||||||
# $ lcitool dockerfile fedora-35 qemu
|
# $ lcitool dockerfile --layers all fedora-35 qemu
|
||||||
#
|
#
|
||||||
# https://gitlab.com/libvirt/libvirt-ci
|
# https://gitlab.com/libvirt/libvirt-ci
|
||||||
|
|
||||||
|
@ -77,10 +77,8 @@ exec "$@"' > /usr/bin/nosync && \
|
||||||
libssh-devel \
|
libssh-devel \
|
||||||
libtasn1-devel \
|
libtasn1-devel \
|
||||||
libubsan \
|
libubsan \
|
||||||
libudev-devel \
|
|
||||||
liburing-devel \
|
liburing-devel \
|
||||||
libusbx-devel \
|
libusbx-devel \
|
||||||
libxml2-devel \
|
|
||||||
libzstd-devel \
|
libzstd-devel \
|
||||||
llvm \
|
llvm \
|
||||||
lttng-ust-devel \
|
lttng-ust-devel \
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
# THIS FILE WAS AUTO-GENERATED
|
# THIS FILE WAS AUTO-GENERATED
|
||||||
#
|
#
|
||||||
# $ lcitool dockerfile opensuse-leap-152 qemu
|
# $ lcitool dockerfile --layers all opensuse-leap-152 qemu
|
||||||
#
|
#
|
||||||
# https://gitlab.com/libvirt/libvirt-ci
|
# https://gitlab.com/libvirt/libvirt-ci
|
||||||
|
|
||||||
|
@ -71,7 +71,6 @@ RUN zypper update -y && \
|
||||||
libudev-devel \
|
libudev-devel \
|
||||||
liburing-devel \
|
liburing-devel \
|
||||||
libusb-1_0-devel \
|
libusb-1_0-devel \
|
||||||
libxml2-devel \
|
|
||||||
libzstd-devel \
|
libzstd-devel \
|
||||||
llvm \
|
llvm \
|
||||||
lttng-ust-devel \
|
lttng-ust-devel \
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
# THIS FILE WAS AUTO-GENERATED
|
# THIS FILE WAS AUTO-GENERATED
|
||||||
#
|
#
|
||||||
# $ lcitool dockerfile ubuntu-1804 qemu
|
# $ lcitool dockerfile --layers all ubuntu-1804 qemu
|
||||||
#
|
#
|
||||||
# https://gitlab.com/libvirt/libvirt-ci
|
# https://gitlab.com/libvirt/libvirt-ci
|
||||||
|
|
||||||
|
@ -52,6 +52,7 @@ RUN export DEBIAN_FRONTEND=noninteractive && \
|
||||||
libglib2.0-dev \
|
libglib2.0-dev \
|
||||||
libgnutls28-dev \
|
libgnutls28-dev \
|
||||||
libgtk-3-dev \
|
libgtk-3-dev \
|
||||||
|
libibumad-dev \
|
||||||
libibverbs-dev \
|
libibverbs-dev \
|
||||||
libiscsi-dev \
|
libiscsi-dev \
|
||||||
libjemalloc-dev \
|
libjemalloc-dev \
|
||||||
|
@ -89,7 +90,6 @@ RUN export DEBIAN_FRONTEND=noninteractive && \
|
||||||
libvirglrenderer-dev \
|
libvirglrenderer-dev \
|
||||||
libvte-2.91-dev \
|
libvte-2.91-dev \
|
||||||
libxen-dev \
|
libxen-dev \
|
||||||
libxml2-dev \
|
|
||||||
libzstd-dev \
|
libzstd-dev \
|
||||||
llvm \
|
llvm \
|
||||||
locales \
|
locales \
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
# THIS FILE WAS AUTO-GENERATED
|
# THIS FILE WAS AUTO-GENERATED
|
||||||
#
|
#
|
||||||
# $ lcitool dockerfile ubuntu-2004 qemu
|
# $ lcitool dockerfile --layers all ubuntu-2004 qemu
|
||||||
#
|
#
|
||||||
# https://gitlab.com/libvirt/libvirt-ci
|
# https://gitlab.com/libvirt/libvirt-ci
|
||||||
|
|
||||||
|
@ -53,6 +53,7 @@ RUN export DEBIAN_FRONTEND=noninteractive && \
|
||||||
libglusterfs-dev \
|
libglusterfs-dev \
|
||||||
libgnutls28-dev \
|
libgnutls28-dev \
|
||||||
libgtk-3-dev \
|
libgtk-3-dev \
|
||||||
|
libibumad-dev \
|
||||||
libibverbs-dev \
|
libibverbs-dev \
|
||||||
libiscsi-dev \
|
libiscsi-dev \
|
||||||
libjemalloc-dev \
|
libjemalloc-dev \
|
||||||
|
@ -91,7 +92,6 @@ RUN export DEBIAN_FRONTEND=noninteractive && \
|
||||||
libvirglrenderer-dev \
|
libvirglrenderer-dev \
|
||||||
libvte-2.91-dev \
|
libvte-2.91-dev \
|
||||||
libxen-dev \
|
libxen-dev \
|
||||||
libxml2-dev \
|
|
||||||
libzstd-dev \
|
libzstd-dev \
|
||||||
llvm \
|
llvm \
|
||||||
locales \
|
locales \
|
||||||
|
|
|
@ -13,5 +13,5 @@ lcitool:
|
||||||
lcitool-help: lcitool
|
lcitool-help: lcitool
|
||||||
|
|
||||||
lcitool-refresh:
|
lcitool-refresh:
|
||||||
$(call quiet-command, git submodule update --init $(SRC_PATH)/tests/lcitool/libvirt-ci)
|
$(call quiet-command, cd $(SRC_PATH) && git submodule update --init tests/lcitool/libvirt-ci)
|
||||||
$(call quiet-command, $(LCITOOL_REFRESH))
|
$(call quiet-command, $(LCITOOL_REFRESH))
|
||||||
|
|
|
@ -1 +1 @@
|
||||||
Subproject commit 29cec2153b9a4dbb2e66f1cbc9866a4eff519cfd
|
Subproject commit 6dd9b6fab1fe081b16bc975485d7a02c81ba5fbe
|
|
@ -43,6 +43,7 @@ packages:
|
||||||
- libfdt
|
- libfdt
|
||||||
- libffi
|
- libffi
|
||||||
- libgcrypt
|
- libgcrypt
|
||||||
|
- libibumad
|
||||||
- libibverbs
|
- libibverbs
|
||||||
- libiscsi
|
- libiscsi
|
||||||
- libjemalloc
|
- libjemalloc
|
||||||
|
@ -63,7 +64,6 @@ packages:
|
||||||
- liburing
|
- liburing
|
||||||
- libusbx
|
- libusbx
|
||||||
- libvdeplug
|
- libvdeplug
|
||||||
- libxml2
|
|
||||||
- libzstd
|
- libzstd
|
||||||
- llvm
|
- llvm
|
||||||
- lttng-ust
|
- lttng-ust
|
||||||
|
|
|
@ -62,7 +62,7 @@ def generate_dockerfile(host, target, cross=None, trailer=None):
|
||||||
|
|
||||||
def generate_cirrus(target, trailer=None):
|
def generate_cirrus(target, trailer=None):
|
||||||
filename = Path(src_dir, ".gitlab-ci.d", "cirrus", target + ".vars")
|
filename = Path(src_dir, ".gitlab-ci.d", "cirrus", target + ".vars")
|
||||||
cmd = [lcitool_path, "variables", target, "qemu"]
|
cmd = lcitool_cmd + ["variables", target, "qemu"]
|
||||||
generate(filename, cmd, trailer)
|
generate(filename, cmd, trailer)
|
||||||
|
|
||||||
ubuntu1804_skipssh = [
|
ubuntu1804_skipssh = [
|
||||||
|
@ -77,7 +77,7 @@ ubuntu2004_tsanhack = [
|
||||||
]
|
]
|
||||||
|
|
||||||
try:
|
try:
|
||||||
generate_dockerfile("centos8", "centos-8")
|
generate_dockerfile("centos8", "centos-stream-8")
|
||||||
generate_dockerfile("fedora", "fedora-35")
|
generate_dockerfile("fedora", "fedora-35")
|
||||||
generate_dockerfile("ubuntu1804", "ubuntu-1804",
|
generate_dockerfile("ubuntu1804", "ubuntu-1804",
|
||||||
trailer="".join(ubuntu1804_skipssh))
|
trailer="".join(ubuntu1804_skipssh))
|
||||||
|
|
|
@ -16,22 +16,80 @@
|
||||||
|
|
||||||
QEMU_PLUGIN_EXPORT int qemu_plugin_version = QEMU_PLUGIN_VERSION;
|
QEMU_PLUGIN_EXPORT int qemu_plugin_version = QEMU_PLUGIN_VERSION;
|
||||||
|
|
||||||
static uint64_t insn_count;
|
#define MAX_CPUS 8 /* lets not go nuts */
|
||||||
|
|
||||||
|
typedef struct {
|
||||||
|
uint64_t last_pc;
|
||||||
|
uint64_t insn_count;
|
||||||
|
} InstructionCount;
|
||||||
|
|
||||||
|
static InstructionCount counts[MAX_CPUS];
|
||||||
|
static uint64_t inline_insn_count;
|
||||||
|
|
||||||
static bool do_inline;
|
static bool do_inline;
|
||||||
static bool do_size;
|
static bool do_size;
|
||||||
static GArray *sizes;
|
static GArray *sizes;
|
||||||
|
|
||||||
|
typedef struct {
|
||||||
|
char *match_string;
|
||||||
|
uint64_t hits[MAX_CPUS];
|
||||||
|
uint64_t last_hit[MAX_CPUS];
|
||||||
|
uint64_t total_delta[MAX_CPUS];
|
||||||
|
GPtrArray *history[MAX_CPUS];
|
||||||
|
} Match;
|
||||||
|
|
||||||
|
static GArray *matches;
|
||||||
|
|
||||||
|
typedef struct {
|
||||||
|
Match *match;
|
||||||
|
uint64_t vaddr;
|
||||||
|
uint64_t hits;
|
||||||
|
char *disas;
|
||||||
|
} Instruction;
|
||||||
|
|
||||||
static void vcpu_insn_exec_before(unsigned int cpu_index, void *udata)
|
static void vcpu_insn_exec_before(unsigned int cpu_index, void *udata)
|
||||||
{
|
{
|
||||||
static uint64_t last_pc;
|
unsigned int i = cpu_index % MAX_CPUS;
|
||||||
|
InstructionCount *c = &counts[i];
|
||||||
uint64_t this_pc = GPOINTER_TO_UINT(udata);
|
uint64_t this_pc = GPOINTER_TO_UINT(udata);
|
||||||
if (this_pc == last_pc) {
|
if (this_pc == c->last_pc) {
|
||||||
g_autofree gchar *out = g_strdup_printf("detected repeat execution @ 0x%"
|
g_autofree gchar *out = g_strdup_printf("detected repeat execution @ 0x%"
|
||||||
PRIx64 "\n", this_pc);
|
PRIx64 "\n", this_pc);
|
||||||
qemu_plugin_outs(out);
|
qemu_plugin_outs(out);
|
||||||
}
|
}
|
||||||
last_pc = this_pc;
|
c->last_pc = this_pc;
|
||||||
insn_count++;
|
c->insn_count++;
|
||||||
|
}
|
||||||
|
|
||||||
|
static void vcpu_insn_matched_exec_before(unsigned int cpu_index, void *udata)
|
||||||
|
{
|
||||||
|
unsigned int i = cpu_index % MAX_CPUS;
|
||||||
|
Instruction *insn = (Instruction *) udata;
|
||||||
|
Match *match = insn->match;
|
||||||
|
g_autoptr(GString) ts = g_string_new("");
|
||||||
|
|
||||||
|
insn->hits++;
|
||||||
|
g_string_append_printf(ts, "0x%" PRIx64 ", '%s', %"PRId64 " hits",
|
||||||
|
insn->vaddr, insn->disas, insn->hits);
|
||||||
|
|
||||||
|
uint64_t icount = counts[i].insn_count;
|
||||||
|
uint64_t delta = icount - match->last_hit[i];
|
||||||
|
|
||||||
|
match->hits[i]++;
|
||||||
|
match->total_delta[i] += delta;
|
||||||
|
|
||||||
|
g_string_append_printf(ts,
|
||||||
|
", %"PRId64" match hits, "
|
||||||
|
"Δ+%"PRId64 " since last match,"
|
||||||
|
" %"PRId64 " avg insns/match\n",
|
||||||
|
match->hits[i], delta,
|
||||||
|
match->total_delta[i] / match->hits[i]);
|
||||||
|
|
||||||
|
match->last_hit[i] = icount;
|
||||||
|
|
||||||
|
qemu_plugin_outs(ts->str);
|
||||||
|
|
||||||
|
g_ptr_array_add(match->history[i], insn);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void vcpu_tb_trans(qemu_plugin_id_t id, struct qemu_plugin_tb *tb)
|
static void vcpu_tb_trans(qemu_plugin_id_t id, struct qemu_plugin_tb *tb)
|
||||||
|
@ -44,7 +102,7 @@ static void vcpu_tb_trans(qemu_plugin_id_t id, struct qemu_plugin_tb *tb)
|
||||||
|
|
||||||
if (do_inline) {
|
if (do_inline) {
|
||||||
qemu_plugin_register_vcpu_insn_exec_inline(
|
qemu_plugin_register_vcpu_insn_exec_inline(
|
||||||
insn, QEMU_PLUGIN_INLINE_ADD_U64, &insn_count, 1);
|
insn, QEMU_PLUGIN_INLINE_ADD_U64, &inline_insn_count, 1);
|
||||||
} else {
|
} else {
|
||||||
uint64_t vaddr = qemu_plugin_insn_vaddr(insn);
|
uint64_t vaddr = qemu_plugin_insn_vaddr(insn);
|
||||||
qemu_plugin_register_vcpu_insn_exec_cb(
|
qemu_plugin_register_vcpu_insn_exec_cb(
|
||||||
|
@ -60,15 +118,38 @@ static void vcpu_tb_trans(qemu_plugin_id_t id, struct qemu_plugin_tb *tb)
|
||||||
unsigned long *cnt = &g_array_index(sizes, unsigned long, sz);
|
unsigned long *cnt = &g_array_index(sizes, unsigned long, sz);
|
||||||
(*cnt)++;
|
(*cnt)++;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
* If we are tracking certain instructions we will need more
|
||||||
|
* information about the instruction which we also need to
|
||||||
|
* save if there is a hit.
|
||||||
|
*/
|
||||||
|
if (matches) {
|
||||||
|
char *insn_disas = qemu_plugin_insn_disas(insn);
|
||||||
|
int j;
|
||||||
|
for (j = 0; j < matches->len; j++) {
|
||||||
|
Match *m = &g_array_index(matches, Match, j);
|
||||||
|
if (g_str_has_prefix(insn_disas, m->match_string)) {
|
||||||
|
Instruction *rec = g_new0(Instruction, 1);
|
||||||
|
rec->disas = g_strdup(insn_disas);
|
||||||
|
rec->vaddr = qemu_plugin_insn_vaddr(insn);
|
||||||
|
rec->match = m;
|
||||||
|
qemu_plugin_register_vcpu_insn_exec_cb(
|
||||||
|
insn, vcpu_insn_matched_exec_before,
|
||||||
|
QEMU_PLUGIN_CB_NO_REGS, rec);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
g_free(insn_disas);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
static void plugin_exit(qemu_plugin_id_t id, void *p)
|
static void plugin_exit(qemu_plugin_id_t id, void *p)
|
||||||
{
|
{
|
||||||
g_autoptr(GString) out = g_string_new(NULL);
|
g_autoptr(GString) out = g_string_new(NULL);
|
||||||
|
int i;
|
||||||
|
|
||||||
if (do_size) {
|
if (do_size) {
|
||||||
int i;
|
|
||||||
for (i = 0; i <= sizes->len; i++) {
|
for (i = 0; i <= sizes->len; i++) {
|
||||||
unsigned long *cnt = &g_array_index(sizes, unsigned long, i);
|
unsigned long *cnt = &g_array_index(sizes, unsigned long, i);
|
||||||
if (*cnt) {
|
if (*cnt) {
|
||||||
|
@ -76,12 +157,39 @@ static void plugin_exit(qemu_plugin_id_t id, void *p)
|
||||||
"len %d bytes: %ld insns\n", i, *cnt);
|
"len %d bytes: %ld insns\n", i, *cnt);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
} else if (do_inline) {
|
||||||
|
g_string_append_printf(out, "insns: %" PRIu64 "\n", inline_insn_count);
|
||||||
} else {
|
} else {
|
||||||
g_string_append_printf(out, "insns: %" PRIu64 "\n", insn_count);
|
uint64_t total_insns = 0;
|
||||||
|
for (i = 0; i < MAX_CPUS; i++) {
|
||||||
|
InstructionCount *c = &counts[i];
|
||||||
|
if (c->insn_count) {
|
||||||
|
g_string_append_printf(out, "cpu %d insns: %" PRIu64 "\n",
|
||||||
|
i, c->insn_count);
|
||||||
|
total_insns += c->insn_count;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
g_string_append_printf(out, "total insns: %" PRIu64 "\n",
|
||||||
|
total_insns);
|
||||||
}
|
}
|
||||||
qemu_plugin_outs(out->str);
|
qemu_plugin_outs(out->str);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/* Add a match to the array of matches */
|
||||||
|
static void parse_match(char *match)
|
||||||
|
{
|
||||||
|
Match new_match = { .match_string = match };
|
||||||
|
int i;
|
||||||
|
for (i = 0; i < MAX_CPUS; i++) {
|
||||||
|
new_match.history[i] = g_ptr_array_new();
|
||||||
|
}
|
||||||
|
if (!matches) {
|
||||||
|
matches = g_array_new(false, true, sizeof(Match));
|
||||||
|
}
|
||||||
|
g_array_append_val(matches, new_match);
|
||||||
|
}
|
||||||
|
|
||||||
QEMU_PLUGIN_EXPORT int qemu_plugin_install(qemu_plugin_id_t id,
|
QEMU_PLUGIN_EXPORT int qemu_plugin_install(qemu_plugin_id_t id,
|
||||||
const qemu_info_t *info,
|
const qemu_info_t *info,
|
||||||
int argc, char **argv)
|
int argc, char **argv)
|
||||||
|
@ -99,6 +207,8 @@ QEMU_PLUGIN_EXPORT int qemu_plugin_install(qemu_plugin_id_t id,
|
||||||
fprintf(stderr, "boolean argument parsing failed: %s\n", opt);
|
fprintf(stderr, "boolean argument parsing failed: %s\n", opt);
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
} else if (g_strcmp0(tokens[0], "match") == 0) {
|
||||||
|
parse_match(tokens[1]);
|
||||||
} else {
|
} else {
|
||||||
fprintf(stderr, "option parsing failed: %s\n", opt);
|
fprintf(stderr, "option parsing failed: %s\n", opt);
|
||||||
return -1;
|
return -1;
|
||||||
|
|
|
@ -995,20 +995,17 @@ static void register_vhost_user_test(void)
|
||||||
"virtio-net",
|
"virtio-net",
|
||||||
test_migrate, &opts);
|
test_migrate, &opts);
|
||||||
|
|
||||||
/* keeps failing on build-system since Aug 15 2017 */
|
opts.before = vhost_user_test_setup_reconnect;
|
||||||
if (getenv("QTEST_VHOST_USER_FIXME")) {
|
qos_add_test("vhost-user/reconnect", "virtio-net",
|
||||||
opts.before = vhost_user_test_setup_reconnect;
|
test_reconnect, &opts);
|
||||||
qos_add_test("vhost-user/reconnect", "virtio-net",
|
|
||||||
test_reconnect, &opts);
|
|
||||||
|
|
||||||
opts.before = vhost_user_test_setup_connect_fail;
|
opts.before = vhost_user_test_setup_connect_fail;
|
||||||
qos_add_test("vhost-user/connect-fail", "virtio-net",
|
qos_add_test("vhost-user/connect-fail", "virtio-net",
|
||||||
test_vhost_user_started, &opts);
|
test_vhost_user_started, &opts);
|
||||||
|
|
||||||
opts.before = vhost_user_test_setup_flags_mismatch;
|
opts.before = vhost_user_test_setup_flags_mismatch;
|
||||||
qos_add_test("vhost-user/flags-mismatch", "virtio-net",
|
qos_add_test("vhost-user/flags-mismatch", "virtio-net",
|
||||||
test_vhost_user_started, &opts);
|
test_vhost_user_started, &opts);
|
||||||
}
|
|
||||||
|
|
||||||
opts.before = vhost_user_test_setup_multiqueue;
|
opts.before = vhost_user_test_setup_multiqueue;
|
||||||
opts.edge.extra_device_opts = "mq=on";
|
opts.edge.extra_device_opts = "mq=on";
|
||||||
|
|
|
@ -167,7 +167,7 @@ for target in $target_list; do
|
||||||
container_image=debian-nios2-cross
|
container_image=debian-nios2-cross
|
||||||
container_cross_cc=nios2-linux-gnu-gcc
|
container_cross_cc=nios2-linux-gnu-gcc
|
||||||
;;
|
;;
|
||||||
ppc-*|ppc64abi32-*)
|
ppc-*)
|
||||||
container_hosts=x86_64
|
container_hosts=x86_64
|
||||||
container_image=debian-powerpc-test-cross
|
container_image=debian-powerpc-test-cross
|
||||||
container_cross_cc=powerpc-linux-gnu-gcc-10
|
container_cross_cc=powerpc-linux-gnu-gcc-10
|
||||||
|
|
|
@ -18,3 +18,7 @@ run-linux-test: linux-test
|
||||||
$(call skip-test, $<, "BROKEN")
|
$(call skip-test, $<, "BROKEN")
|
||||||
run-plugin-linux-test-with-%:
|
run-plugin-linux-test-with-%:
|
||||||
$(call skip-test, $<, "BROKEN")
|
$(call skip-test, $<, "BROKEN")
|
||||||
|
|
||||||
|
# This test is currently unreliable: https://gitlab.com/qemu-project/qemu/-/issues/856
|
||||||
|
run-plugin-threadcount-with-%:
|
||||||
|
$(call skip-test, $<, "BROKEN")
|
||||||
|
|
14
trace-events
14
trace-events
|
@ -117,20 +117,6 @@ vcpu guest_cpu_exit(void)
|
||||||
# Targets: all
|
# Targets: all
|
||||||
vcpu guest_cpu_reset(void)
|
vcpu guest_cpu_reset(void)
|
||||||
|
|
||||||
# tcg/tcg-op.c
|
|
||||||
|
|
||||||
# @vaddr: Access' virtual address.
|
|
||||||
# @memopidx: Access' information (see below).
|
|
||||||
#
|
|
||||||
# Start virtual memory access (before any potential access violation).
|
|
||||||
# Does not include memory accesses performed by devices.
|
|
||||||
#
|
|
||||||
# Mode: user, softmmu
|
|
||||||
# Targets: TCG(all)
|
|
||||||
vcpu tcg guest_ld_before(TCGv vaddr, uint32_t memopidx) "info=%d", "vaddr=0x%016"PRIx64" memopidx=0x%x"
|
|
||||||
vcpu tcg guest_st_before(TCGv vaddr, uint32_t memopidx) "info=%d", "vaddr=0x%016"PRIx64" memopidx=0x%x"
|
|
||||||
vcpu tcg guest_rmw_before(TCGv vaddr, uint32_t memopidx) "info=%d", "vaddr=0x%016"PRIx64" memopidx=0x%x"
|
|
||||||
|
|
||||||
# include/user/syscall-trace.h
|
# include/user/syscall-trace.h
|
||||||
|
|
||||||
# @num: System call number.
|
# @num: System call number.
|
||||||
|
|
|
@ -66,20 +66,6 @@ trace_events_all = custom_target('trace-events-all',
|
||||||
install: true,
|
install: true,
|
||||||
install_dir: qemu_datadir)
|
install_dir: qemu_datadir)
|
||||||
|
|
||||||
foreach d : [
|
|
||||||
['generated-tcg-tracers.h', 'tcg-h'],
|
|
||||||
['generated-helpers.c', 'tcg-helper-c'],
|
|
||||||
['generated-helpers.h', 'tcg-helper-h'],
|
|
||||||
['generated-helpers-wrappers.h', 'tcg-helper-wrapper-h'],
|
|
||||||
]
|
|
||||||
gen = custom_target(d[0],
|
|
||||||
output: d[0],
|
|
||||||
input: meson.project_source_root() / 'trace-events',
|
|
||||||
command: [ tracetool, '--group=root', '--format=@0@'.format(d[1]), '@INPUT@', '@OUTPUT@' ],
|
|
||||||
depend_files: tracetool_depends)
|
|
||||||
specific_ss.add(when: 'CONFIG_TCG', if_true: gen)
|
|
||||||
endforeach
|
|
||||||
|
|
||||||
if 'ust' in get_option('trace_backends')
|
if 'ust' in get_option('trace_backends')
|
||||||
trace_ust_all_h = custom_target('trace-ust-all.h',
|
trace_ust_all_h = custom_target('trace-ust-all.h',
|
||||||
output: 'trace-ust-all.h',
|
output: 'trace-ust-all.h',
|
||||||
|
|
Loading…
Reference in New Issue