#
3c55dd58 |
| 09-Oct-2023 |
Philippe Mathieu-Daudé <philmd@linaro.org> |
hw/cpu: Clean up global variable shadowing
Fix:
hw/core/machine.c:1302:22: error: declaration shadows a variable in the global scope [-Werror,-Wshadow] const CPUArchId *cpus = possible_cpus
hw/cpu: Clean up global variable shadowing
Fix:
hw/core/machine.c:1302:22: error: declaration shadows a variable in the global scope [-Werror,-Wshadow] const CPUArchId *cpus = possible_cpus->cpus; ^ hw/core/numa.c:69:17: error: declaration shadows a variable in the global scope [-Werror,-Wshadow] uint16List *cpus = NULL; ^ hw/acpi/aml-build.c:2005:20: error: declaration shadows a variable in the global scope [-Werror,-Wshadow] CPUArchIdList *cpus = ms->possible_cpus; ^ hw/core/machine-smp.c:77:14: error: declaration shadows a variable in the global scope [-Werror,-Wshadow] unsigned cpus = config->has_cpus ? config->cpus : 0; ^ include/hw/core/cpu.h:589:17: note: previous declaration is here extern CPUTailQ cpus; ^
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org> Reviewed-by: Ani Sinha <anisinha@redhat.com> Message-Id: <20231010115048.11856-2-philmd@linaro.org>
show more ...
|
#
d7ec12f8 |
| 29-Sep-2023 |
Richard Henderson <richard.henderson@linaro.org> |
tcg: Split out tcg init functions to tcg/startup.h
The tcg/tcg.h header is a big bucket, containing stuff related to the translators and the JIT backend. The places that initialize tcg or create ne
tcg: Split out tcg init functions to tcg/startup.h
The tcg/tcg.h header is a big bucket, containing stuff related to the translators and the JIT backend. The places that initialize tcg or create new threads do not need all of that, so split out these three functions to a new header.
Suggested-by: Peter Maydell <peter.maydell@linaro.org> Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org> Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
show more ...
|
#
935f75ae |
| 29-Sep-2023 |
Richard Henderson <richard.henderson@linaro.org> |
tcg: Remove argument to tcg_prologue_init
We can load tcg_ctx just as easily within the callee.
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org> Signed-off-by: Richard Henderson <richard.hen
tcg: Remove argument to tcg_prologue_init
We can load tcg_ctx just as easily within the callee.
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org> Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
show more ...
|
#
b77af26e |
| 13-Sep-2023 |
Richard Henderson <richard.henderson@linaro.org> |
accel/tcg: Replace CPUState.env_ptr with cpu_env()
Reviewed-by: Anton Johansson <anjo@rev.ng> Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
|
#
86327290 |
| 25-Sep-2023 |
Stacey Son <sson@FreeBSD.org> |
bsd-user: Implement freebsd_exec_common, used in implementing execve/fexecve.
Signed-off-by: Stacey Son <sson@FreeBSD.org> Signed-off-by: Karim Taha <kariem.taha2.7@gmail.com> Reviewed-by: Warner Lo
bsd-user: Implement freebsd_exec_common, used in implementing execve/fexecve.
Signed-off-by: Stacey Son <sson@FreeBSD.org> Signed-off-by: Karim Taha <kariem.taha2.7@gmail.com> Reviewed-by: Warner Losh <imp@bsdimp.com> Message-Id: <20230925182425.3163-21-kariem.taha2.7@gmail.com>
show more ...
|
#
4436e2ff |
| 18-Aug-2023 |
Richard Henderson <richard.henderson@linaro.org> |
bsd-user: Remove image_info.start_brk
This has the same value is image_info.brk, which is also logged, and is otherwise unused.
Signed-off-by: Richard Henderson <richard.henderson@linaro.org> Revie
bsd-user: Remove image_info.start_brk
This has the same value is image_info.brk, which is also logged, and is otherwise unused.
Signed-off-by: Richard Henderson <richard.henderson@linaro.org> Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org> Message-Id: <20230818175736.144194-4-richard.henderson@linaro.org> Reviewed-by: Warner Losh <imp@bsdimp.com> Signed-off-by: Warner Losh <imp@bsdimp.com>
show more ...
|
#
28b61d49 |
| 27-Jul-2023 |
Richard Henderson <richard.henderson@linaro.org> |
bsd-user: Allocate guest virtual address space
With reserved_va, mmap.c expects to have pre-allocated host address space for the entire guest address space. When combined with the -B command-line o
bsd-user: Allocate guest virtual address space
With reserved_va, mmap.c expects to have pre-allocated host address space for the entire guest address space. When combined with the -B command-line option, ensure that the chosen address does not overlap anything else. Ensure that mmap_next_start is within reserved_va, as we use it within mmap.c without checking.
Reviewed by: Warner Losh <imp@bsdimp.com> Signed-off-by: Richard Henderson <richard.henderson@linaro.org> Message-Id: <20230727161148.444988-1-richard.henderson@linaro.org>
show more ...
|
Revision tags: v8.0.0 |
|
#
7f750efc |
| 29-Mar-2023 |
Andreas Schwab <schwab@suse.de> |
linux-user, bsd-user: Preserve incoming order of environment variables in the target
Do not reverse the order of environment variables in the target environ array relative to the incoming environ or
linux-user, bsd-user: Preserve incoming order of environment variables in the target
Do not reverse the order of environment variables in the target environ array relative to the incoming environ order. Some testsuites depend on a specific order, even though it is not defined by any standard.
Signed-off-by: Andreas Schwab <schwab@suse.de> Reviewed-by: Warner Losh <imp@bsdimp.com> Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org> Message-Id: <mvmlejfsivd.fsf@suse.de> Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
show more ...
|
#
060e0cd7 |
| 17-Apr-2023 |
Peter Maydell <peter.maydell@linaro.org> |
bsd-user: Add '-one-insn-per-tb' option equivalent to '-singlestep'
The '-singlestep' option is confusing, because it doesn't actually have anything to do with single-stepping the CPU. What it does
bsd-user: Add '-one-insn-per-tb' option equivalent to '-singlestep'
The '-singlestep' option is confusing, because it doesn't actually have anything to do with single-stepping the CPU. What it does do is force TCG emulation to put one guest instruction in each TB, which can be useful in some situations.
Create a new command line argument -one-insn-per-tb, so we can document that -singlestep is just a deprecated synonym for it, and eventually perhaps drop it.
Signed-off-by: Peter Maydell <peter.maydell@linaro.org> Reviewed-by: Warner Losh <imp@bsdimp.com> Reviewed-by: Richard Henderson <richard.henderson@linaro.org> Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org> Message-id: 20230417164041.684562-6-peter.maydell@linaro.org
show more ...
|
#
0e33928c |
| 17-Apr-2023 |
Peter Maydell <peter.maydell@linaro.org> |
accel/tcg: Use one_insn_per_tb global instead of old singlestep global
The only place left that looks at the old 'singlestep' global variable is the TCG curr_cflags() function. Replace the old glob
accel/tcg: Use one_insn_per_tb global instead of old singlestep global
The only place left that looks at the old 'singlestep' global variable is the TCG curr_cflags() function. Replace the old global with a new 'one_insn_per_tb' which is defined in tcg-all.c and declared in accel/tcg/internal.h. This keeps it restricted to the TCG code, unlike 'singlestep' which was available to every file in the system and defined in multiple different places for softmmu vs linux-user vs bsd-user.
While we're making this change, use qatomic_read() and qatomic_set() on the accesses to the new global, because TCG will read it without holding a lock.
Signed-off-by: Peter Maydell <peter.maydell@linaro.org> Reviewed-by: Richard Henderson <richard.henderson@linaro.org> Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org> Message-id: 20230417164041.684562-4-peter.maydell@linaro.org
show more ...
|
#
3cfb0456 |
| 17-Apr-2023 |
Peter Maydell <peter.maydell@linaro.org> |
make one-insn-per-tb an accel option
This commit adds 'one-insn-per-tb' as a property on the TCG accelerator object, so you can enable it with -accel tcg,one-insn-per-tb=on
It has the same behav
make one-insn-per-tb an accel option
This commit adds 'one-insn-per-tb' as a property on the TCG accelerator object, so you can enable it with -accel tcg,one-insn-per-tb=on
It has the same behaviour as the existing '-singlestep' command line option. We use a different name because 'singlestep' has always been a confusing choice, because it doesn't have anything to do with single-stepping the CPU. What it does do is force TCG emulation to put one guest instruction in each TB, which can be useful in some situations (such as analysing debug logs).
The existing '-singlestep' commandline options are decoupled from the global 'singlestep' variable and instead now are syntactic sugar for setting the accel property. (These can then go away after a deprecation period.)
The global variable remains for the moment as: * what the TCG code looks at to change its behaviour * what HMP and QMP use to query and set the behaviour
In the following commits we'll clean those up to not directly look at the global variable.
Signed-off-by: Peter Maydell <peter.maydell@linaro.org> Reviewed-by: Richard Henderson <richard.henderson@linaro.org> Message-id: 20230417164041.684562-2-peter.maydell@linaro.org
show more ...
|
#
95059f9c |
| 05-Mar-2023 |
Richard Henderson <richard.henderson@linaro.org> |
include/exec: Change reserved_va semantics to last byte
Change the semantics to be the last byte of the guest va, rather than the following byte. This avoids some overflow conditions.
Reviewed-by:
include/exec: Change reserved_va semantics to last byte
Change the semantics to be the last byte of the guest va, rather than the following byte. This avoids some overflow conditions.
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org> Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
show more ...
|
#
d96bf49b |
| 02-Mar-2023 |
Alex Bennée <alex.bennee@linaro.org> |
gdbstub: move chunks of user code into own files
The process was pretty similar to the softmmu move except we take the time to split stuff between user.c and user-target.c to avoid as much target sp
gdbstub: move chunks of user code into own files
The process was pretty similar to the softmmu move except we take the time to split stuff between user.c and user-target.c to avoid as much target specific compilation as possible. We also start to make use of our shiny new header scheme so the user-only helpers can be included without the rest of the exec/gsbstub.h cruft.
As before we split some functions into user and softmmu versions
Reviewed-by: Fabiano Rosas <farosas@suse.de> Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
Message-Id: <20230302190846.2593720-12-alex.bennee@linaro.org> Message-Id: <20230303025805.625589-12-richard.henderson@linaro.org>
show more ...
|
#
48e438a3 |
| 02-Feb-2023 |
Markus Armbruster <armbru@redhat.com> |
bsd-user: Clean up includes
This commit was created with scripts/clean-includes.
All .c should include qemu/osdep.h first. The script performs three related cleanups:
* Ensure .c files include qe
bsd-user: Clean up includes
This commit was created with scripts/clean-includes.
All .c should include qemu/osdep.h first. The script performs three related cleanups:
* Ensure .c files include qemu/osdep.h first. * Including it in a .h is redundant, since the .c already includes it. Drop such inclusions. * Likewise, including headers qemu/osdep.h includes is redundant. Drop these, too.
Signed-off-by: Markus Armbruster <armbru@redhat.com> Reviewed-by: Warner Losh <imp@bsdimp.com> Reviewed-by: Michael S. Tsirkin <mst@redhat.com> Message-Id: <20230202133830.2152150-6-armbru@redhat.com>
show more ...
|
Revision tags: v7.2.0 |
|
#
49f95221 |
| 20-Apr-2022 |
Marc-André Lureau <marcandre.lureau@redhat.com> |
include: rename qemu-common.h qemu/help-texts.h
Suggested-by: Peter Maydell <peter.maydell@linaro.org> Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com> Reviewed-by: Warner Losh <imp@bs
include: rename qemu-common.h qemu/help-texts.h
Suggested-by: Peter Maydell <peter.maydell@linaro.org> Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com> Reviewed-by: Warner Losh <imp@bsdimp.com> Message-Id: <20220420132624.2439741-7-marcandre.lureau@redhat.com>
show more ...
|
Revision tags: v7.0.0 |
|
#
55d71e0b |
| 15-Mar-2022 |
Thomas Huth <thuth@redhat.com> |
Don't include sysemu/tcg.h if it is not necessary
This header only defines the tcg_allowed variable and the tcg_enabled() function - which are not required in many files that include this header. Dr
Don't include sysemu/tcg.h if it is not necessary
This header only defines the tcg_allowed variable and the tcg_enabled() function - which are not required in many files that include this header. Drop the #include statement there.
Signed-off-by: Thomas Huth <thuth@redhat.com> Reviewed-by: Markus Armbruster <armbru@redhat.com> Message-Id: <20220315144107.1012530-1-thuth@redhat.com> Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
show more ...
|
#
905c78fe |
| 17-Apr-2022 |
Richard Henderson <richard.henderson@linaro.org> |
bsd-user: Use qemu_set_log_filename_flags
Perform all logfile setup in one step.
Reviewed-by: Alex Bennée <alex.bennee@linaro.org> Signed-off-by: Richard Henderson <richard.henderson@linaro.org> Me
bsd-user: Use qemu_set_log_filename_flags
Perform all logfile setup in one step.
Reviewed-by: Alex Bennée <alex.bennee@linaro.org> Signed-off-by: Richard Henderson <richard.henderson@linaro.org> Message-Id: <20220417183019.755276-29-richard.henderson@linaro.org>
show more ...
|
#
43b76161 |
| 17-Apr-2022 |
Richard Henderson <richard.henderson@linaro.org> |
bsd-user: Expand log_page_dump inline
We have extra stuff to log at the same time. Hoist the qemu_log_trylock/unlock to the caller and use fprintf.
Reviewed-by: Alex Bennée <alex.bennee@linaro.org>
bsd-user: Expand log_page_dump inline
We have extra stuff to log at the same time. Hoist the qemu_log_trylock/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-22-richard.henderson@linaro.org>
show more ...
|
#
c5955f4f |
| 17-Apr-2022 |
Richard Henderson <richard.henderson@linaro.org> |
util/log: Pass Error pointer to qemu_set_log
Do not force exit within qemu_set_log; return bool and pass an Error value back up the stack as per usual.
Reviewed-by: Alex Bennée <alex.bennee@linaro.
util/log: Pass Error pointer to qemu_set_log
Do not force exit within qemu_set_log; return bool and pass an Error value back up the stack as per usual.
Reviewed-by: Alex Bennée <alex.bennee@linaro.org> Signed-off-by: Richard Henderson <richard.henderson@linaro.org> Message-Id: <20220417183019.755276-5-richard.henderson@linaro.org>
show more ...
|
#
54ee5b3d |
| 17-Apr-2022 |
Richard Henderson <richard.henderson@linaro.org> |
util/log: Drop manual log buffering
This buffering was introduced during the Paleozoic: 9fa3e853531.
There has never been an explanation as to why we may not allow glibc to allocate the file buffer
util/log: Drop manual log buffering
This buffering was introduced during the Paleozoic: 9fa3e853531.
There has never been an explanation as to why we may not allow glibc to allocate the file buffer itself. We certainly have many other uses of mmap and malloc during user-only startup, so presumably whatever the issue was, it has been fixed during the preceeding 18 years.
Reviewed-by: Alex Bennée <alex.bennee@linaro.org> Signed-off-by: Richard Henderson <richard.henderson@linaro.org> Message-Id: <20220417183019.755276-2-richard.henderson@linaro.org>
show more ...
|
#
a941a16f |
| 30-Jan-2022 |
Warner Losh <imp@bsdimp.com> |
bsd-user: Remove bsd_type
Remove keeping track of which type of bsd we're running on. It's no longer referenced in the code. Building bsd-user on NetBSD or OpenBSD isn't possible, let alone running
bsd-user: Remove bsd_type
Remove keeping track of which type of bsd we're running on. It's no longer referenced in the code. Building bsd-user on NetBSD or OpenBSD isn't possible, let alone running that code. Stop pretending that we can do the cross BSD thing since there's been a large divergence since 2000 that makes this nearly impossible between FreeBSD and {Net,Open}BSD and at least quite difficult between NetBSD and OpenBSD.
Signed-off-by: Warner Losh <imp@bsdimp.com> Reviewed-by: Kyle Evans <kevans@FreeBSD.org> Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
show more ...
|
#
d1940182 |
| 28-Jan-2022 |
Warner Losh <imp@bsdimp.com> |
bsd-user/main.c: Drop syscall flavor arg -bsd
We've not realistically been able to actually run any bsd program on any other bsd program. They are too diverged to do this easily. The current code is
bsd-user/main.c: Drop syscall flavor arg -bsd
We've not realistically been able to actually run any bsd program on any other bsd program. They are too diverged to do this easily. The current code is setup to do it, but implementing it is hard. Stop pretending that we can do this.
Signed-off-by: Warner Losh <imp@bsdimp.com> Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
show more ...
|
#
46f4f76d |
| 08-Jan-2022 |
Warner Losh <imp@bsdimp.com> |
bsd-user/signal.c: setup_frame
setup_frame sets up a signalled stack frame. Associated routines to extract the pointer to the stack frame and to support alternate stacks.
Signed-off-by: Stacey Son
bsd-user/signal.c: setup_frame
setup_frame sets up a signalled stack frame. Associated routines to extract the pointer to the stack frame and to support alternate stacks.
Signed-off-by: Stacey Son <sson@FreeBSD.org> Signed-off-by: Kyle Evans <kevans@freebsd.org> Signed-off-by: Warner Losh <imp@bsdimp.com> Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
show more ...
|
#
b46d4ad7 |
| 16-Jan-2022 |
Warner Losh <imp@bsdimp.com> |
bsd-user: Remove vestiges of signal queueing code
bsd-user was copied from linux-user at a time when it queued signals. Remove those vestiges of thse code. Retain the init function, even though it's
bsd-user: Remove vestiges of signal queueing code
bsd-user was copied from linux-user at a time when it queued signals. Remove those vestiges of thse code. Retain the init function, even though it's now empty since other stuff will likely be added there. Make it static since it's not called from outside of main.c
Signed-off-by: Warner Losh <imp@bsdimp.com> Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
show more ...
|
Revision tags: v6.2.0 |
|
#
653ccec2 |
| 19-Sep-2021 |
Warner Losh <imp@bsdimp.com> |
bsd-user: Add stop_all_tasks
Similar to the same function in linux-user: this stops all the current tasks.
Signed-off-by: Stacey Son <sson@FreeBSD.org> Signed-off-by: Warner Losh <imp@bsdimp.com> R
bsd-user: Add stop_all_tasks
Similar to the same function in linux-user: this stops all the current tasks.
Signed-off-by: Stacey Son <sson@FreeBSD.org> Signed-off-by: Warner Losh <imp@bsdimp.com> Reviewed-by: Richard Henderson <richard.henderson@linaro.org> Reviewed-by: Kyle Evans <kevans@FreeBSD.org>
show more ...
|