From: Peter Maydell <peter.maydell@linaro.org>
To: "Alex Bennée" <alex.bennee@linaro.org>
Cc: qemu-devel@nongnu.org, Paolo Bonzini <pbonzini@redhat.com>,
Thomas Huth <thuth@redhat.com>,
"reviewer:Incompatible changes" <devel@lists.libvirt.org>
Subject: Re: [RFC PATCH] deprecation: don't enable TCG plugins by default on 32 bit hosts
Date: Thu, 5 Sep 2024 12:43:47 +0100 [thread overview]
Message-ID: <CAFEAcA_OP2eNw0zQKCRi37cR-1eLPCnVC5dh0+dcPVuJ1YF3-Q@mail.gmail.com> (raw)
In-Reply-To: <20240905111153.786500-1-alex.bennee@linaro.org>
On Thu, 5 Sept 2024 at 12:13, Alex Bennée <alex.bennee@linaro.org> wrote:
>
> The existing plugins already liberally use host pointer stuffing for
> passing user data which will fail when doing 64 bit guests on 32 bit
> hosts. We should discourage this by officially deprecating support and
> adding another nail to the 32 bit host coffin.
>
> Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
> ---
> docs/about/deprecated.rst | 11 +++++++++++
> configure | 11 ++++++++++-
> 2 files changed, 21 insertions(+), 1 deletion(-)
>
> diff --git a/docs/about/deprecated.rst b/docs/about/deprecated.rst
> index 88f0f03786..8a4e249717 100644
> --- a/docs/about/deprecated.rst
> +++ b/docs/about/deprecated.rst
> @@ -184,6 +184,17 @@ be an effective use of its limited resources, and thus intends to discontinue
> it. Since all recent x86 hardware from the past >10 years is capable of the
> 64-bit x86 extensions, a corresponding 64-bit OS should be used instead.
>
> +TCG Plugin support not enabled by default on 32-bit hosts (since 9.2)
> +'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
> +
> +While it is still possible to enable TCG plugin support for 32-bit
> +hosts there are a number of potential pitfalls when instrumenting
> +64-bit guests. The plugin APIs typically pass most addresses as
> +uint64_t but practices like encoding that address in a host pointer
> +for passing as user-data will loose data. As most software analysis
"lose"
> +benefits from having plenty of host memory it seems reasonable to
> +encourage users to use 64 bit builds of QEMU for analysis work
> +whatever targets they are instrumenting.
> diff --git a/configure b/configure
> index d08b71f14b..8acb311527 100755
> --- a/configure
> +++ b/configure
> @@ -424,6 +424,7 @@ fi
> # Note that this case should only have supported host CPUs, not guests.
> # Please keep it sorted and synchronized with meson.build's host_arch.
> host_arch=
> +host_bits=64
> linux_arch=
> case "$cpu" in
> aarch64)
> @@ -434,12 +435,14 @@ case "$cpu" in
> armv*b|armv*l|arm)
> cpu=arm
> host_arch=arm
> + host_bits=32
> linux_arch=arm
> ;;
>
> i386|i486|i586|i686)
> cpu="i386"
> host_arch=i386
> + host_bits=32
> linux_arch=x86
> CPU_CFLAGS="-m32"
> ;;
This is pretty awkward. We should only put stuff into this
"switch per CPU architecture" where we absolutely cannot
automatically determine it. Host bitness can be automatically
determined (see what the compiler has set __SIZEOF_POINTER__
to), so we should do that.
thanks
-- PMM
next prev parent reply other threads:[~2024-09-05 11:44 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-09-05 11:11 [RFC PATCH] deprecation: don't enable TCG plugins by default on 32 bit hosts Alex Bennée
2024-09-05 11:43 ` Peter Maydell [this message]
2024-09-05 11:45 ` Philippe Mathieu-Daudé
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=CAFEAcA_OP2eNw0zQKCRi37cR-1eLPCnVC5dh0+dcPVuJ1YF3-Q@mail.gmail.com \
--to=peter.maydell@linaro.org \
--cc=alex.bennee@linaro.org \
--cc=devel@lists.libvirt.org \
--cc=pbonzini@redhat.com \
--cc=qemu-devel@nongnu.org \
--cc=thuth@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).