From nobody Tue Feb 10 13:16:40 2026 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1694091672; cv=none; d=zohomail.com; s=zohoarc; b=XITI/Xys+mliHRXKN0UwaIkz+wGTZ5EcM6irXudcz0+z/hJXfMRJVQz6ztLnGwQurFciEvVnwXCYmaGYES3I+oo7IdS2i10Vvfs1kkbWlbtshyAaqdv4NkgDFPpmJMegS98fKuvTEP86stlOnEZmQbn8xER2PJoVgfCsVITLV1o= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1694091672; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=suF/0D6+0X4K+OiIqd3LL7gSvssUT0iVpfKnhOUhM8s=; b=O/YKudMFEHoKzGnuuiVWvDE5RJaHuuabmNtMAmYA/1QdB2O5pYTTjfThUtxtFb6MshhfeKarFJ82uljWbvVE8XEuNYtOc87zl/2GSg93fZgEN3IRFnA8JzdImv5TS9DlElQdyX0OxDKunaflyoegSL545jrVe3ln3sFa56TpvK4= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 169409167206475.51082001198654; Thu, 7 Sep 2023 06:01:12 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qeEcZ-0002az-To; Thu, 07 Sep 2023 09:00:33 -0400 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 1qeEcT-0002aX-71 for qemu-devel@nongnu.org; Thu, 07 Sep 2023 09:00:26 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.133.124]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qeEcK-0006RA-LT for qemu-devel@nongnu.org; Thu, 07 Sep 2023 09:00:24 -0400 Received: from mail-wm1-f71.google.com (mail-wm1-f71.google.com [209.85.128.71]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-88-pstJX3M0NGquQYqGAChXFA-1; Thu, 07 Sep 2023 09:00:10 -0400 Received: by mail-wm1-f71.google.com with SMTP id 5b1f17b1804b1-401db25510fso6605085e9.1 for ; Thu, 07 Sep 2023 06:00:10 -0700 (PDT) Received: from [192.168.1.174] ([151.48.237.81]) by smtp.gmail.com with ESMTPSA id o5-20020a05600c378500b003fefca26c72sm2490140wmr.23.2023.09.07.06.00.07 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 07 Sep 2023 06:00:07 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1694091614; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=suF/0D6+0X4K+OiIqd3LL7gSvssUT0iVpfKnhOUhM8s=; b=Tsh6gUBlqSyREJvaVEZ28PrOYODeT+Svj7GqDkTbV44+2ZF+8OTTgGugA9daGciMoA4L+J HEE3Gbh7I+hp0YkpG3zPdkJCNeW4PSVq9xi42Og5d9vBI8g4Wo7E0iU2I/tJoCuTYGchbD PaN0XokiUC4p/h9Pft59IMvzPIIdR1c= X-MC-Unique: pstJX3M0NGquQYqGAChXFA-1 X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1694091609; x=1694696409; 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=suF/0D6+0X4K+OiIqd3LL7gSvssUT0iVpfKnhOUhM8s=; b=k/yN889LFrZzJtruuIIpPOnjN2Jfi9tRUmGHO1UarYQeCPCVVsDuK9uFfcrEo5KP3f 6jtdxJ+/n7aBlByUxuCTrhkB8SCV38Gl+/ezN3jF5/ECnYQ6tOZg9okmmw/5xFjvo1QA FMpvkvJyOfITtpwro6x0uvsRrf2du5TLLJd7kjyIUxMwU2ubfVAZReEKAJPJ1uHJcDPV /haFWYoiOPb2lJIkpVHgn6F/VgTP/sFfbH2hrITx5/mHq+3hC4RObknfyQhgem7hrm9v S8fqUoudFGKDWOPiStPTchH9OFQB3PeJTS8oKiGtKMOF9VgbXxXj/QK6lO/sC+cnJq+w TxvQ== X-Gm-Message-State: AOJu0YxCLY/5kNvjO/In0IhqDHPUS0crlPgmMpKGZRM3Drc41v9MkcKH fs0DZha86eU8Ml7tBDnRhfOFd8jnH/owEt72ggILPqarH0hiUpSTwvEZNPS7RPxLDf9+pAhyAJl wn7PciEqUgJoJYfIhqUvsZqCuF1Ui6VDhfhuKL+1yKAEd6yR1oPz3EQcbie2jqlrwoIPowin8ik I= X-Received: by 2002:a05:600c:285:b0:3fb:b890:128e with SMTP id 5-20020a05600c028500b003fbb890128emr4527073wmk.33.1694091609082; Thu, 07 Sep 2023 06:00:09 -0700 (PDT) X-Google-Smtp-Source: AGHT+IGLmhqrt03UYfPqDFLcT7Q0uzw0VzTi1rxNjx6XzvyhYChHD3O5Y6BJZFv80QsLarVu6Hu9Lw== X-Received: by 2002:a05:600c:285:b0:3fb:b890:128e with SMTP id 5-20020a05600c028500b003fbb890128emr4527052wmk.33.1694091608696; Thu, 07 Sep 2023 06:00:08 -0700 (PDT) From: Paolo Bonzini To: qemu-devel@nongnu.org Cc: Richard Henderson Subject: [PULL 01/51] linux-user, bsd-user: disable on unsupported host architectures Date: Thu, 7 Sep 2023 14:59:10 +0200 Message-ID: <20230907130004.500601-2-pbonzini@redhat.com> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20230907130004.500601-1-pbonzini@redhat.com> References: <20230907130004.500601-1-pbonzini@redhat.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=170.10.133.124; envelope-from=pbonzini@redhat.com; helo=us-smtp-delivery-124.mimecast.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, DKIMWL_WL_HIGH=-0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H3=0.001, RCVD_IN_MSPIKE_WL=0.001, 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+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1694091674252100013 Content-Type: text/plain; charset="utf-8" Safe signal handling around system calls is mandatory for user-mode emulation, and requires a small piece of handwritten assembly code. So refuse to compile unless the common-user/host subdirectory exists for the host architecture that was detected or selected with --cpu. Reviewed-by: Richard Henderson Signed-off-by: Paolo Bonzini --- configure | 40 +++++++++++++++++++++++----------------- 1 file changed, 23 insertions(+), 17 deletions(-) diff --git a/configure b/configure index b9bd008592a..b9af8282293 100755 --- a/configure +++ b/configure @@ -871,30 +871,36 @@ fi default_target_list=3D"" mak_wilds=3D"" =20 -if [ "$linux_user" !=3D no ]; then - if [ "$targetos" =3D linux ] && [ -n "$host_arch" ]; then - linux_user=3Dyes - elif [ "$linux_user" =3D yes ]; then - error_exit "linux-user not supported on this architecture" +if [ -n "$host_arch" ] && [ -d "$source_path/common-user/host/$host_arch" = ]; then + if [ "$linux_user" !=3D no ]; then + if [ "$targetos" =3D linux ]; then + linux_user=3Dyes + elif [ "$linux_user" =3D yes ]; then + error_exit "linux-user not supported on this architecture" + fi + if [ "$linux_user" =3D "yes" ]; then + mak_wilds=3D"${mak_wilds} $source_path/configs/targets/*-linux= -user.mak" + fi fi -fi -if [ "$bsd_user" !=3D no ]; then - if [ "$bsd_user" =3D "" ]; then - test $targetos =3D freebsd && bsd_user=3Dyes + if [ "$bsd_user" !=3D no ]; then + if [ "$bsd_user" =3D "" ]; then + test $targetos =3D freebsd && bsd_user=3Dyes + fi + if [ "$bsd_user" =3D yes ] && ! [ -d "$source_path/bsd-user/$targe= tos" ]; then + error_exit "bsd-user not supported on this host OS" + fi + if [ "$bsd_user" =3D "yes" ]; then + mak_wilds=3D"${mak_wilds} $source_path/configs/targets/*-bsd-u= ser.mak" + fi fi - if [ "$bsd_user" =3D yes ] && ! [ -d "$source_path/bsd-user/$targetos"= ]; then - error_exit "bsd-user not supported on this host OS" +else + if [ "$linux_user" =3D yes ] || [ "$bsd_user" =3D yes ]; then + error_exit "user mode emulation not supported on this architecture" fi fi if [ "$softmmu" =3D "yes" ]; then mak_wilds=3D"${mak_wilds} $source_path/configs/targets/*-softmmu.mak" fi -if [ "$linux_user" =3D "yes" ]; then - mak_wilds=3D"${mak_wilds} $source_path/configs/targets/*-linux-user.ma= k" -fi -if [ "$bsd_user" =3D "yes" ]; then - mak_wilds=3D"${mak_wilds} $source_path/configs/targets/*-bsd-user.mak" -fi =20 for config in $mak_wilds; do target=3D"$(basename "$config" .mak)" --=20 2.41.0