Philippe Mathieu-Daudé and Stefan Hajnoczi
ab7e41e667
exec: Rename qemu_ram_writeback() as qemu_ram_msync()
...
Rename qemu_ram_writeback() as qemu_ram_msync() to better
match what it does.
Suggested-by: Stefan Hajnoczi <stefanha@redhat.com >
Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com >
Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com >
Reviewed-by: Richard Henderson <richard.henderson@linaro.org >
Acked-by: Paolo Bonzini <pbonzini@redhat.com >
Message-id: 20200508062456.23344-5-philmd@redhat.com
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com >
2020-06-05 09:54:48 +01:00
Philippe Mathieu-Daudé and Stefan Hajnoczi
9ecc996a3d
memory: Extract memory_region_msync() from memory_region_writeback()
...
Suggested-by: Paolo Bonzini <pbonzini@redhat.com >
Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com >
Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com >
Reviewed-by: Richard Henderson <richard.henderson@linaro.org >
Acked-by: Paolo Bonzini <pbonzini@redhat.com >
Message-id: 20200508062456.23344-3-philmd@redhat.com
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com >
2020-06-05 09:54:48 +01:00
Philippe Mathieu-Daudé and Stefan Hajnoczi
4dfe59d187
memory: Rename memory_region_do_writeback -> memory_region_writeback
...
We usually use '_do_' for internal functions. Rename
memory_region_do_writeback() as memory_region_writeback().
Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com >
Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com >
Reviewed-by: Richard Henderson <richard.henderson@linaro.org >
Acked-by: Paolo Bonzini <pbonzini@redhat.com >
Message-id: 20200508062456.23344-2-philmd@redhat.com
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com >
2020-06-05 09:54:48 +01:00
Alex Bennée
e5ef4ec28b
disas: include an optional note for the start of disassembly
...
This will become useful shortly for providing more information about
output assembly inline. While there fix up the indenting and code
formatting in disas().
Signed-off-by: Alex Bennée <alex.bennee@linaro.org >
Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com >
Message-Id: <20200513175134.19619-9-alex.bennee@linaro.org >
2020-05-15 15:25:16 +01:00
Richard Henderson and Alex Bennée
7d8cbbabcb
accel/tcg: Relax va restrictions on 64-bit guests
...
We cannot at present limit a 64-bit guest to a virtual address
space smaller than the host. It will mostly work to ignore this
limitation, except if the guest uses high bits of the address
space for tags. But it will certainly work better, as presently
we can wind up failing to allocate the guest stack.
Widen our user-only page tree to the host or abi pointer width.
Remove the workaround for this problem from target/alpha.
Always validate guest addresses vs reserved_va, as there we
control allocation ourselves.
Signed-off-by: Richard Henderson <richard.henderson@linaro.org >
Signed-off-by: Alex Bennée <alex.bennee@linaro.org >
Message-Id: <20200513175134.19619-7-alex.bennee@linaro.org >
2020-05-15 15:25:16 +01:00
Richard Henderson and Alex Bennée
e307c192ff
exec/cpu-all: Use bool for have_guest_base
...
Signed-off-by: Richard Henderson <richard.henderson@linaro.org >
Signed-off-by: Alex Bennée <alex.bennee@linaro.org >
Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com >
Reviewed-by: Laurent Vivier <laurent@vivier.eu >
Message-Id: <20200513175134.19619-6-alex.bennee@linaro.org >
2020-05-15 15:25:16 +01:00
Richard Henderson and Peter Maydell
b9e60257c1
accel/tcg: Add endian-specific cpu_{ld, st}* operations
...
We currently have target-endian versions of these operations,
but no easy way to force a specific endianness. This can be
helpful if the target has endian-specific operations, or a mode
that swaps endianness.
Reviewed-by: Peter Maydell <peter.maydell@linaro.org >
Signed-off-by: Richard Henderson <richard.henderson@linaro.org >
Message-id: 20200508154359.7494-7-richard.henderson@linaro.org
Signed-off-by: Peter Maydell <peter.maydell@linaro.org >
2020-05-11 11:22:06 +01:00
Richard Henderson and Peter Maydell
069cfe77d6
accel/tcg: Add probe_access_flags
...
This new interface will allow targets to probe for a page
and then handle watchpoints themselves. This will be most
useful for vector predicated memory operations, where one
page lookup can be used for many operations, and one test
can avoid many watchpoint checks.
Signed-off-by: Richard Henderson <richard.henderson@linaro.org >
Message-id: 20200508154359.7494-6-richard.henderson@linaro.org
Reviewed-by: Peter Maydell <peter.maydell@linaro.org >
Signed-off-by: Peter Maydell <peter.maydell@linaro.org >
2020-05-11 11:21:34 +01:00
Richard Henderson and Peter Maydell
857129b341
accel/tcg: Add block comment for probe_access
...
Reviewed-by: Peter Maydell <peter.maydell@linaro.org >
Signed-off-by: Richard Henderson <richard.henderson@linaro.org >
Message-id: 20200508154359.7494-4-richard.henderson@linaro.org
Signed-off-by: Peter Maydell <peter.maydell@linaro.org >
2020-05-11 11:14:02 +01:00
Alex Bennée
fcedd92086
gdbstub/linux-user: support debugging over a unix socket
...
While debugging over TCP is fairly straightforward now we have test
cases that want to orchestrate via make and currently a parallel build
fails as two processes can't use the same listening port. While system
emulation offers a wide cornucopia of connection methods thanks to the
chardev abstraction we are a little more limited for linux user.
Thankfully the programming API for a TCP socket and a local UNIX
socket is pretty much the same once it's set up.
Signed-off-by: Alex Bennée <alex.bennee@linaro.org >
Reviewed-by: Richard Henderson <richard.henderson@linaro.org >
Message-Id: <20200430190122.4592-7-alex.bennee@linaro.org >
2020-05-06 09:29:26 +01:00
Philippe Mathieu-Daudé and Alex Bennée
38c1c09839
gdbstub: Introduce gdb_get_float64() to get 64-bit float registers
...
When converted to use GByteArray in commits 462474d760 and
a010bdbe71 , the call to stfq_p() was removed. This call
serialize a float.
Since we now use a GByteArray, we can not use stfq_p() directly.
Introduce the gdb_get_float64() helper to load a float64 register.
Fixes: 462474d760 ("target/m68k: use gdb_get_reg helpers")
Fixes: a010bdbe71 ("extend GByteArray to read register helpers")
Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com >
Signed-off-by: Alex Bennée <alex.bennee@linaro.org >
Message-Id: <20200414163853.12164-3-philmd@redhat.com >
Message-Id: <20200430190122.4592-3-alex.bennee@linaro.org >
2020-05-06 09:29:26 +01:00
Philippe Mathieu-Daudé and Alex Bennée
377f8f08be
gdbstub: Introduce gdb_get_float32() to get 32-bit float registers
...
Since we now use a GByteArray, we can not use stfl_p() directly.
Introduce the gdb_get_float32() helper to load a float32 register.
Fixes: a010bdbe71 ("extend GByteArray to read register helpers")
Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com >
Signed-off-by: Alex Bennée <alex.bennee@linaro.org >
Reviewed-by: Richard Henderson <richard.henderson@linaro.org >
Message-Id: <20200414163853.12164-2-philmd@redhat.com >
Message-Id: <20200414200631.12799-14-alex.bennee@linaro.org >
2020-04-15 11:38:23 +01:00
Philippe Mathieu-Daudé and Alex Bennée
7b8c1527ae
gdbstub: Do not use memset() on GByteArray
...
Introduce gdb_get_zeroes() to fill a GByteArray with zeroes.
Fixes: a010bdbe71 ("extend GByteArray to read register helpers")
Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com >
Message-Id: <20200414102427.7459-1-philmd@redhat.com >
[AJB: used slightly more gliby set_size approach]
Signed-off-by: Alex Bennée <alex.bennee@linaro.org >
Message-Id: <20200414200631.12799-13-alex.bennee@linaro.org >
2020-04-15 11:38:23 +01:00
Alexander Duyck and Paolo Bonzini
d489ae4ac5
memory: Do not allow direct write access to rom_device regions
...
According to the documentation in memory.h a ROM memory region will be
backed by RAM for reads, but is supposed to go through a callback for
writes. Currently we were not checking for the existence of the rom_device
flag when determining if we could perform a direct write or not.
To correct that add a check to memory_region_is_direct so that if the
memory region has the rom_device flag set we will return false for all
checks where is_write is set.
Signed-off-by: Alexander Duyck <alexander.h.duyck@linux.intel.com >
Message-Id: <20200410034150.24738.98143.stgit@localhost.localdomain >
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com >
2020-04-13 02:56:18 -04:00
Yoshinori Sato and Philippe Mathieu-Daudé
c8c35e5f51
Add rx-softmmu
...
Tested-by: Philippe Mathieu-Daudé <philmd@redhat.com >
Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com >
Signed-off-by: Yoshinori Sato <ysato@users.sourceforge.jp >
Signed-off-by: Richard Henderson <richard.henderson@linaro.org >
[PMD: Squashed patches from Richard Henderson modifying
qapi/common.json and tests/machine-none-test.c]
Message-Id: <20200224141923.82118-21-ysato@users.sourceforge.jp >
[PMD: Added @since 5.0 tag in SysEmuTarget]
Acked-by: Richard Henderson <richard.henderson@linaro.org >
Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org >
2020-03-19 17:58:05 +01:00
Alex Bennée
a010bdbe71
gdbstub: extend GByteArray to read register helpers
...
Instead of passing a pointer to memory now just extend the GByteArray
to all the read register helpers. They can then safely append their
data through the normal way. We don't bother with this abstraction for
write registers as we have already ensured the buffer being copied
from is the correct size.
Signed-off-by: Alex Bennée <alex.bennee@linaro.org >
Reviewed-by: Richard Henderson <richard.henderson@linaro.org >
Acked-by: David Gibson <david@gibson.dropbear.id.au >
Reviewed-by: Damien Hedde <damien.hedde@greensocs.com >
Message-Id: <20200316172155.971-15-alex.bennee@linaro.org >
2020-03-17 17:38:38 +00:00
Alex Bennée
532cc1fb44
gdbstub: add helper for 128 bit registers
...
Signed-off-by: Alex Bennée <alex.bennee@linaro.org >
Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com >
Reviewed-by: Richard Henderson <richard.henderson@linaro.org >
Message-Id: <20200316172155.971-11-alex.bennee@linaro.org >
2020-03-17 17:38:38 +00:00
Philippe Mathieu-Daudé
85eb7c18ee
Let cpu_[physical]_memory() calls pass a boolean 'is_write' argument
...
Use an explicit boolean type.
This commit was produced with the included Coccinelle script
scripts/coccinelle/exec_rw_const.
Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com >
2020-02-20 14:47:08 +01:00
Philippe Mathieu-Daudé
28c80bfe8b
exec: Let cpu_[physical]_memory API use a boolean 'is_write' argument
...
The 'is_write' argument is either 0 or 1.
Convert it to a boolean type.
Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com >
2020-02-20 14:47:08 +01:00
Philippe Mathieu-Daudé
ae5883abec
exec: Let address_space_unmap() use a boolean 'is_write' argument
...
The 'is_write' argument is either 0 or 1.
Convert it to a boolean type.
Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com >
2020-02-20 14:47:08 +01:00
Philippe Mathieu-Daudé
d7ef71ef42
exec: Let the cpu_[physical]_memory API use void pointer arguments
...
As we are only dealing with a blob buffer, use a void pointer
argument. This will let us simplify other APIs.
Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com >
2020-02-20 14:47:08 +01:00
Philippe Mathieu-Daudé
daa3dda43a
exec: Let the address_space API use void pointer arguments
...
As we are only dealing with a blob buffer, use a void pointer
argument. This will let us simplify other APIs.
Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com >
2020-02-20 14:47:08 +01:00
Philippe Mathieu-Daudé
a152be43dc
exec: Let flatview API take void pointer arguments
...
Only flatview_[read/write]_continue use a byte pointer to increment
an offset. For the users, we are only dealing with a blob buffer.
Use a void pointer argument. This will let us simplify the
address_space API in the next commit.
Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com >
2020-02-20 14:47:08 +01:00
Taylor Simpson and Richard Henderson
e6cadf49c3
tcg: Add support for a helper with 7 arguments
...
Currently, helpers can only take up to 6 arguments. This patch adds the
capability for up to 7 arguments. I have tested it with the Hexagon port
that I am preparing for submission.
Signed-off-by: Taylor Simpson <tsimpson@quicinc.com >
Message-Id: <1580942510-2820-1-git-send-email-tsimpson@quicinc.com >
Signed-off-by: Richard Henderson <richard.henderson@linaro.org >
2020-02-11 16:29:16 -08:00
Juan Quintela
41aa4e9fd8
ram_addr: Split RAMBlock definition
...
We need some of the fields without having to poison everything else.
Signed-off-by: Juan Quintela <quintela@redhat.com >
Reviewed-by: Dr. David Alan Gilbert <dgilbert@redhat.com >
2020-01-29 11:28:59 +01:00