qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [RFC v5 00/10] Native Library Calls
@ 2023-08-25 10:19 Yeqi Fu
  2023-08-25 10:19 ` [RFC v5 01/10] build: Implement logic for sharing cross-building config files Yeqi Fu
                   ` (3 more replies)
  0 siblings, 4 replies; 7+ messages in thread
From: Yeqi Fu @ 2023-08-25 10:19 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 (10):
  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
  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.S          |  69 +++++++++
 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                               | 100 +++++++++---
 docs/user/index.rst                     |   1 +
 docs/user/native_calls.rst              |  90 +++++++++++
 include/native/native-defs.h            |  42 ++++++
 include/native/native.h                 |   9 ++
 include/qemu/envlist.h                  |  13 ++
 include/tcg/tcg-op-common.h             |  11 ++
 include/tcg/tcg.h                       |   9 ++
 linux-user/main.c                       |  38 +++++
 linux-user/syscall.c                    |  21 +++
 target/arm/tcg/translate-a64.c          |  31 ++++
 target/arm/tcg/translate.c              |  28 ++++
 target/arm/tcg/translate.h              |   5 +
 target/i386/tcg/translate.c             |  37 +++++
 target/mips/tcg/translate.c             |  36 ++++-
 tcg/tcg-op.c                            | 193 +++++++++++++++++++++++-
 tests/tcg/multiarch/Makefile.target     |  30 ++++
 tests/tcg/multiarch/native/nativecall.c | 121 +++++++++++++++
 tests/unit/meson.build                  |   1 +
 tests/unit/test-envlist.c               |  94 ++++++++++++
 util/envlist.c                          |  67 ++++++--
 32 files changed, 1072 insertions(+), 35 deletions(-)
 create mode 100644 common-user/native/Makefile.include
 create mode 100644 common-user/native/Makefile.target
 create mode 100644 common-user/native/libnative.S
 create mode 100644 docs/user/native_calls.rst
 create mode 100644 include/native/native-defs.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] 7+ messages in thread

end of thread, other threads:[~2023-08-26  1:51 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-08-25 10:19 [RFC v5 00/10] Native Library Calls Yeqi Fu
2023-08-25 10:19 ` [RFC v5 01/10] build: Implement logic for sharing cross-building config files Yeqi Fu
2023-08-25 10:20 ` [RFC v5 02/10] build: Implement libnative library and the build machinery for libnative Yeqi Fu
2023-08-26  1:34   ` Richard Henderson
2023-08-25 10:20 ` [RFC v5 03/10] linux-user: Implement envlist_appendenv and add tests for envlist Yeqi Fu
2023-08-25 10:20 ` [RFC v5 04/10] linux-user: Implement native-bypass option support Yeqi Fu
2023-08-26  1:50   ` Richard Henderson

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).