From patchwork Fri Feb 7 21:06:54 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 863009 Delivered-To: patch@linaro.org Received: by 2002:a5d:4e42:0:b0:385:e875:8a9e with SMTP id r2csp533983wrt; Fri, 7 Feb 2025 13:09:05 -0800 (PST) X-Forwarded-Encrypted: i=2; AJvYcCUNlzl1/M54OFT/z7w+/rg4E2Sjnh43oMmjZotbORqdx14mOlHdC05aHz/vK1tsumNE8JgD8Q==@linaro.org X-Google-Smtp-Source: AGHT+IHiOJ13W1vcePdTsKgc1d5R7S6fNBaQxbEYr49+OaTTo1aZPfN7Brq6ahAqRqimQy3jiXxB X-Received: by 2002:ac8:7d01:0:b0:466:a824:751c with SMTP id d75a77b69052e-47167a39bd4mr65894651cf.29.1738962545157; Fri, 07 Feb 2025 13:09:05 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1738962545; cv=none; d=google.com; s=arc-20240605; b=Qj+vZ1zTCjl2O6phEvZlP3cx2KCrvMxFYrNMqj+HhFnjcq7g12x8WqD/jd5yfGiVO6 yr9pKXG1EnLhkqitNSMnevagiVg1hftQeMXBapjyERszprIaDJpXSdVPWSYqFHPiZvtv g7dO2bmjVIt5hwrpzqazFmVt0gvOGauIYGSZhwFcetFdN1iBu6QJz0BPqmMe8YcjBWIH XtNqPtxNI1utmdB3kvaFFCPPi1xJy8BgTeDYKzYODRMa+6iKceEaGSUnIAyn35gUMV2Q H3s0y9uqiIrgkDeG3hne0AAK3kVK+f5p2wXxm7zyO17SunRMvKqFSQK7cGP6MFKj40xp OQCg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=Vn1shkzQyA8tl35At/zndAM9YWk74Q9p22uLELQ70Wg=; fh=kJMCMx+0ERv7a3rbsYoH9j+lG6+DeyggCoQTi5fJs3w=; b=MbJSBQ+U7/dM+P1HUCQBP73P3JjSJYXEljhRWr2SnSpj4q4rlQhnlnRw+//7GK6zOd eXMbJTm6fff/fOPPPQUjP9UIOqa5vgViZK63H0GmjrFKskusXp2++b7USJeEu2fbeZmr 9Fucz6qHwXUOP2daFwBOwggUsB8xy0xsjqK7jysaNtcMAw4KMi4wP9DxWkKALx8bJfoI CrEh1TSqf0bFAye68QHkq49k6F5KmvAcLaebH2F6eXaTZRooR24+7PhN/9rTT7WSN5cJ AUFLogkHQMkJ0pfFiyQwtWj+BKQvG2ERU0hDXzkNNLmAvFGJKin3RSX3CkdHAQTzSFNu 1TEQ==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="D/EDYy9D"; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id d75a77b69052e-4714927b6cesi39680801cf.22.2025.02.07.13.09.05 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Fri, 07 Feb 2025 13:09:05 -0800 (PST) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="D/EDYy9D"; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tgVZR-0008MS-CE; Fri, 07 Feb 2025 16:07:29 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1tgVZ9-0007no-9F for qemu-devel@nongnu.org; Fri, 07 Feb 2025 16:07:11 -0500 Received: from mail-pl1-x62a.google.com ([2607:f8b0:4864:20::62a]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1tgVZ4-00023x-CI for qemu-devel@nongnu.org; Fri, 07 Feb 2025 16:07:08 -0500 Received: by mail-pl1-x62a.google.com with SMTP id d9443c01a7336-21f464b9a27so37592115ad.1 for ; Fri, 07 Feb 2025 13:07:05 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1738962425; x=1739567225; darn=nongnu.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=Vn1shkzQyA8tl35At/zndAM9YWk74Q9p22uLELQ70Wg=; b=D/EDYy9DRMG8CzOLL25c3F3R+4LDZy81b/d9xZdJ86pabW70PdhnheohIp9PMcDNZG CEVYnmvXWL+tU3DRV51UcJyBknCGGI9ry2h6cT/BascdJyufk4IusLT18S4e+TMg3kZL eskk0z8Kt8UJ2wcNPZmD1fioUH2Y6RCT0pN/DpHIxU9C/byxn6GugmO2Bdv2sJxh9ih9 apLOO4thN+kD+rfxCsHBAsAxuCOy4cs1rRxyZvB/m9RhntxU7QWFzk2fimAROch/ZHQH BVHWnhHm2IaaQhgSYs0cFScFlDu48dAy+6SMdZyxZVnoFNUWGHqG3gddsUUKL9D6RJx+ OpVw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1738962425; x=1739567225; 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=Vn1shkzQyA8tl35At/zndAM9YWk74Q9p22uLELQ70Wg=; b=YZZ1ARIY00v5k1BJGbFIuqTb1BOVsNnDhuy7ctSwO+CpL+NAs4y6ERoWAl1A7BMwrQ 5X3nAo3Sqp8tVC/fvXT09+liS1K/6YeAv4EaxkFqPh2TA6ijxV41dTAYP+3CvmY1ylJ4 taiITADf5ZQTSH7nbl9nOP28+KxPl/RTWzmsLaXK0JHvd9GnTzzIWbOzGlE5uFEMaxEy bcq4MUFlClylDbGrUUQ1TKeVgaLRXPCAFhaQYAPW2Zql+1KR8gSCkUDBo/B68YF3HvJB Pn4Pj6W1mYf6R+g+m43fFfNc8FnwtETxvCGveybcJw3+pK665nA7Rf1naIVsJ5/Ih/3T bBOw== X-Gm-Message-State: AOJu0Yxe2Nra8NxWwyz6fzZcT7Gc6faJ7EQBE/vN79bA4JW8F4fAuC43 bTYa0thNoTAHyQPmZA/mr9IixHe69rjC31KQVETQ7oCBVB5sinGUTD3mpyB0Onw0xdA97uZ5fs9 d X-Gm-Gg: ASbGncverfoWmecypaXLcibUa68PsI0j6dP4bPACBHBvkIY3+nA0jw0FdwAlQj3Bffl Dd1pYRPMoshlkPeXTxjeSj4FS5Luv9YuPVBlP9yLRSRHsEigFVN9mjjpBUXECqPCEOHelpAU4dA sDJJ3dX7FG8IB5ktONXgVp/HytH2JxcrMDKFtPtbL4zRhJa2iR6coEsNE3kGSvvFRG9e1zJzpii PPXtIqIU3URPD9JAM2Qq6eUIrBo5+FQRpurPBEzGvcCBg1Uvpeh+73qBq9LFBjbTT9lC3JUZnSW vWTI6PVL98c/4NjEg3WulOS4Q93X7R6dCoZW19BmB/LRe3U= X-Received: by 2002:a05:6a00:4215:b0:725:b201:2353 with SMTP id d2e1a72fcca58-7305d480700mr7451603b3a.13.1738962424864; Fri, 07 Feb 2025 13:07:04 -0800 (PST) Received: from stoup.. (71-212-39-66.tukw.qwest.net. [71.212.39.66]) by smtp.gmail.com with ESMTPSA id 41be03b00d2f7-ad51af64c1dsm3539043a12.52.2025.02.07.13.07.04 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 07 Feb 2025 13:07:04 -0800 (PST) From: Richard Henderson To: qemu-devel@nongnu.org Cc: pbonzini@redhat.com, mark.cave-ayland@ilande.co.uk, berrange@redhat.com, philmd@linaro.org, thuth@redhat.com Subject: [PATCH v4 8/9] meson: Disallow 64-bit on 32-bit emulation Date: Fri, 7 Feb 2025 13:06:54 -0800 Message-ID: <20250207210655.16717-9-richard.henderson@linaro.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20250207210655.16717-1-richard.henderson@linaro.org> References: <20250207210655.16717-1-richard.henderson@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::62a; envelope-from=richard.henderson@linaro.org; helo=mail-pl1-x62a.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org For system mode, we can rarely support the amount of RAM that the guest requires. TCG emulation is restricted to round-robin mode, which solves many of the atomicity issues, but not those associated with virtio. In any case, round-robin does nothing to help the speed of emulation. For user mode, most emulation does not succeed at all. Most of the time we cannot even load 64-bit non-PIE binaries due to lack of a 64-bit address space. Threads are run in parallel, not round-robin, which means that atomicity is not handled. Reviewed-by: Thomas Huth Signed-off-by: Richard Henderson Reviewed-by: Philippe Mathieu-Daudé --- meson.build | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/meson.build b/meson.build index 85317cd63f..ec51827f40 100644 --- a/meson.build +++ b/meson.build @@ -3185,6 +3185,9 @@ if host_os == 'windows' endif endif +# Detect host pointer size for the target configuration loop. +host_long_bits = cc.sizeof('void *') * 8 + ######################## # Target configuration # ######################## @@ -3277,8 +3280,14 @@ foreach target : target_dirs } endif + config_target += keyval.load('configs/targets' / target + '.mak') + target_kconfig = [] foreach sym: accelerators + # Disallow 64-bit on 32-bit emulation and virtualization + if host_long_bits < config_target['TARGET_LONG_BITS'].to_int() + continue + endif if sym == 'CONFIG_TCG' or target in accelerator_targets.get(sym, []) config_target += { sym: 'y' } config_all_accel += { sym: 'y' } @@ -3292,9 +3301,6 @@ foreach target : target_dirs error('No accelerator available for target @0@'.format(target)) endif - config_target += keyval.load('configs/targets' / target + '.mak') - config_target += { 'TARGET_' + config_target['TARGET_ARCH'].to_upper(): 'y' } - if 'TARGET_NEED_FDT' in config_target and not fdt.found() if default_targets warning('Disabling ' + target + ' due to missing libfdt') @@ -3307,6 +3313,7 @@ foreach target : target_dirs actual_target_dirs += target # Add default keys + config_target += { 'TARGET_' + config_target['TARGET_ARCH'].to_upper(): 'y' } if 'TARGET_BASE_ARCH' not in config_target config_target += {'TARGET_BASE_ARCH': config_target['TARGET_ARCH']} endif