qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [RFC v2 0/6] Native Library Calls
@ 2023-06-07 16:47 Yeqi Fu
  2023-06-07 16:47 ` [RFC v2 1/6] build: Add configure options for native calls Yeqi Fu
                   ` (5 more replies)
  0 siblings, 6 replies; 17+ messages in thread
From: Yeqi Fu @ 2023-06-07 16:47 UTC (permalink / raw)
  To: alex.bennee; +Cc: richard.henderson, qemu-devel, Yeqi Fu

This patch introduces a set of feature 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 feature instructions. At runtime, user
programs load the shared library, and feature 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. To build, compile libnative.c into a shared library for
the user program's architecture and run 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 '-native-bypass' option

 Makefile                             |  4 ++
 common-user/native/Makefile.include  |  9 ++++
 common-user/native/Makefile.target   | 22 ++++++++++
 common-user/native/libnative.c       | 65 ++++++++++++++++++++++++++++
 configure                            | 50 +++++++++++++++++++++
 docs/devel/build-system.rst          |  4 ++
 include/native/libnative.h           | 11 +++++
 include/native/native-func.h         | 11 +++++
 include/qemu/envlist.h               |  1 +
 linux-user/main.c                    | 23 ++++++++++
 meson.build                          |  8 ++++
 meson_options.txt                    |  2 +
 scripts/meson-buildoptions.sh        |  4 ++
 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 ++++++++
 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 ++++++++++++++++++++++++++++
 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 +++++
 util/envlist.c                       | 56 ++++++++++++++++++++++++
 28 files changed, 573 insertions(+), 2 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 include/native/libnative.h
 create mode 100644 include/native/native-func.h
 create mode 100644 target/i386/tcg/user/native_helper.c
 create mode 100644 target/mips/tcg/native_helper.c

-- 
2.34.1



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

end of thread, other threads:[~2023-06-15  8:06 UTC | newest]

Thread overview: 17+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-06-07 16:47 [RFC v2 0/6] Native Library Calls Yeqi Fu
2023-06-07 16:47 ` [RFC v2 1/6] build: Add configure options for native calls Yeqi Fu
2023-06-09  5:08   ` Manos Pitsidianakis
2023-06-12 11:54   ` Alex Bennée
2023-06-12 13:02     ` Alex Bennée
2023-06-07 16:47 ` [RFC v2 2/6] Add the libnative library Yeqi Fu
2023-06-15  7:59   ` Alex Bennée
2023-06-07 16:47 ` [RFC v2 3/6] target/i386: Add native library calls Yeqi Fu
2023-06-07 19:08   ` Richard Henderson
2023-06-07 19:19   ` Richard Henderson
2023-06-07 16:47 ` [RFC v2 4/6] target/mips: " Yeqi Fu
2023-06-07 19:15   ` Richard Henderson
2023-06-07 16:47 ` [RFC v2 5/6] target/arm: " Yeqi Fu
2023-06-07 16:47 ` [RFC v2 6/6] linux-user: Add '-native-bypass' option Yeqi Fu
2023-06-09  5:24   ` Manos Pitsidianakis
2023-06-12 13:06     ` Alex Bennée
2023-06-12 13:23   ` Alex Bennée

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