This commit introduces support for native library calls on the
i386 target. When encountering special instructions reserved
for native calls, this commit extracts the function name and
generates the corresponding native call.
Signed-off-by: Yeqi Fu
---
configs/targets/i386-linux-user.mak | 1
This commit implements a shared library, where native functions are
rewritten as special instructions. At runtime, user programs load
the shared library, and special instructions are executed when
native functions are called.
Signed-off-by: Yeqi Fu
---
Makefile| 2
Signed-off-by: Yeqi Fu
---
docs/user/index.rst| 1 +
docs/user/native_calls.rst | 91 ++
2 files changed, 92 insertions(+)
create mode 100644 docs/user/native_calls.rst
diff --git a/docs/user/index.rst b/docs/user/index.rst
index 782d27cda2
effortlessly.
Signed-off-by: Yeqi Fu
---
include/native/native.h | 7 ++
linux-user/main.c | 20 +++
linux-user/syscall.c| 55 +
3 files changed, 82 insertions(+)
create mode 100644 include/native/native.h
diff --git a/include
Introduce a new test for native calls to ensure their functionality.
The process involves cross-compiling the test cases, building them
as dynamically linked binaries, and running these binaries which
necessitates the addition of the appropriate interpreter prefix.
Signed-off-by: Yeqi Fu
This commit introduces support for native library calls on the
mips target. When encountering special instructions reserved
for native calls, this commit extracts the function name and
generates the corresponding native call.
Signed-off-by: Yeqi Fu
---
configs/targets/mips-linux-user.mak | 1
This commit introduces support for native library calls on the
arm target. When encountering special instructions reserved
for native calls, this commit extracts the function name and
generates the corresponding native call.
Signed-off-by: Yeqi Fu
---
configs/targets/aarch64-linux-user.mak | 1
, tcg_gen_g2h and tcg_gen_h2g are used for
address conversion.
Signed-off-by: Yeqi Fu
---
accel/tcg/tcg-runtime.c | 66 +++
accel/tcg/tcg-runtime.h | 12 +++
include/exec/helper-head.h | 1 +
include/native/native-defs.h | 41 ++
include/tcg/tcg-op-common.h
configuration is needed.
Since config_host_mak essentially contains all the information from
the original tests/tcg/config-host.mak, the original config-host.mak
has been deleted and replaced with a symbolic link to config_host_mak.
Signed-off-by: Yeqi Fu
---
configure | 61
m*') and string-related ('str*') functions.
These subsets of functions often have the most significant effect
on overall performance, making them optimal candidates for
optimization.
Yeqi Fu (9):
build: Implement logic for sharing cross-building config files
build: Implement l
Introduce a new test for native calls to ensure their functionality.
The process involves cross-compiling the test cases, building them
as dynamically linked binaries, and running these binaries which
necessitates the addition of the appropriate interpreter prefix.
Signed-off-by: Yeqi Fu
This commit introduces support for native library calls on the
arm target. When encountering special instructions reserved
for native calls, this commit extracts the function name and
generates the corresponding native call.
Signed-off-by: Yeqi Fu
---
configs/targets/aarch64-linux-user.mak | 1
, tcg_gen_g2h and tcg_gen_h2g are used for
address conversion.
Signed-off-by: Yeqi Fu
---
accel/tcg/tcg-runtime.h | 22
include/native/native-defs.h | 42
include/tcg/tcg-op-common.h | 11 ++
include/tcg/tcg.h| 9 ++
tcg/tcg-op.c | 193
This commit introduces support for native library calls on the
i386 target. When encountering special instructions reserved
for native calls, this commit extracts the function name and
generates the corresponding native call.
Signed-off-by: Yeqi Fu
---
configs/targets/i386-linux-user.mak | 1
Signed-off-by: Yeqi Fu
---
docs/user/index.rst| 1 +
docs/user/native_calls.rst | 90 ++
2 files changed, 91 insertions(+)
create mode 100644 docs/user/native_calls.rst
diff --git a/docs/user/index.rst b/docs/user/index.rst
index 782d27cda2
This commit introduces support for native library calls on the
mips target. When encountering special instructions reserved
for native calls, this commit extracts the function name and
generates the corresponding native call.
Signed-off-by: Yeqi Fu
---
configs/targets/mips-linux-user.mak | 1
configuration is needed.
Since config_host_mak essentially contains all the information from
the original tests/tcg/config-host.mak, the original config-host.mak
has been deleted and replaced with a symbolic link to config_host_mak.
Signed-off-by: Yeqi Fu
---
configure | 61
Signed-off-by: Yeqi Fu
---
include/qemu/envlist.h| 13 ++
tests/unit/meson.build| 1 +
tests/unit/test-envlist.c | 94 +++
util/envlist.c| 67 +++-
4 files changed, 165 insertions(+), 10 deletions(-)
create
This commit implements a shared library, where native functions are
rewritten as special instructions. At runtime, user programs load
the shared library, and special instructions are executed when
native functions are called.
Signed-off-by: Yeqi Fu
---
Makefile| 2
This commit implements the -native-bypass support in linux-user. The
native_calls_enabled() function can be true only when the
'-native-bypass' option is given.
Signed-off-by: Yeqi Fu
---
include/native/native.h | 9 +
linux-user/main.c
m*') and string-related ('str*') functions.
These subsets of functions often have the most significant effect
on overall performance, making them optimal candidates for
optimization.
Yeqi Fu (10):
build: Implement logic for sharing cross-building config files
build: Implement l
Signed-off-by: Yeqi Fu
---
configure | 57 +--
1 file changed, 34 insertions(+), 23 deletions(-)
diff --git a/configure b/configure
index 2b41c49c0d..a076583141 100755
--- a/configure
+++ b/configure
@@ -1751,56 +1751,67 @@ if test
This commit introduces support for native library calls on the
arm target. When special instructions reserved for native calls
are encountered, the code now performs address translation and
generates the corresponding native call.
Signed-off-by: Yeqi Fu
---
configs/targets/aarch64-linux
Introduce a new test for native calls to ensure their functionality.
The process involves cross-compiling the test cases, building them
as dynamically linked binaries, and running these binaries which
necessitates the addition of the appropriate interpreter prefix.
Signed-off-by: Yeqi Fu
This commit implements the -native-bypass support in linux-user. The
native_calls_enabled() function can be true only when the
'-native-bypass' option is given.
Signed-off-by: Yeqi Fu
---
include/native/native.h | 9 +
linux-user/main.c
: Yeqi Fu
---
linux-user/elfload.c | 85 +---
1 file changed, 80 insertions(+), 5 deletions(-)
diff --git a/linux-user/elfload.c b/linux-user/elfload.c
index 9a2ec568b0..9448f91005 100644
--- a/linux-user/elfload.c
+++ b/linux-user/elfload.c
@@ -22,6 +22,9
Signed-off-by: Yeqi Fu
---
docs/user/index.rst| 1 +
docs/user/native_calls.rst | 90 ++
2 files changed, 91 insertions(+)
create mode 100644 docs/user/native_calls.rst
diff --git a/docs/user/index.rst b/docs/user/index.rst
index 782d27cda2
This commit introduces support for native library calls on the
i386 target. When special instructions reserved for native calls
are encountered, the code now performs address translation and
generates the corresponding native call.
Signed-off-by: Yeqi Fu
---
configs/targets/i386-linux-user.mak
Signed-off-by: Yeqi Fu
---
include/qemu/envlist.h| 13 ++
tests/unit/meson.build| 1 +
tests/unit/test-envlist.c | 94 +++
util/envlist.c| 71 -
4 files changed, 169 insertions(+), 10 deletions(-)
create
This commit implements tcg opcodes and helpers for extracting and
invoke native functions.
Signed-off-by: Yeqi Fu
---
accel/tcg/tcg-runtime.h | 22 ++
include/tcg/tcg-op-common.h | 11 +++
include/tcg/tcg.h | 9 +++
tcg/tcg-op.c| 140
This commit introduces support for native library calls on the
mips target. When special instructions reserved for native calls
are encountered, the code now performs address translation and
generates the corresponding native call.
Signed-off-by: Yeqi Fu
---
configs/targets/mips-linux-user.mak
This commit implements a shared library, where native functions are
rewritten as special instructions. At runtime, user programs load
the shared library, and special instructions are executed when
native functions are called.
Signed-off-by: Yeqi Fu
---
Makefile| 2
m*') and string-related ('str*') functions.
These subsets of functions often have the most significant effect
on overall performance, making them optimal candidates for
optimization.
Yeqi Fu (11):
build: Implement logic for sharing cross-building config files
build: Implement l
Add a test for native calls to verify the functionality of native
functions. This requires cross-compiling test cases and building them
as dynamically linked binaries. Also, introduce necessary system
libraries in QEMU.
Signed-off-by: Yeqi Fu
---
tests/tcg/multiarch/Makefile.target | 9
Upon encountering specialized instructions reserved for native calls,
store the function id and argument types, then invoke helper.
Signed-off-by: Yeqi Fu
---
target/mips/tcg/translate.c | 26 ++
target/mips/tcg/translate.h | 2 ++
2 files changed, 28 insertions
Signed-off-by: Yeqi Fu
---
docs/native_calls.txt | 70 +++
1 file changed, 70 insertions(+)
create mode 100644 docs/native_calls.txt
diff --git a/docs/native_calls.txt b/docs/native_calls.txt
new file mode 100644
index 00..8906566b13
--- /dev
This commit implements the -native-bypass support in linux-user. The
native_calls_enabled() function can be true only when the
'-native-bypass' option is given.
Signed-off-by: Yeqi Fu
---
linux-user/main.c | 36
1 file changed, 36 insertions(+)
di
the shared library, and specialized instructions are
executed when native functions are called. This patch is applicable
to user programs with architectures x86, x86_64, arm, aarch64, mips,
and mips64.
Yeqi Fu (10):
docs: Add specification for native library calls
build: Add configure options for
Upon encountering specialized instructions reserved for native calls,
store the function id and argument types, then invoke helper.
Signed-off-by: Yeqi Fu
---
target/i386/tcg/translate.c | 33 +
1 file changed, 33 insertions(+)
diff --git a/target/i386/tcg
Add CONFIG_NATIVE_CALL to architectures supporting native calls.
Signed-off-by: Yeqi Fu
---
configs/targets/aarch64-linux-user.mak | 1 +
configs/targets/arm-linux-user.mak | 1 +
configs/targets/i386-linux-user.mak| 1 +
configs/targets/mips-linux-user.mak| 1 +
configs/targets
This commit implements several helpers for extracting function id and
argument types, and then using this information to invoke native functions.
Signed-off-by: Yeqi Fu
---
accel/tcg/tcg-runtime.c | 37 +
accel/tcg/tcg-runtime.h | 4 ++
include/native/native-calls.h
Upon encountering specialized instructions reserved for native calls,
store the function id and argument types, then invoke helper.
Signed-off-by: Yeqi Fu
---
target/arm/tcg/translate-a64.c | 27 ++-
target/arm/tcg/translate.c | 25 +++--
target
Signed-off-by: Yeqi Fu
---
include/qemu/envlist.h | 1 +
util/envlist.c | 61 ++
2 files changed, 62 insertions(+)
diff --git a/include/qemu/envlist.h b/include/qemu/envlist.h
index 6006dfae44..865eb18e17 100644
--- a/include/qemu/envlist.h
+++ b
This commit implements a shared library, where native functions are
rewritten as specialized instructions. At runtime, user programs load
the shared library, and specialized instructions are executed when
native functions are called.
Signed-off-by: Yeqi Fu
---
Makefile
Signed-off-by: Yeqi Fu
---
target/mips/helper.h| 6
target/mips/tcg/meson.build | 1 +
target/mips/tcg/native_helper.c | 55 +
target/mips/tcg/translate.c | 20 +++-
target/mips/tcg/translate.h | 12 +++
5 files changed
Signed-off-by: Yeqi Fu
---
include/qemu/envlist.h | 1 +
linux-user/main.c | 23 +
util/envlist.c | 56 ++
3 files changed, 80 insertions(+)
diff --git a/include/qemu/envlist.h b/include/qemu/envlist.h
index 6006dfae44
Signed-off-by: Yeqi Fu
---
common-user/native/libnative.c | 65 ++
include/native/libnative.h | 11 ++
include/native/native-func.h | 11 ++
3 files changed, 87 insertions(+)
create mode 100644 common-user/native/libnative.c
create mode 100644
Signed-off-by: Yeqi Fu
---
target/arm/helper.c| 47 ++
target/arm/helper.h| 6 +
target/arm/tcg/translate-a64.c | 22
target/arm/tcg/translate.c | 25 +-
target/arm/tcg/translate.h | 19
Signed-off-by: Yeqi Fu
---
Makefile| 4 +++
common-user/native/Makefile.include | 9 ++
common-user/native/Makefile.target | 22 +
configure | 50 +
docs/devel/build-system.rst | 4
n the
'../configure --enable-user-native-call && make' command.
Yeqi Fu (6):
build: Add configure options for native calls
Add the libnative library
target/i386: Add native library calls
target/mips: Add native library calls
target/arm: Add native library calls
linux-user: Add
Signed-off-by: Yeqi Fu
---
target/i386/helper.h | 6 +++
target/i386/tcg/translate.c | 20 +
target/i386/tcg/user/meson.build | 1 +
target/i386/tcg/user/native_helper.c | 65
4 files changed, 92 insertions(+)
create mode
n the
'../configure --enable-user-native-call && make' command.
Signed-off-by: Yeqi Fu
---
include/exec/user/native-func.h | 8 +++
libnative.c | 76
meson.build | 8 +++
meson_options.txt
Bring the block files in line with the QEMU coding style, with spaces
for indentation. This patch partially resolves the issue 371.
Resolves: https://gitlab.com/qemu-project/qemu/-/issues/371
Signed-off-by: Yeqi Fu
---
block/bochs.c | 18 +++
block/file-posix.c | 126
53 matches
Mail list logo