Hi,
Can anyone have look at this?
I also have another patch similar but for thunk. It was reviewed but no
one has made a pull request yet:
https://patchew.org/QEMU/20230808152314.102036-1-akihiko.od...@daynix.com/
Regards,
Akihiko Odaki
On 2023/08/11 7:59, Akihiko Odaki wrote:
IA-64 and
When the host page size is greater than the target page size and
MAP_FIXED or MAP_FIXED_NOREPLACE is requested, mmap will be done for
three parts: start, middle, and end. If a later part of mmap fail,
mmap done in the earlier parts must be reverted.
Fixes: 54936004fd ("mmap emulation")
It is based on GDB protocol to ensure interface stability.
The timing of the vcpu init hook is also changed so that the hook will
get called after GDB features are initialized.
Resolves: https://gitlab.com/qemu-project/qemu/-/issues/1706
Signed-off-by: Akihiko Odaki
---
This demonstrates how a register can be read from a plugin.
Signed-off-by: Akihiko Odaki
---
docs/devel/tcg-plugins.rst | 10 ++-
contrib/plugins/execlog.c | 140 -
2 files changed, 117 insertions(+), 33 deletions(-)
diff --git a/docs/devel/tcg-plugins.rst
This is a tree-wide change to replace gdb_core_xml_file, the path to
GDB XML file with gdb_core_feature, the pointer to GDBFeature. This
also replaces the values assigned to gdb_num_core_regs with the
num_regs member of GDBFeature where applicable to remove magic numbers.
A following change will
The initialization and exit hooks will not affect the state of vCPU,
but they may depend on the state of vCPU. Therefore, it's better to
call plugin hooks after the vCPU state is fully initialized and before
it gets uninitialized.
Signed-off-by: Akihiko Odaki
---
cpu.c| 11
In preparation for a change to use GDBFeature as a parameter of
gdb_register_coprocessor(), convert the internal representation of
dynamic feature from plain XML to GDBFeature.
Signed-off-by: Akihiko Odaki
Acked-by: Richard Henderson
---
target/arm/cpu.h | 20 +++---
In preparation for a change to use GDBFeature as a parameter of
gdb_register_coprocessor(), convert the internal representation of
dynamic feature from plain XML to GDBFeature.
Signed-off-by: Akihiko Odaki
Reviewed-by: Richard Henderson
---
target/ppc/cpu-qom.h | 3 +--
target/ppc/cpu.h
GDBFeatureBuilder unifies the logic to generate dynamic GDBFeature.
Signed-off-by: Akihiko Odaki
Reviewed-by: Richard Henderson
---
include/exec/gdbstub.h | 20 ++
gdbstub/gdbstub.c | 59 ++
2 files changed, 79 insertions(+)
diff --git
In preparation for a change to use GDBFeature as a parameter of
gdb_register_coprocessor(), convert the internal representation of
dynamic feature from plain XML to GDBFeature.
Signed-off-by: Akihiko Odaki
---
target/riscv/cpu.h | 4 +--
target/riscv/cpu.c | 4 +--
This function is no longer used.
Signed-off-by: Akihiko Odaki
---
include/hw/core/cpu.h | 4
target/arm/cpu.h | 6 --
target/ppc/cpu.h | 1 -
target/arm/cpu.c | 1 -
target/arm/gdbstub.c | 18 --
target/ppc/cpu_init.c | 3 ---
target/ppc/gdbstub.c
gdb_foreach_feature() enumerates features that are useful to identify
registers. gdb_read_register() actually reads registers.
Signed-off-by: Akihiko Odaki
---
include/exec/gdbstub.h | 6 ++
gdbstub/gdbstub.c | 20 +++-
2 files changed, 25 insertions(+), 1 deletion(-)
Currently the number of registers exposed to GDB is written as magic
numbers in code. Derive the number of registers GDB actually see from
XML files to replace the magic numbers in code later.
Signed-off-by: Akihiko Odaki
Reviewed-by: Philippe Mathieu-Daudé
Reviewed-by: Alex Bennée
---
These members will be used to help plugins to identify registers.
The added members in instances of GDBFeature dynamically generated by
CPUs will be filled in later changes.
Signed-off-by: Akihiko Odaki
---
include/exec/gdbstub.h | 3 +++
gdbstub/gdbstub.c | 10 --
Make qemu-plugin.h consumable for C++ platform.
Signed-off-by: Akihiko Odaki
---
include/qemu/qemu-plugin.h | 4
1 file changed, 4 insertions(+)
diff --git a/include/qemu/qemu-plugin.h b/include/qemu/qemu-plugin.h
index 214b12bfd6..8637e3d8cf 100644
--- a/include/qemu/qemu-plugin.h
+++
This is a tree-wide change to introduce GDBFeature parameter to
gdb_register_coprocessor(). The new parameter just replaces num_regs
and xml parameters for now. GDBFeature will be utilized to simplify XML
lookup in a following change.
Signed-off-by: Akihiko Odaki
Acked-by: Alex Bennée
---
Now we know all instances of GDBFeature that is used in CPU so we can
traverse them to find XML. This removes the need for a CPU-specific
lookup function for dynamic XMLs.
Signed-off-by: Akihiko Odaki
---
gdbstub/gdbstub.c | 24
1 file changed, 8 insertions(+), 16
Simplify GDBRegisterState by replacing num_regs and xml members with
one member that points to GDBFeature.
Signed-off-by: Akihiko Odaki
---
gdbstub/gdbstub.c | 14 ++
1 file changed, 6 insertions(+), 8 deletions(-)
diff --git a/gdbstub/gdbstub.c b/gdbstub/gdbstub.c
index
This function is useful to determine the number of registers exposed to
GDB from the XML name.
Signed-off-by: Akihiko Odaki
Reviewed-by: Philippe Mathieu-Daudé
Reviewed-by: Alex Bennée
Reviewed-by: Richard Henderson
---
include/exec/gdbstub.h | 2 ++
gdbstub/gdbstub.c | 13
Based-on: <20230903043030.20708-1-akihiko.od...@daynix.com>
("[PATCH 0/8] gdbstub and TCG plugin improvements")
I and other people in the University of Tokyo, where I research processor
design, found TCG plugins are very useful for processor design exploration.
The feature we find missing is the
This demonstrates how to write a plugin in C++.
Signed-off-by: Akihiko Odaki
---
docs/devel/tcg-plugins.rst | 8
configure | 15 ---
contrib/plugins/Makefile | 5 +
contrib/plugins/cc.cc | 17 +
tests/tcg/Makefile.target | 3
GDB has XML support since 6.7 which was released in 2007.
It's time to remove support for old GDB versions without XML support.
Signed-off-by: Akihiko Odaki
---
target/ppc/gdbstub.c | 18 --
1 file changed, 18 deletions(-)
diff --git a/target/ppc/gdbstub.c
All implementations of gdb_arch_name() returns dynamic duplicates of
static strings. It's also unlikely that there will be an implementation
of gdb_arch_name() that returns a truly dynamic value due to the nature
of the function returning a well-known identifiers. Qualify the value
gdb_arch_name()
Some subclasses overwrite gdb_core_xml_file member but others don't.
Always initialize the member in the subclasses for consistency.
This especially helps for AArch64; in a following change, the file
specified by gdb_core_xml_file is always looked up even if it's going to
be overwritten later.
There is no guarantee that target.xml fits in 1024 bytes, and the fixed
buffer length requires tedious buffer overflow check. Dynamically
allocate the target.xml buffer to resolve these problems.
Suggested-by: Alex Bennée
Signed-off-by: Akihiko Odaki
---
gdbstub/internals.h | 2 +-
This series extracts fixes and refactorings that can be applied
independently from "[PATCH RESEND v5 00/26] plugins: Allow to read
registers" as suggested by Nicholas Piggin.
Patch "target/ppc: Remove references to gdb_has_xml" is also updated to
remove some dead code I missed earlier and thus
Before this change, the information from a XML file was stored in an
array that is not descriptive. Introduce a dedicated structure type to
make it easier to understand and to extend with more fields.
Signed-off-by: Akihiko Odaki
Reviewed-by: Philippe Mathieu-Daudé
Reviewed-by: Alex Bennée
GDB has XML support since 6.7 which was released in 2007.
It's time to remove support for old GDB versions without XML support.
Signed-off-by: Akihiko Odaki
Acked-by: Alex Bennée
---
target/arm/gdbstub.c | 32 ++--
1 file changed, 2 insertions(+), 30 deletions(-)
execlog had the following comment:
> As we could have multiple threads trying to do this we need to
> serialise the expansion under a lock. Threads accessing already
> created entries can continue without issue even if the ptr array
> gets reallocated during resize.
However, when the ptr array
GDB has XML support since 6.7 which was released in 2007.
It's time to remove support for old GDB versions without XML support.
Signed-off-by: Akihiko Odaki
---
include/exec/gdbstub.h | 8
gdbstub/gdbstub.c | 13 -
gdbstub/softmmu.c | 1 -
gdbstub/user.c
On 2023/9/3 09:06, Richard Henderson wrote:
On 9/1/23 22:02, Jiajie Chen wrote:
If LSX is available, use LSX instructions to implement 128-bit load &
store.
Is this really guaranteed to be an atomic 128-bit operation?
Song Gao, please check this.
Or, as for many vector processors, is
On 9/1/23 22:02, Jiajie Chen wrote:
If LSX is available, use LSX instructions to implement 128-bit load &
store.
Is this really guaranteed to be an atomic 128-bit operation?
Or, as for many vector processors, is this really two separate 64-bit memory operations
under the hood?
+static
On 9/1/23 22:02, Jiajie Chen wrote:
Lower the following ops:
- add_vec
- sub_vec
Signed-off-by: Jiajie Chen
---
tcg/loongarch64/tcg-target-con-set.h | 1 +
tcg/loongarch64/tcg-target-con-str.h | 1 +
tcg/loongarch64/tcg-target.c.inc | 60
3 files
On 9/1/23 22:02, Jiajie Chen wrote:
Signed-off-by: Jiajie Chen
---
tcg/loongarch64/tcg-target-con-set.h | 1 +
tcg/loongarch64/tcg-target-con-str.h | 1 +
tcg/loongarch64/tcg-target.c.inc | 65
3 files changed, 67 insertions(+)
Reviewed-by: Richard
On 9/1/23 22:02, Jiajie Chen wrote:
Pass vece to tcg_target_const_match() to allow correct interpretation of
const args of vector ops.
Signed-off-by: Jiajie Chen
---
tcg/aarch64/tcg-target.c.inc | 2 +-
tcg/arm/tcg-target.c.inc | 2 +-
tcg/i386/tcg-target.c.inc| 2 +-
On 9/2/23 05:59, Paolo Bonzini wrote:
Just use $targetos always.
Signed-off-by: Paolo Bonzini
---
configure | 55 +--
1 file changed, 13 insertions(+), 42 deletions(-)
Reviewed-by: Richard Henderson
r~
> On 2 Sep 2023, at 21:43, Liviu Ionescu wrote:
>
> ... With the same build scripts, compiling QEMU 7.1.0 was ok, the problem was
> introduced in the last year.
I also tried 7.2.5, and it passed the build, with the same scripts and the same
toolchain, so the problem seems to be specific to
02.09.2023 23:01, Marcin Juszkiewicz wrote:
...
The offending code in `/util/cpuinfo-aarch64.c` is:
> ```c
> #ifdef CONFIG_LINUX
> unsigned long hwcap = qemu_getauxval(AT_HWCAP);
> info |= (hwcap & HWCAP_ATOMICS ? CPUINFO_LSE : 0);
> info |= (hwcap & HWCAP_USCAT ?
W dniu 2.09.2023 o 20:11, Liviu Ionescu pisze:
When trying to build 8.1.0 on an Ubuntu 18.04 aarch64, I get the
above error.
Ubuntu 18.04 is not supported anymore by Canonical. End-Of-Life was in
May 2023.
The offending code in `/util/cpuinfo-aarch64.c` is:
> ```c
> #ifdef CONFIG_LINUX
>
When compiling 8.1.0 for Windows (with mingw-w64-gcc on Linux), I got the
following error:
```
[634/1917] Compiling C object libqemuutil.a.p/util_oslib-win32.c.obj
FAILED: libqemuutil.a.p/util_oslib-win32.c.obj
When trying to build 8.1.0 on an Ubuntu 18.04 aarch64, I get the above error.
The offending code in `/util/cpuinfo-aarch64.c` is:
```c
#ifdef CONFIG_LINUX
unsigned long hwcap = qemu_getauxval(AT_HWCAP);
info |= (hwcap & HWCAP_ATOMICS ? CPUINFO_LSE : 0);
info |= (hwcap & HWCAP_USCAT ?
Signed-off-by: Paolo Bonzini
---
configure | 8
1 file changed, 8 deletions(-)
diff --git a/configure b/configure
index 6404b659718..a8d79602098 100755
--- a/configure
+++ b/configure
@@ -1126,14 +1126,6 @@ else
done
fi
-# see if system emulation was really requested
-case "
Stop applying config-host.mak to the sourcesets, since it does not
have any more CONFIG_* symbols coming from the command line.
Signed-off-by: Paolo Bonzini
---
Makefile | 2 +-
chardev/meson.build| 2 +-
configure | 18 -
There are no config-host.mak symbols anymore that are needed in
config-host.h; the only symbols that are included in config_host_data via
the foreach loop are:
- CONFIG_DEFAULT_TARGETS, which is not used by C code.
- CONFIG_TCG and CONFIG_TCG_INTERPRETER, which are not part of config-host.mak
$(HOST_CC) is only used to invoke the preprocessor, and $(CC) can be
used instead now that there is a Tricore C compiler. Remove the variable
from config-host.mak.
Reviewed-by: Richard Henderson
Reviewed-by: Daniel P. Berrangé
Signed-off-by: Paolo Bonzini
---
configure
CONFIG_SOLARIS is only used to pick tap implementations. But the
target OS is invariant and does not depend on the configuration, so move
away from config_host and just use unconditional rules in softmmu_ss.
Reviewed-by: Philippe Mathieu-Daudé
Signed-off-by: Paolo Bonzini
---
configure
Reviewed-by: Richard Henderson
Reviewed-by: Peter Maydell
Signed-off-by: Paolo Bonzini
---
configure | 11 +--
meson.build | 3 ++-
meson_options.txt | 2 ++
scripts/meson-buildoptions.sh | 3 +++
4 files changed, 8 insertions(+), 11
If dtc is available, compile the .dts files in the pc-bios directory
instead of using the precompiled binaries.
Reviewed-by: Richard Henderson
Signed-off-by: Paolo Bonzini
---
pc-bios/Makefile| 19 ---
pc-bios/meson.build | 25 +
2 files changed, 21
While the option still needs to be parsed in the configure script
(it's needed by tests/tcg, and also to decide about recursing
into contrib/plugins), passing it to Meson can be done with -D
instead of using config-host.mak.
Signed-off-by: Paolo Bonzini
---
accel/tcg/meson.build | 4
Unsupported CPU and OSes are not really going away, but the
project simply does not guarantee that they work. Rephrase
the messages accordingly. While at it, move the warning for
TCI performance at the end where it is more visible.
Signed-off-by: Paolo Bonzini
---
meson.build | 45
Just use $targetos always.
Signed-off-by: Paolo Bonzini
---
configure | 55 +--
1 file changed, 13 insertions(+), 42 deletions(-)
diff --git a/configure b/configure
index 378a0de9fb6..f96f7359a83 100755
--- a/configure
+++ b/configure
@@
The initial reason to write this patch was to remove the last use of
CONFIG_DEBUG_TCG from the makefiles; the flags to use to build TCG
plugins are unrelated to --enable-debug-tcg, and instead they should
be the same as those used to build emulators (the plugins are not build
via meson for
This includes a few more patches cleaning up the configure/meson
separation. The highlights are fixing --host-cc, removing the last
traces of compiler detection from config-host.mak, and dropping the
useless pc-bios/Makefile.
Compared to v1, I have also removed the loop that takes random
Treat contrib/plugins the same as the firmware.
Signed-off-by: Paolo Bonzini
---
Makefile | 27 ---
configure | 13 -
2 files changed, 20 insertions(+), 20 deletions(-)
diff --git a/Makefile b/Makefile
index 5d48dfac18a..118c28e80d9 100644
--- a/Makefile
The argument of --host-cc is not obeyed when cross compiling. To avoid
this issue, place it in a configuration file and pass it to meson
with --native-file.
While at it, clarify that --host-cc is not obeyed anyway when _not_
cross compiling, because cc="$host_cc" is placed before --host-cc is
Both gvnc and sysprof-capture come with pkg-config files, so specify
the method to find them.
Reviewed-by: Daniel P. Berrangé
Signed-off-by: Paolo Bonzini
---
tests/migration/meson.build | 2 +-
tests/qtest/meson.build | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git
CONFIG_TCG is not included in *-config-devices.h, so the test is
always failing.
Fixes: 74884cb1a6d ("qtest/meson.build: check CONFIG_TCG for boot-serial-test
in qtests_ppc", 2022-03-14)
Fixes: 44d827ea69e ("qtest/meson.build: check CONFIG_TCG for prom-env-test in
qtests_ppc", 2022-03-14)
57 matches
Mail list logo