Vitaly Buka and Laurent Vivier
dbbf89751b
linux-user/aarch64: Reset target data on MADV_DONTNEED
...
aarch64 stores MTE tags in target_date, and they should be reset by
MADV_DONTNEED.
Signed-off-by: Vitaly Buka <vitalybuka@google.com >
Reviewed-by: Richard Henderson <richard.henderson@linaro.org >
Message-Id: <20220711220028.2467290-1-vitalybuka@google.com >
[lv: fix code style issues]
Signed-off-by: Laurent Vivier <laurent@vivier.eu >
2022-08-11 11:34:17 +02:00
Hyman Huang(黄勇) and Dr. David Alan Gilbert
cc2b33eab0
softmmu/dirtylimit: Implement vCPU dirtyrate calculation periodically
...
Introduce the third method GLOBAL_DIRTY_LIMIT of dirty
tracking for calculate dirtyrate periodly for dirty page
rate limit.
Add dirtylimit.c to implement dirtyrate calculation periodly,
which will be used for dirty page rate limit.
Add dirtylimit.h to export util functions for dirty page rate
limit implementation.
Signed-off-by: Hyman Huang(黄勇) <huangy81@chinatelecom.cn >
Reviewed-by: Peter Xu <peterx@redhat.com >
Message-Id: <5d0d641bffcb9b1c4cc3e323b6dfecb36050d948.1656177590.git.huangy81@chinatelecom.cn >
Signed-off-by: Dr. David Alan Gilbert <dgilbert@redhat.com >
2022-07-20 12:15:08 +01:00
Hyman Huang(黄勇) and Dr. David Alan Gilbert
ab1a161fe3
cpus: Introduce cpu_list_generation_id
...
Introduce cpu_list_generation_id to track cpu list generation so
that cpu hotplug/unplug can be detected during measurement of
dirty page rate.
cpu_list_generation_id could be used to detect changes of cpu
list, which is prepared for dirty page rate measurement.
Signed-off-by: Hyman Huang(黄勇) <huangy81@chinatelecom.cn >
Reviewed-by: Peter Xu <peterx@redhat.com >
Message-Id: <06e1f1362b2501a471dce796abb065b04f320fa5.1656177590.git.huangy81@chinatelecom.cn >
Signed-off-by: Dr. David Alan Gilbert <dgilbert@redhat.com >
2022-07-20 12:15:08 +01:00
Thomas Huth
2116650254
disas: Remove libvixl disassembler
...
The disassembly via capstone should be superiour to our old vixl
sources nowadays, so let's finally cut this old disassembler out
of the QEMU source tree.
Message-Id: <20220603164249.112459-1-thuth@redhat.com >
Tested-by: Richard Henderson <richard.henderson@linaro.org >
Reviewed-by: Richard Henderson <richard.henderson@linaro.org >
Signed-off-by: Thomas Huth <thuth@redhat.com >
2022-07-05 10:15:49 +02:00
Richard Henderson
64c8c6a992
gdbstub: Adjust gdb_syscall_complete_cb declaration
...
Change 'ret' to uint64_t. This resolves a FIXME in the
m68k and nios2 semihosting that we've lost data.
Change 'err' to int. There is nothing target-specific
about the width of the errno value.
Reviewed-by: Luc Michel <lmichel@kalray.eu >
Signed-off-by: Richard Henderson <richard.henderson@linaro.org >
2022-06-28 04:35:52 +05:30
Richard Henderson
9a89470449
semihosting: Split out semihost_sys_lseek
...
Split out the non-ARM specific portions of SYS_SEEK to a
reusable function. This handles all GuestFD. Isolate the
curious ARM-specific return value processing to a new
callback, common_semi_seek_cb.
Expand the internal type of the offset to int64_t, and
provide the whence argument, which will be required by
m68k and nios2 semihosting.
Note that gdb_do_syscall %x reads target_ulong, not int.
Reviewed-by: Luc Michel <lmichel@kalray.eu >
Signed-off-by: Richard Henderson <richard.henderson@linaro.org >
2022-06-28 04:35:52 +05:30
Richard Henderson
9814483d63
include/exec: Define errno values in gdbstub.h
...
Define constants for the errno values defined by the
gdb remote fileio protocol.
Reviewed-by: Alex Bennée <alex.bennee@linaro.org >
Reviewed-by: Peter Maydell <peter.maydell@linaro.org >
Signed-off-by: Richard Henderson <richard.henderson@linaro.org >
2022-06-28 04:35:07 +05:30
Richard Henderson
7c56c2d3da
include/exec: Move gdb_stat and gdb_timeval to gdbstub.h
...
We have two copies of these structures, and require them
in semihosting/ going forward.
Reviewed-by: Alex Bennée <alex.bennee@linaro.org >
Reviewed-by: Peter Maydell <peter.maydell@linaro.org >
Signed-off-by: Richard Henderson <richard.henderson@linaro.org >
2022-06-28 04:35:07 +05:30
Richard Henderson
94b14fe08f
include/exec: Move gdb open flags to gdbstub.h
...
There were 3 copies of these flags. Place them in the
file with gdb_do_syscall, with which they belong.
Reviewed-by: Alex Bennée <alex.bennee@linaro.org >
Reviewed-by: Peter Maydell <peter.maydell@linaro.org >
Signed-off-by: Richard Henderson <richard.henderson@linaro.org >
2022-06-28 04:35:07 +05:30
Richard Henderson
c89a14ad2c
semihosting: Move exec/softmmu-semi.h to semihosting/softmmu-uaccess.h
...
We have a subdirectory for semihosting; move this file out of exec.
Rename to emphasize the contents are a replacement for the functions
in linux-user/bsd-user uaccess.c.
Reviewed-by: Peter Maydell <peter.maydell@linaro.org >
Signed-off-by: Richard Henderson <richard.henderson@linaro.org >
2022-06-28 04:35:06 +05:30
Jagannathan Raman and Stefan Hajnoczi
3123f93d6b
vfio-user: handle PCI BAR accesses
...
Determine the BARs used by the PCI device and register handlers to
manage the access to the same.
Signed-off-by: Elena Ufimtseva <elena.ufimtseva@oracle.com >
Signed-off-by: John G Johnson <john.g.johnson@oracle.com >
Signed-off-by: Jagannathan Raman <jag.raman@oracle.com >
Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com >
Message-id: 3373e10b5be5f42846f0632d4382466e1698c505.1655151679.git.jag.raman@oracle.com
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com >
2022-06-15 16:43:42 +01:00
Bernhard Beschow and Philippe Mathieu-Daudé
b01841fa85
accel/tcg: Inline dump_opcount_info() and remove it
...
dump_opcount_info() is a one-line wrapper around tcg_dump_op_count()
which is also exported. So use the latter directly.
Signed-off-by: Bernhard Beschow <shentey@gmail.com >
Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org >
Acked-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk >
Message-Id: <20220520180109.8224-10-shentey@gmail.com >
Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org >
2022-06-11 11:44:50 +02:00
Bernhard Beschow and Philippe Mathieu-Daudé
7112ffd93a
accel/tcg/cpu-exec: Unexport dump_drift_info()
...
Commit 3a841ab53f 'qapi: introduce
x-query-jit QMP command' basically moved the only function using
dump_drift_info() to cpu-exec.c. Therefore, dump_drift_info() doesn't
need to be exported any longer.
Signed-off-by: Bernhard Beschow <shentey@gmail.com >
Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org >
Acked-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk >
Message-Id: <20220520180109.8224-9-shentey@gmail.com >
Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org >
2022-06-11 11:44:50 +02:00
Xiaojuan Yang and Richard Henderson
a8a506c390
hw/loongarch: Add support loongson3 virt machine type.
...
Emulate a 3A5000 board use the new loongarch instruction.
3A5000 belongs to the Loongson3 series processors.
The board consists of a 3A5000 cpu model and the virt
bridge. The host 3A5000 board is really complicated and
contains many functions.Now for the tcg softmmu mode
only part functions are emulated.
More detailed info you can see
https://github.com/loongson/LoongArch-Documentation
Signed-off-by: Xiaojuan Yang <yangxiaojuan@loongson.cn >
Signed-off-by: Song Gao <gaosong@loongson.cn >
Reviewed-by: Richard Henderson <richard.henderson@linaro.org >
Message-Id: <20220606124333.2060567-31-yangxiaojuan@loongson.cn >
Signed-off-by: Richard Henderson <richard.henderson@linaro.org >
2022-06-06 18:09:03 +00:00
Markus Armbruster
ea9cea93c6
Clean up decorations and whitespace around header guards
...
Cleaned up with scripts/clean-header-guards.pl.
Signed-off-by: Markus Armbruster <armbru@redhat.com >
Message-Id: <20220506134911.2856099-5-armbru@redhat.com >
Reviewed-by: Richard Henderson <richard.henderson@linaro.org >
2022-05-11 16:50:32 +02:00
Markus Armbruster
4f31b54bfe
Normalize header guard symbol definition
...
We commonly define the header guard symbol without an explicit value.
Normalize the exceptions.
Done with scripts/clean-header-guards.pl.
Signed-off-by: Markus Armbruster <armbru@redhat.com >
Message-Id: <20220506134911.2856099-4-armbru@redhat.com >
Reviewed-by: Richard Henderson <richard.henderson@linaro.org >
2022-05-11 16:50:26 +02:00
Marc-André Lureau
8905770b27
compiler.h: replace QEMU_NORETURN with G_NORETURN
...
G_NORETURN was introduced in glib 2.68, fallback to G_GNUC_NORETURN in
glib-compat.
Note that this attribute must be placed before the function declaration
(bringing a bit of consistency in qemu codebase usage).
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com >
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com >
Reviewed-by: Warner Losh <imp@bsdimp.com >
Message-Id: <20220420132624.2439741-20-marcandre.lureau@redhat.com >
2022-04-21 17:03:51 +04:00
Richard Henderson
bf619eae2e
include/exec/log: Do not reference QemuLogFile directly
...
Use qemu_log_trylock/unlock instead of the raw rcu_read.
Signed-off-by: Richard Henderson <richard.henderson@linaro.org >
Reviewed-by: Alex Bennée <alex.bennee@linaro.org >
Message-Id: <20220417183019.755276-25-richard.henderson@linaro.org >
2022-04-20 10:51:11 -07:00
Richard Henderson
93756fdcf6
linux-user: Expand log_page_dump inline
...
We have extra stuff to log at the same time.
Hoist the qemu_log_lock/unlock to the caller and use fprintf.
Reviewed-by: Alex Bennée <alex.bennee@linaro.org >
Signed-off-by: Richard Henderson <richard.henderson@linaro.org >
Message-Id: <20220417183019.755276-23-richard.henderson@linaro.org >
2022-04-20 10:51:11 -07:00
Richard Henderson
7ac5c0b7ba
exec/log: Remove log_disas and log_target_disas
...
These functions are no longer used.
Reviewed-by: Alex Bennée <alex.bennee@linaro.org >
Signed-off-by: Richard Henderson <richard.henderson@linaro.org >
Message-Id: <20220417183019.755276-14-richard.henderson@linaro.org >
2022-04-20 10:51:11 -07:00
Richard Henderson
8eb806a763
exec/translator: Pass the locked filepointer to disas_log hook
...
We have fetched and locked the logfile in translator_loop.
Pass the filepointer down to the disas_log hook so that it
need not be fetched and locked again.
Reviewed-by: Alex Bennée <alex.bennee@linaro.org >
Signed-off-by: Richard Henderson <richard.henderson@linaro.org >
Message-Id: <20220417183019.755276-13-richard.henderson@linaro.org >
2022-04-20 10:51:11 -07:00
Richard Henderson
78b548583e
*: Use fprintf between qemu_log_trylock/unlock
...
Inside qemu_log, we perform qemu_log_trylock/unlock, which need
not be done if we have already performed the lock beforehand.
Always check the result of qemu_log_trylock -- only checking
qemu_loglevel_mask races with the acquisition of the lock on
the logfile.
Reviewed-by: Alex Bennée <alex.bennee@linaro.org >
Signed-off-by: Richard Henderson <richard.henderson@linaro.org >
Message-Id: <20220417183019.755276-10-richard.henderson@linaro.org >
2022-04-20 10:51:11 -07:00
Richard Henderson
c60f599bcb
util/log: Rename qemu_log_lock to qemu_log_trylock
...
This function can fail, which makes it more like ftrylockfile
or pthread_mutex_trylock than flockfile or pthread_mutex_lock,
so rename it.
To closer match the other trylock functions, release rcu_read_lock
along the failure path, so that qemu_log_unlock need not be called
on failure.
Reviewed-by: Alex Bennée <alex.bennee@linaro.org >
Signed-off-by: Richard Henderson <richard.henderson@linaro.org >
Message-Id: <20220417183019.755276-8-richard.henderson@linaro.org >
2022-04-20 10:51:11 -07:00
Marc-André Lureau and Paolo Bonzini
ec5f7ca857
include: move target page bits declaration to page-vary.h
...
Since the implementation unit is page-vary.c.
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com >
Reviewed-by: Richard Henderson <richard.henderson@linaro.org >
Message-Id: <20220323155743.1585078-24-marcandre.lureau@redhat.com >
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com >
2022-04-06 14:31:43 +02:00
Marc-André Lureau and Paolo Bonzini
1f269c1484
include: move cpu_exec* declarations to cpu-common.h
...
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com >
Message-Id: <20220323155743.1585078-23-marcandre.lureau@redhat.com >
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com >
2022-04-06 14:31:43 +02:00