qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [RFC v4 00/11] Native Library Calls
@ 2023-08-08 14:17 Yeqi Fu
  2023-08-08 14:17 ` [RFC v4 01/11] build: Implement logic for sharing cross-building config files Yeqi Fu
                   ` (10 more replies)
  0 siblings, 11 replies; 31+ messages in thread
From: Yeqi Fu @ 2023-08-08 14:17 UTC (permalink / raw)
  To: alex.bennee; +Cc: richard.henderson, qemu-devel, Yeqi Fu

Executing a program under QEMU's user mode subjects the entire
program, including all library calls, to translation. It's important
to understand that many of these library functions are optimized
specifically for the guest architecture. Therefore, their
translation might not yield the most efficient execution.

When the semantics of a library function are well defined, we can
capitalize on this by substituting the translated version with a call
to the native equivalent function.

To achieve tangible results, focus should be given to functions such
as memory-related ('mem*') 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 libnative library and the build machinery for
    libnative
  linux-user: Implement envlist_appendenv and add tests for envlist
  linux-user: Implement native-bypass option support
  linux-user/elfload: Add support for parsing symbols of native
    libraries.
  tcg: Add tcg opcodes and helpers for native library calls
  target/i386: Add support for native library calls
  target/mips: Add support for native library calls
  target/arm: Add support for native library calls
  tests/tcg/multiarch: Add nativecall.c test
  docs/user: Add doc for native library calls

 Makefile                                |   2 +
 accel/tcg/tcg-runtime.h                 |  22 ++++
 common-user/native/Makefile.include     |   9 ++
 common-user/native/Makefile.target      |  22 ++++
 common-user/native/libnative.c          |  67 ++++++++++++
 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/mips64-linux-user.mak   |   1 +
 configs/targets/x86_64-linux-user.mak   |   1 +
 configure                               |  96 ++++++++++++----
 docs/user/index.rst                     |   1 +
 docs/user/native_calls.rst              |  90 +++++++++++++++
 include/native/libnative.h              |   8 ++
 include/native/native.h                 |   9 ++
 include/qemu/envlist.h                  |  13 +++
 include/tcg/tcg-op-common.h             |  11 ++
 include/tcg/tcg.h                       |   9 ++
 linux-user/elfload.c                    |  85 +++++++++++++-
 linux-user/main.c                       |  38 +++++++
 target/arm/tcg/translate-a64.c          |  14 +++
 target/arm/tcg/translate.c              |  11 ++
 target/i386/tcg/translate.c             |  27 +++++
 target/mips/tcg/translate.c             |  21 +++-
 tcg/tcg-op.c                            | 140 ++++++++++++++++++++++++
 tests/tcg/multiarch/Makefile.target     |  17 +++
 tests/tcg/multiarch/native/nativecall.c |  98 +++++++++++++++++
 tests/unit/meson.build                  |   1 +
 tests/unit/test-envlist.c               |  94 ++++++++++++++++
 util/envlist.c                          |  71 ++++++++++--
 31 files changed, 943 insertions(+), 39 deletions(-)
 create mode 100644 common-user/native/Makefile.include
 create mode 100644 common-user/native/Makefile.target
 create mode 100644 common-user/native/libnative.c
 create mode 100644 docs/user/native_calls.rst
 create mode 100644 include/native/libnative.h
 create mode 100644 include/native/native.h
 create mode 100644 tests/tcg/multiarch/native/nativecall.c
 create mode 100644 tests/unit/test-envlist.c

-- 
2.34.1



^ permalink raw reply	[flat|nested] 31+ messages in thread

end of thread, other threads:[~2023-08-10  8:44 UTC | newest]

Thread overview: 31+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-08-08 14:17 [RFC v4 00/11] Native Library Calls Yeqi Fu
2023-08-08 14:17 ` [RFC v4 01/11] build: Implement logic for sharing cross-building config files Yeqi Fu
2023-08-09 12:24   ` Manos Pitsidianakis
2023-08-09 14:42   ` Alex Bennée
2023-08-09 15:23     ` Alex Bennée
2023-08-10  8:41   ` Alex Bennée
2023-08-08 14:17 ` [RFC v4 02/11] build: Implement libnative library and the build machinery for libnative Yeqi Fu
2023-08-09 15:18   ` Alex Bennée
2023-08-09 16:10   ` Richard Henderson
2023-08-08 14:17 ` [RFC v4 03/11] linux-user: Implement envlist_appendenv and add tests for envlist Yeqi Fu
2023-08-09 15:27   ` Alex Bennée
2023-08-09 15:44   ` Richard Henderson
2023-08-09 16:06   ` Richard Henderson
2023-08-08 14:17 ` [RFC v4 04/11] linux-user: Implement native-bypass option support Yeqi Fu
2023-08-09 15:42   ` Richard Henderson
2023-08-09 15:47   ` Alex Bennée
2023-08-08 14:17 ` [RFC v4 05/11] linux-user/elfload: Add support for parsing symbols of native libraries Yeqi Fu
2023-08-09 16:14   ` Richard Henderson
2023-08-09 17:04     ` Alex Bennée
2023-08-08 14:17 ` [RFC v4 06/11] tcg: Add tcg opcodes and helpers for native library calls Yeqi Fu
2023-08-09 16:41   ` Alex Bennée
2023-08-08 14:17 ` [RFC v4 07/11] target/i386: Add support " Yeqi Fu
2023-08-09 16:44   ` Richard Henderson
2023-08-08 14:17 ` [RFC v4 08/11] target/mips: " Yeqi Fu
2023-08-08 14:17 ` [RFC v4 09/11] target/arm: " Yeqi Fu
2023-08-08 14:17 ` [RFC v4 10/11] tests/tcg/multiarch: Add nativecall.c test Yeqi Fu
2023-08-09  8:42   ` Alex Bennée
2023-08-09 17:01   ` Alex Bennée
2023-08-09 17:12   ` Alex Bennée
2023-08-08 14:17 ` [RFC v4 11/11] docs/user: Add doc for native library calls Yeqi Fu
2023-08-09 12:51   ` Manos Pitsidianakis

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).