From nobody Sun Nov 24 07:02:40 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of lists.libvirt.org designates 8.43.85.245 as permitted sender) client-ip=8.43.85.245; envelope-from=devel-bounces@lists.libvirt.org; helo=lists.libvirt.org; Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of lists.libvirt.org designates 8.43.85.245 as permitted sender) smtp.mailfrom=devel-bounces@lists.libvirt.org; dmarc=fail(p=none dis=none) header.from=linaro.org Return-Path: Received: from lists.libvirt.org (lists.libvirt.org [8.43.85.245]) by mx.zohomail.com with SMTPS id 1726248554349913.6906594414329; Fri, 13 Sep 2024 10:29:14 -0700 (PDT) Received: by lists.libvirt.org (Postfix, from userid 996) id 4D748192B; Fri, 13 Sep 2024 13:29:13 -0400 (EDT) Received: from lists.libvirt.org (localhost [IPv6:::1]) by lists.libvirt.org (Postfix) with ESMTP id 7010C145D; Fri, 13 Sep 2024 13:27:10 -0400 (EDT) Received: by lists.libvirt.org (Postfix, from userid 996) id 135BE1415; Fri, 13 Sep 2024 13:27:03 -0400 (EDT) Received: from mail-wr1-f49.google.com (mail-wr1-f49.google.com [209.85.221.49]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by lists.libvirt.org (Postfix) with ESMTPS id 4E93A13CE for ; Fri, 13 Sep 2024 13:27:02 -0400 (EDT) Received: by mail-wr1-f49.google.com with SMTP id ffacd0b85a97d-374b25263a3so874597f8f.0 for ; Fri, 13 Sep 2024 10:27:02 -0700 (PDT) Received: from draig.lan ([85.9.250.243]) by smtp.gmail.com with ESMTPSA id 4fb4d7f45d1cf-5c3ebd5212asm7864030a12.57.2024.09.13.10.26.56 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 13 Sep 2024 10:26:57 -0700 (PDT) Received: from draig.lan (localhost [IPv6:::1]) by draig.lan (Postfix) with ESMTP id 317965F8C3; Fri, 13 Sep 2024 18:26:56 +0100 (BST) X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on lists.libvirt.org X-Spam-Level: X-Spam-Status: No, score=-0.6 required=5.0 tests=DKIM_INVALID,DKIM_SIGNED, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2,SPF_HELO_NONE autolearn=unavailable autolearn_force=no version=3.4.4 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1726248421; x=1726853221; darn=lists.libvirt.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=NUatFApg2Cs5Vc3/hwC8i7ZiRClvTT8CyVvcfUZaS0U=; b=bIY3H0YsHNKcJwuXKEBOxLUQSkK996MlLsFSVDQHzdzV/5qMmiCL2Fhqs1Ua+hP3qu GVLOcNW70+M8CCJeszZnpTq5d5Ez9/hTNNohSjq1UwJthNxyiUWCsd4i5+T+Hou7Lgq7 BeEIz1EW9W9zsrR9D6CwouJK0hvIM6gSYaE+0QnQbI1cNiz8Mit0g/guXuypnmXvF+wn hNVV48aRsbX/O5GUAluM1SEhLDDvfpTcqNKXfC3FooZWKzGxaZ2Qfw+EIF+jbok21JI2 lTo+pWrMfHNU56qid0mqR4B+8q/q3iGMaiUHCBRyfdkOZM1TW767q6D6PWSd1Vz93aZi mOJQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1726248421; x=1726853221; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=NUatFApg2Cs5Vc3/hwC8i7ZiRClvTT8CyVvcfUZaS0U=; b=hAXk5Q4HibJjBr9fEBtRDB0ih+t5GZA8jkLrXjG7ttyIHUraec2vgnPnZB5Zfe3dsW 5UARCjW0bReLmdw5GvtRX4qXQut44ePiKzExZ/zHdHU7VVxcnLXHPuJJ+Ue0yASAXkcg v0Yb1/Q+l+ahEkCSwelleMpyiay+R5ruLAx+0GiyMlLrASQ3DKHqaekGY1vrzz5Ubbm+ GrHJVJnydK/hC4+vSSli9UKyF+CVWmyB0MTwbMmOLrVx984GlP/e/JY26Or1nehbXKQj C13hnhVCa6Et/LKjv+KimPFZK8NACLqM5+PqtNXQRIlgz7r2f9C9eJ6Y0csbDPLqD6pf SD/g== X-Forwarded-Encrypted: i=1; AJvYcCWL08Yy5F5oL81cC1BJ0ksMEFeQfQSnOUT38cpBaXAuiu/coqt8AZTK4Ac+esIBzsoQWidanA==@lists.libvirt.org X-Gm-Message-State: AOJu0YyPTvLmwnmw1vXE3OszwrU+bNdO/5U3U3psYQMbo5Zy81WxcBcK dHWg1h0PnE42D/KgtdRJ+AWaRxNLk4lmzGBmlxfCiwJEpZAYxJslHNvYhJmV+v8= X-Google-Smtp-Source: AGHT+IHKKyf5ejwCJKMPXA8BYeuUmTDQT/fT0817zZDcui5LC+sxij4NZUISFyk/FH2B8D1GwWhLig== X-Received: by 2002:adf:cd8b:0:b0:374:b5fc:68df with SMTP id ffacd0b85a97d-378d61d4f96mr2116520f8f.4.1726248420508; Fri, 13 Sep 2024 10:27:00 -0700 (PDT) From: =?UTF-8?q?Alex=20Benn=C3=A9e?= To: qemu-devel@nongnu.org Subject: [PATCH 01/17] deprecation: don't enable TCG plugins by default on 32 bit hosts Date: Fri, 13 Sep 2024 18:26:39 +0100 Message-Id: <20240913172655.173873-2-alex.bennee@linaro.org> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20240913172655.173873-1-alex.bennee@linaro.org> References: <20240913172655.173873-1-alex.bennee@linaro.org> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Message-ID-Hash: FMLTPY5NEWW7CGFRCPDKOTKT2GOWCWDD X-Message-ID-Hash: FMLTPY5NEWW7CGFRCPDKOTKT2GOWCWDD X-MailFrom: alex.bennee@linaro.org X-Mailman-Rule-Hits: nonmember-moderation X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; header-match-config-1; header-match-config-2; header-match-config-3; header-match-devel.lists.libvirt.org-0 CC: Richard Henderson , devel@lists.libvirt.org, Thomas Huth , Mahmoud Mandour , Paolo Bonzini , David Hildenbrand , Ilya Leoshkevich , qemu-ppc@nongnu.org, Zhao Liu , =?UTF-8?q?Alex=20Benn=C3=A9e?= , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Yanan Wang , Eduardo Habkost , qemu-s390x@nongnu.org, Alexandre Iooss , Pierrick Bouvier , Nicholas Piggin , Daniel Henrique Barboza , Marcel Apfelbaum X-Mailman-Version: 3.2.2 Precedence: list List-Id: Development discussions about the libvirt library & tools Archived-At: List-Archive: List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-ZohoMail-DKIM: fail (Header signature does not verify) X-ZM-MESSAGEID: 1726248556465116600 Content-Type: text/plain; charset="utf-8" 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. Message-Id: <20240910140733.4007719-12-alex.bennee@linaro.org> Reviewed-by: Pierrick Bouvier Signed-off-by: Alex Benn=C3=A9e --- v2 - don't manually set based on CPU type, use __SIZEOF_POINTER__ --- docs/about/deprecated.rst | 11 +++++++++++ configure | 21 ++++++++++++++++++++- 2 files changed, 31 insertions(+), 1 deletion(-) diff --git a/docs/about/deprecated.rst b/docs/about/deprecated.rst index 88f0f03786..f7c7c33d39 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. =20 +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 lose data. As most software analysis +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. =20 System emulator CPUs -------------------- diff --git a/configure b/configure index 7f6eb6b331..f376fa24b3 100755 --- a/configure +++ b/configure @@ -516,6 +516,25 @@ case "$cpu" in ;; esac =20 +# Now we have our CPU_CFLAGS we can check if we are targeting a 32 or +# 64 bit host. + +check_64bit_host() { +cat > $TMPC <