qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [RFC v3 00/10] Native Library Calls
@ 2023-06-25 21:26 Yeqi Fu
  2023-06-25 21:26 ` [RFC v3 01/10] docs: Add specification for native library calls Yeqi Fu
                   ` (9 more replies)
  0 siblings, 10 replies; 20+ messages in thread
From: Yeqi Fu @ 2023-06-25 21:26 UTC (permalink / raw)
  To: alex.bennee; +Cc: richard.henderson, qemu-devel, Yeqi Fu

This patch introduces a set of specialized instructions for native calls
and provides helpers to translate these instructions to corresponding
native functions. A shared library is also implemented, 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. 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 native calls
  build: Implement libnative library and configure options
  linux-user: Implement envlist_appendenv
  linux-user: Implement native-bypass option support
  accel/tcg: Add support 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 nativecalls.c test

 Makefile                                 |   2 +
 accel/tcg/tcg-runtime.c                  |  37 ++++++++
 accel/tcg/tcg-runtime.h                  |   4 +
 common-user/native/Makefile.include      |   9 ++
 common-user/native/Makefile.target       |  26 ++++++
 common-user/native/libnative.c           | 112 +++++++++++++++++++++++
 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                                |  84 +++++++++++++----
 docs/native_calls.txt                    |  70 ++++++++++++++
 include/native/libnative.h               |  12 +++
 include/native/native-calls.h            |  75 +++++++++++++++
 include/native/native-defs.h             |  65 +++++++++++++
 include/qemu/envlist.h                   |   1 +
 linux-user/main.c                        |  36 ++++++++
 target/arm/tcg/translate-a64.c           |  27 +++++-
 target/arm/tcg/translate.c               |  25 ++++-
 target/arm/tcg/translate.h               |   6 ++
 target/i386/tcg/translate.c              |  33 +++++++
 target/mips/tcg/translate.c              |  26 ++++++
 target/mips/tcg/translate.h              |   2 +
 tests/tcg/multiarch/Makefile.target      |   9 +-
 tests/tcg/multiarch/native/nativecalls.c | 103 +++++++++++++++++++++
 util/envlist.c                           |  61 ++++++++++++
 28 files changed, 810 insertions(+), 21 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/native_calls.txt
 create mode 100644 include/native/libnative.h
 create mode 100644 include/native/native-calls.h
 create mode 100644 include/native/native-defs.h
 create mode 100644 tests/tcg/multiarch/native/nativecalls.c

-- 
2.34.1



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

end of thread, other threads:[~2023-07-03 18:27 UTC | newest]

Thread overview: 20+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-06-25 21:26 [RFC v3 00/10] Native Library Calls Yeqi Fu
2023-06-25 21:26 ` [RFC v3 01/10] docs: Add specification for native library calls Yeqi Fu
2023-07-03 15:04   ` Alex Bennée
2023-06-25 21:26 ` [RFC v3 02/10] build: Add configure options for native calls Yeqi Fu
2023-07-03 15:22   ` Alex Bennée
2023-06-25 21:27 ` [RFC v3 03/10] build: Implement libnative library and configure options Yeqi Fu
2023-06-25 21:47   ` Philippe Mathieu-Daudé
2023-07-03 15:30   ` Alex Bennée
2023-06-25 21:27 ` [RFC v3 04/10] linux-user: Implement envlist_appendenv Yeqi Fu
2023-07-03 16:38   ` Alex Bennée
2023-07-03 16:55     ` Warner Losh
2023-06-25 21:27 ` [RFC v3 05/10] linux-user: Implement native-bypass option support Yeqi Fu
2023-07-03 18:21   ` Alex Bennée
2023-06-25 21:27 ` [RFC v3 06/10] accel/tcg: Add support for native library calls Yeqi Fu
2023-06-25 21:27 ` [RFC v3 07/10] target/i386: " Yeqi Fu
2023-06-25 21:27 ` [RFC v3 08/10] target/mips: " Yeqi Fu
2023-06-25 21:53   ` Philippe Mathieu-Daudé
2023-06-25 21:27 ` [RFC v3 09/10] target/arm: " Yeqi Fu
2023-07-03 12:13   ` Alex Bennée
2023-06-25 21:27 ` [RFC v3 10/10] tests/tcg/multiarch: Add nativecalls.c test Yeqi Fu

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