[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [RFC] Native Library Calls
From: |
Peter Maydell |
Subject: |
Re: [RFC] Native Library Calls |
Date: |
Tue, 30 May 2023 15:46:31 +0100 |
On Tue, 30 May 2023 at 15:26, Yeqi Fu <fufuyqqqqqq@gmail.com> wrote:
>
> 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.
So it's essentially providing a QEMU-specific ABI that
(somewhat similarly to semihosting) allows guest programs
to use particular instructions/instruction patterns to
say "do a memcpy/memset/memcmp" ?
Is this an ABI that's implemented by anybody else?
I'm pretty strongly negative about this as an idea -- I don't
think we should be adding QEMU-specific guest-facing ABIs,
especially if the usage of them is likely to be very very low.
At any rate, it needs a lot more justification for why it's
worthwhile than the commit message has provided.
thanks
-- PMM