From nobody Sun Nov 24 04:28:21 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 1726476905993754.2722403275695; Mon, 16 Sep 2024 01:55:05 -0700 (PDT) Received: by lists.libvirt.org (Postfix, from userid 996) id E70FC1A04; Mon, 16 Sep 2024 04:55:04 -0400 (EDT) Received: from lists.libvirt.org (localhost [IPv6:::1]) by lists.libvirt.org (Postfix) with ESMTP id 1386B19F0; Mon, 16 Sep 2024 04:54:09 -0400 (EDT) Received: by lists.libvirt.org (Postfix, from userid 996) id 8236F1402; Mon, 16 Sep 2024 04:54:04 -0400 (EDT) Received: from mail-wm1-f46.google.com (mail-wm1-f46.google.com [209.85.128.46]) (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 C3D8013FE for ; Mon, 16 Sep 2024 04:54:03 -0400 (EDT) Received: by mail-wm1-f46.google.com with SMTP id 5b1f17b1804b1-42cb8dac900so40985095e9.3 for ; Mon, 16 Sep 2024 01:54:03 -0700 (PDT) Received: from draig.lan ([85.9.250.243]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-42da22e733bsm70272705e9.22.2024.09.16.01.54.01 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 16 Sep 2024 01:54:01 -0700 (PDT) Received: from draig.lan (localhost [IPv6:::1]) by draig.lan (Postfix) with ESMTP id 5C2B55F8F2; Mon, 16 Sep 2024 09:54:00 +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=-1.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=1726476842; x=1727081642; 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=SsHJWK1avixuzVqxRi8ie9rxVBQXKR8UstAkKvtNg2M=; b=BajJwcoo1Fs8iyLCUs97kwogFl44hgbWP7whnArfqelyIh8R458+IKxAqE34wA5iFb uGNapRAelyxRcqCO2VtXziwIQKCmfnYyTDPLHsBH2mgYxkR24L++ajapdD9+Ctp3eN4l 8+pm433PR1kltPKrGfoqabTRWHm9fOW5tWVGqXHNQPfM3eYbvf43sFjVj112PCWrQbST sPloWDHDv2xQtsFyJWT55VK5WmXKc4vx1Eoh1woAwcw1DMAAwKAZ6bi9I2BKSak97zdW 1b9jzmkFTmXjLMZwCHTAruk+rMqC1E0gnqBM4XK8R1coRjrQnonvh+HeKgbS0unB27qB ReUA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1726476842; x=1727081642; 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=SsHJWK1avixuzVqxRi8ie9rxVBQXKR8UstAkKvtNg2M=; b=INR8u918DppM2Zikv+978a89Hs/4JGvfFe7KHMwnvzf7I7+RkFi3TghyN4nDUu4QMr dLZ+PTfA02DjwWsxOXmskpMCoJ/ZNy6yuW737bKvuqWwsT7Ex3y+dH5YYiQj9MOS99vm Tcmh2kKP/yBUi133l+f0KKTrlGcQtmY0mzDv9Pgo06uHbY+r4JOReymm171QLOMCU0Ix cLtSmf/jASqSN8ULUhMM3KoUanfqYqPzmfQK+SYqz7HyWOcNCCHJwkDzFD/Nfd3YqSlq Elv3hoWtm4ekAoiYwV3O16Tv79okp15NYBJBdSz+SHJJGRObNZjaMeSwle1WAfLMHf4U B+RQ== X-Forwarded-Encrypted: i=1; AJvYcCW9q8xTlFovadx1UGmwwhpu6EEWOB2S8pzQfzCTcl+RZmzfsaWZuaUsbN/xdBed0EDeQalNeQ==@lists.libvirt.org X-Gm-Message-State: AOJu0YxHlSz/5+CgdbyneOQnXdt+a9SPFBt5hrMQiNzsMfEVIISD9872 4lPRQadsksWvjci8McdhaG2MmmOP3BCiq46QrieUYAcMXaMrN7pY3wl4myc3GP4= X-Google-Smtp-Source: AGHT+IFNivt/OyI9olUKHVvAxnBI+LOquP/cWDiGl0t4mVcwedg1MQNm7mWOBMkETbSwIMUcuY3Leg== X-Received: by 2002:a05:600c:1d1a:b0:42c:b45d:4a7b with SMTP id 5b1f17b1804b1-42cdb56ade7mr120462295e9.25.1726476841926; Mon, 16 Sep 2024 01:54:01 -0700 (PDT) From: =?UTF-8?q?Alex=20Benn=C3=A9e?= To: qemu-devel@nongnu.org Subject: [PATCH v2 01/18] deprecation: don't enable TCG plugins by default on 32 bit hosts Date: Mon, 16 Sep 2024 09:53:43 +0100 Message-Id: <20240916085400.1046925-2-alex.bennee@linaro.org> X-Mailer: git-send-email 2.39.5 In-Reply-To: <20240916085400.1046925-1-alex.bennee@linaro.org> References: <20240916085400.1046925-1-alex.bennee@linaro.org> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Message-ID-Hash: EIKGPKBBCICPJEBB2TKW4H4OCAC5PVOC X-Message-ID-Hash: EIKGPKBBCICPJEBB2TKW4H4OCAC5PVOC 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: qemu-s390x@nongnu.org, Thomas Huth , Richard Henderson , qemu-ppc@nongnu.org, Ilya Leoshkevich , Paolo Bonzini , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Marcel Apfelbaum , Alexandre Iooss , Eduardo Habkost , Daniel Henrique Barboza , Yanan Wang , Nicholas Piggin , David Hildenbrand , devel@lists.libvirt.org, Mahmoud Mandour , Zhao Liu , =?UTF-8?q?Alex=20Benn=C3=A9e?= , Pierrick Bouvier 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: 1726476906938116600 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 <