Skip to content

Commit e2f6827

Browse files
Merge remote-tracking branch 'upstream/master'
2 parents 152fdbe + c13b8e9 commit e2f6827

File tree

508 files changed

+17725
-6178
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

508 files changed

+17725
-6178
lines changed

.cirrus.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,6 @@ windows_msys2_task:
3232
mingw-w64-x86_64-libgcrypt
3333
mingw-w64-x86_64-libpng
3434
mingw-w64-x86_64-libssh
35-
mingw-w64-x86_64-libxml2
3635
mingw-w64-x86_64-snappy
3736
mingw-w64-x86_64-libusb
3837
mingw-w64-x86_64-usbredir

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,3 +17,4 @@ GTAGS
1717
*.depend_raw
1818
*.swp
1919
*.patch
20+
*.gcov

.gitlab-ci.d/buildtest.yml

Lines changed: 0 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -473,33 +473,6 @@ tsan-build:
473473
TARGETS: x86_64-softmmu ppc64-softmmu riscv64-softmmu x86_64-linux-user
474474
MAKE_CHECK_ARGS: bench V=1
475475

476-
# These targets are on the way out
477-
build-deprecated:
478-
extends: .native_build_job_template
479-
needs:
480-
job: amd64-debian-user-cross-container
481-
variables:
482-
IMAGE: debian-all-test-cross
483-
CONFIGURE_ARGS: --disable-tools
484-
MAKE_CHECK_ARGS: build-tcg
485-
TARGETS: ppc64abi32-linux-user
486-
artifacts:
487-
expire_in: 2 days
488-
paths:
489-
- build
490-
491-
# We split the check-tcg step as test failures are expected but we still
492-
# want to catch the build breaking.
493-
check-deprecated:
494-
extends: .native_test_job_template
495-
needs:
496-
- job: build-deprecated
497-
artifacts: true
498-
variables:
499-
IMAGE: debian-all-test-cross
500-
MAKE_CHECK_ARGS: check-tcg
501-
allow_failure: true
502-
503476
# gprof/gcov are GCC features
504477
build-gprof-gcov:
505478
extends: .native_build_job_template

.gitlab-ci.d/cirrus/freebsd-12.vars

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,6 @@ MAKE='/usr/local/bin/gmake'
1111
NINJA='/usr/local/bin/ninja'
1212
PACKAGING_COMMAND='pkg'
1313
PIP3='/usr/local/bin/pip-3.8'
14-
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'
14+
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'
1515
PYPI_PKGS=''
1616
PYTHON='/usr/local/bin/python3'

.gitlab-ci.d/cirrus/freebsd-13.vars

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,6 @@ MAKE='/usr/local/bin/gmake'
1111
NINJA='/usr/local/bin/ninja'
1212
PACKAGING_COMMAND='pkg'
1313
PIP3='/usr/local/bin/pip-3.8'
14-
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'
14+
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'
1515
PYPI_PKGS=''
1616
PYTHON='/usr/local/bin/python3'

.gitlab-ci.d/cirrus/macos-11.vars

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,6 @@ MAKE='/usr/local/bin/gmake'
1111
NINJA='/usr/local/bin/ninja'
1212
PACKAGING_COMMAND='brew'
1313
PIP3='/usr/local/bin/pip3'
14-
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'
14+
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'
1515
PYPI_PKGS='PyYAML numpy pillow sphinx sphinx-rtd-theme virtualenv'
1616
PYTHON='/usr/local/bin/python3'

.gitlab-ci.d/crossbuild-template.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
- make -j$(expr $(nproc) + 1) all check-build $MAKE_CHECK_ARGS
1515
- if grep -q "EXESUF=.exe" config-host.mak;
1616
then make installer;
17-
version="$(git describe --match v[0-9]*)";
17+
version="$(git describe --match v[0-9]* 2>/dev/null || git rev-parse --short HEAD)";
1818
mv -v qemu-setup*.exe qemu-setup-${version}.exe;
1919
fi
2020

.gitlab-ci.d/windows.yml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,6 @@ msys2-64bit:
4444
mingw-w64-x86_64-libssh
4545
mingw-w64-x86_64-libtasn1
4646
mingw-w64-x86_64-libusb
47-
mingw-w64-x86_64-libxml2
4847
mingw-w64-x86_64-nettle
4948
mingw-w64-x86_64-ninja
5049
mingw-w64-x86_64-pixman
@@ -80,7 +79,6 @@ msys2-32bit:
8079
mingw-w64-i686-libssh
8180
mingw-w64-i686-libtasn1
8281
mingw-w64-i686-libusb
83-
mingw-w64-i686-libxml2
8482
mingw-w64-i686-lzo2
8583
mingw-w64-i686-ninja
8684
mingw-w64-i686-pixman

.gitmodules

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,4 +66,4 @@
6666
url = https://gitlab.com/qemu-project/vbootrom.git
6767
[submodule "tests/lcitool/libvirt-ci"]
6868
path = tests/lcitool/libvirt-ci
69-
url = http://gitlab.com/libvirt/libvirt-ci
69+
url = https://gitlab.com/libvirt/libvirt-ci.git

MAINTAINERS

Lines changed: 16 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -286,6 +286,13 @@ F: include/hw/riscv/
286286
F: linux-user/host/riscv32/
287287
F: linux-user/host/riscv64/
288288

289+
RISC-V XVentanaCondOps extension
290+
M: Philipp Tomsich <[email protected]>
291+
292+
S: Supported
293+
F: target/riscv/XVentanaCondOps.decode
294+
F: target/riscv/insn_trans/trans_xventanacondops.c.inc
295+
289296
RENESAS RX CPUs
290297
R: Yoshinori Sato <[email protected]>
291298
S: Orphan
@@ -408,7 +415,7 @@ M: Paolo Bonzini <[email protected]>
408415
M: Marcelo Tosatti <[email protected]>
409416
410417
S: Supported
411-
F: docs/amd-memory-encryption.txt
418+
F: docs/system/i386/amd-memory-encryption.rst
412419
F: docs/system/i386/sgx.rst
413420
F: target/i386/kvm/
414421
F: target/i386/sev*
@@ -818,7 +825,6 @@ F: docs/system/arm/palm.rst
818825

819826
Raspberry Pi
820827
M: Peter Maydell <[email protected]>
821-
R: Andrew Baumann <[email protected]>
822828
R: Philippe Mathieu-Daudé <[email protected]>
823829
824830
S: Odd Fixes
@@ -958,6 +964,12 @@ F: hw/display/dpcd.c
958964
F: include/hw/display/dpcd.h
959965
F: docs/system/arm/xlnx-versal-virt.rst
960966

967+
Xilinx Versal OSPI
968+
M: Francisco Iglesias <[email protected]>
969+
S: Maintained
970+
F: hw/ssi/xlnx-versal-ospi.c
971+
F: include/hw/ssi/xlnx-versal-ospi.h
972+
961973
ARM ACPI Subsystem
962974
M: Shannon Zhao <[email protected]>
963975
@@ -3181,6 +3193,7 @@ R: Kyle Evans <[email protected]>
31813193
S: Maintained
31823194
F: bsd-user/
31833195
F: configs/targets/*-bsd-user.mak
3196+
F: tests/vm/*bsd
31843197
T: git https://github.com/qemu-bsd-user/qemu-bsd-user bsd-user-rebase-3.1
31853198

31863199
Linux user
@@ -3579,6 +3592,7 @@ F: .travis.yml
35793592
F: scripts/ci/
35803593
F: tests/docker/
35813594
F: tests/vm/
3595+
F: tests/lcitool/
35823596
F: scripts/archive-source.sh
35833597
W: https://gitlab.com/qemu-project/qemu/pipelines
35843598
W: https://travis-ci.org/qemu/qemu

Makefile

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -206,7 +206,8 @@ recurse-clean: $(addsuffix /clean, $(ROM_DIRS))
206206
clean: recurse-clean
207207
-$(quiet-@)test -f build.ninja && $(NINJA) $(NINJAFLAGS) -t clean || :
208208
-$(quiet-@)test -f build.ninja && $(NINJA) $(NINJAFLAGS) clean-ctlist || :
209-
find . \( -name '*.so' -o -name '*.dll' -o -name '*.[oda]' \) -type f \
209+
find . \( -name '*.so' -o -name '*.dll' -o \
210+
-name '*.[oda]' -o -name '*.gcno' \) -type f \
210211
! -path ./roms/edk2/ArmPkg/Library/GccLto/liblto-aarch64.a \
211212
! -path ./roms/edk2/ArmPkg/Library/GccLto/liblto-arm.a \
212213
-exec rm {} +

accel/tcg/atomic_common.c.inc

Lines changed: 0 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -13,39 +13,19 @@
1313
* See the COPYING file in the top-level directory.
1414
*/
1515

16-
static void atomic_trace_rmw_pre(CPUArchState *env, target_ulong addr,
17-
MemOpIdx oi)
18-
{
19-
CPUState *cpu = env_cpu(env);
20-
21-
trace_guest_rmw_before_exec(cpu, addr, oi);
22-
}
23-
2416
static void atomic_trace_rmw_post(CPUArchState *env, target_ulong addr,
2517
MemOpIdx oi)
2618
{
2719
qemu_plugin_vcpu_mem_cb(env_cpu(env), addr, oi, QEMU_PLUGIN_MEM_RW);
2820
}
2921

3022
#if HAVE_ATOMIC128
31-
static void atomic_trace_ld_pre(CPUArchState *env, target_ulong addr,
32-
MemOpIdx oi)
33-
{
34-
trace_guest_ld_before_exec(env_cpu(env), addr, oi);
35-
}
36-
3723
static void atomic_trace_ld_post(CPUArchState *env, target_ulong addr,
3824
MemOpIdx oi)
3925
{
4026
qemu_plugin_vcpu_mem_cb(env_cpu(env), addr, oi, QEMU_PLUGIN_MEM_R);
4127
}
4228

43-
static void atomic_trace_st_pre(CPUArchState *env, target_ulong addr,
44-
MemOpIdx oi)
45-
{
46-
trace_guest_st_before_exec(env_cpu(env), addr, oi);
47-
}
48-
4929
static void atomic_trace_st_post(CPUArchState *env, target_ulong addr,
5030
MemOpIdx oi)
5131
{

accel/tcg/atomic_template.h

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,6 @@ ABI_TYPE ATOMIC_NAME(cmpxchg)(CPUArchState *env, target_ulong addr,
7777
PAGE_READ | PAGE_WRITE, retaddr);
7878
DATA_TYPE ret;
7979

80-
atomic_trace_rmw_pre(env, addr, oi);
8180
#if DATA_SIZE == 16
8281
ret = atomic16_cmpxchg(haddr, cmpv, newv);
8382
#else
@@ -97,7 +96,6 @@ ABI_TYPE ATOMIC_NAME(ld)(CPUArchState *env, target_ulong addr,
9796
PAGE_READ, retaddr);
9897
DATA_TYPE val;
9998

100-
atomic_trace_ld_pre(env, addr, oi);
10199
val = atomic16_read(haddr);
102100
ATOMIC_MMU_CLEANUP;
103101
atomic_trace_ld_post(env, addr, oi);
@@ -110,7 +108,6 @@ void ATOMIC_NAME(st)(CPUArchState *env, target_ulong addr, ABI_TYPE val,
110108
DATA_TYPE *haddr = atomic_mmu_lookup(env, addr, oi, DATA_SIZE,
111109
PAGE_WRITE, retaddr);
112110

113-
atomic_trace_st_pre(env, addr, oi);
114111
atomic16_set(haddr, val);
115112
ATOMIC_MMU_CLEANUP;
116113
atomic_trace_st_post(env, addr, oi);
@@ -124,7 +121,6 @@ ABI_TYPE ATOMIC_NAME(xchg)(CPUArchState *env, target_ulong addr, ABI_TYPE val,
124121
PAGE_READ | PAGE_WRITE, retaddr);
125122
DATA_TYPE ret;
126123

127-
atomic_trace_rmw_pre(env, addr, oi);
128124
ret = qatomic_xchg__nocheck(haddr, val);
129125
ATOMIC_MMU_CLEANUP;
130126
atomic_trace_rmw_post(env, addr, oi);
@@ -138,7 +134,6 @@ ABI_TYPE ATOMIC_NAME(X)(CPUArchState *env, target_ulong addr, \
138134
DATA_TYPE *haddr = atomic_mmu_lookup(env, addr, oi, DATA_SIZE, \
139135
PAGE_READ | PAGE_WRITE, retaddr); \
140136
DATA_TYPE ret; \
141-
atomic_trace_rmw_pre(env, addr, oi); \
142137
ret = qatomic_##X(haddr, val); \
143138
ATOMIC_MMU_CLEANUP; \
144139
atomic_trace_rmw_post(env, addr, oi); \
@@ -171,7 +166,6 @@ ABI_TYPE ATOMIC_NAME(X)(CPUArchState *env, target_ulong addr, \
171166
XDATA_TYPE *haddr = atomic_mmu_lookup(env, addr, oi, DATA_SIZE, \
172167
PAGE_READ | PAGE_WRITE, retaddr); \
173168
XDATA_TYPE cmp, old, new, val = xval; \
174-
atomic_trace_rmw_pre(env, addr, oi); \
175169
smp_mb(); \
176170
cmp = qatomic_read__nocheck(haddr); \
177171
do { \
@@ -216,7 +210,6 @@ ABI_TYPE ATOMIC_NAME(cmpxchg)(CPUArchState *env, target_ulong addr,
216210
PAGE_READ | PAGE_WRITE, retaddr);
217211
DATA_TYPE ret;
218212

219-
atomic_trace_rmw_pre(env, addr, oi);
220213
#if DATA_SIZE == 16
221214
ret = atomic16_cmpxchg(haddr, BSWAP(cmpv), BSWAP(newv));
222215
#else
@@ -236,7 +229,6 @@ ABI_TYPE ATOMIC_NAME(ld)(CPUArchState *env, target_ulong addr,
236229
PAGE_READ, retaddr);
237230
DATA_TYPE val;
238231

239-
atomic_trace_ld_pre(env, addr, oi);
240232
val = atomic16_read(haddr);
241233
ATOMIC_MMU_CLEANUP;
242234
atomic_trace_ld_post(env, addr, oi);
@@ -249,7 +241,6 @@ void ATOMIC_NAME(st)(CPUArchState *env, target_ulong addr, ABI_TYPE val,
249241
DATA_TYPE *haddr = atomic_mmu_lookup(env, addr, oi, DATA_SIZE,
250242
PAGE_WRITE, retaddr);
251243

252-
atomic_trace_st_pre(env, addr, oi);
253244
val = BSWAP(val);
254245
atomic16_set(haddr, val);
255246
ATOMIC_MMU_CLEANUP;
@@ -264,7 +255,6 @@ ABI_TYPE ATOMIC_NAME(xchg)(CPUArchState *env, target_ulong addr, ABI_TYPE val,
264255
PAGE_READ | PAGE_WRITE, retaddr);
265256
ABI_TYPE ret;
266257

267-
atomic_trace_rmw_pre(env, addr, oi);
268258
ret = qatomic_xchg__nocheck(haddr, BSWAP(val));
269259
ATOMIC_MMU_CLEANUP;
270260
atomic_trace_rmw_post(env, addr, oi);
@@ -278,7 +268,6 @@ ABI_TYPE ATOMIC_NAME(X)(CPUArchState *env, target_ulong addr, \
278268
DATA_TYPE *haddr = atomic_mmu_lookup(env, addr, oi, DATA_SIZE, \
279269
PAGE_READ | PAGE_WRITE, retaddr); \
280270
DATA_TYPE ret; \
281-
atomic_trace_rmw_pre(env, addr, oi); \
282271
ret = qatomic_##X(haddr, BSWAP(val)); \
283272
ATOMIC_MMU_CLEANUP; \
284273
atomic_trace_rmw_post(env, addr, oi); \
@@ -308,7 +297,6 @@ ABI_TYPE ATOMIC_NAME(X)(CPUArchState *env, target_ulong addr, \
308297
XDATA_TYPE *haddr = atomic_mmu_lookup(env, addr, oi, DATA_SIZE, \
309298
PAGE_READ | PAGE_WRITE, retaddr); \
310299
XDATA_TYPE ldo, ldn, old, new, val = xval; \
311-
atomic_trace_rmw_pre(env, addr, oi); \
312300
smp_mb(); \
313301
ldn = qatomic_read__nocheck(haddr); \
314302
do { \

accel/tcg/cpu-exec.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -660,7 +660,8 @@ static inline bool cpu_handle_exception(CPUState *cpu, int *ret)
660660
if (replay_has_exception()
661661
&& cpu_neg(cpu)->icount_decr.u16.low + cpu->icount_extra == 0) {
662662
/* Execute just one insn to trigger exception pending in the log */
663-
cpu->cflags_next_tb = (curr_cflags(cpu) & ~CF_USE_ICOUNT) | 1;
663+
cpu->cflags_next_tb = (curr_cflags(cpu) & ~CF_USE_ICOUNT)
664+
| CF_NOIRQ | 1;
664665
}
665666
#endif
666667
return false;

accel/tcg/cputlb.c

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -783,6 +783,15 @@ static void tlb_flush_range_by_mmuidx_async_0(CPUState *cpu,
783783
}
784784
qemu_spin_unlock(&env_tlb(env)->c.lock);
785785

786+
/*
787+
* If the length is larger than the jump cache size, then it will take
788+
* longer to clear each entry individually than it will to clear it all.
789+
*/
790+
if (d.len >= (TARGET_PAGE_SIZE * TB_JMP_CACHE_SIZE)) {
791+
cpu_tb_jmp_cache_clear(cpu);
792+
return;
793+
}
794+
786795
for (target_ulong i = 0; i < d.len; i += TARGET_PAGE_SIZE) {
787796
tb_flush_jmp_cache(cpu, d.addr + i);
788797
}
@@ -2140,7 +2149,6 @@ static inline uint64_t cpu_load_helper(CPUArchState *env, abi_ptr addr,
21402149
{
21412150
uint64_t ret;
21422151

2143-
trace_guest_ld_before_exec(env_cpu(env), addr, oi);
21442152
ret = full_load(env, addr, oi, retaddr);
21452153
qemu_plugin_vcpu_mem_cb(env_cpu(env), addr, oi, QEMU_PLUGIN_MEM_R);
21462154
return ret;
@@ -2487,7 +2495,6 @@ static inline void cpu_store_helper(CPUArchState *env, target_ulong addr,
24872495
uint64_t val, MemOpIdx oi, uintptr_t ra,
24882496
FullStoreHelper *full_store)
24892497
{
2490-
trace_guest_st_before_exec(env_cpu(env), addr, oi);
24912498
full_store(env, addr, val, oi, ra);
24922499
qemu_plugin_vcpu_mem_cb(env_cpu(env), addr, oi, QEMU_PLUGIN_MEM_W);
24932500
}

0 commit comments

Comments
 (0)