From nobody Sat Nov 15 10:38:44 2025 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=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1754179237; cv=none; d=zohomail.com; s=zohoarc; b=K8fahH9qp1HUJM7F/q3+2Hrz8oNqH7xIup8q+W7UohJqP2a7W7jln6SGDxV31dChFMsXMyKIectnkWGidVk/BpkkCsON+hS/MtyMoSSKDOyra4RTMPXJVz/Lan5fMOqDGYXQSd/yp85PAlC9EW9syXL5bcKuIekkRZx9OMjTKQ4= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1754179237; h=Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=17nAzkO3yEHAvK6PxJmaLfoSw+fDYNwVzEXoZ0CbSlE=; b=mk68j0Th67oqVr7KmO/0tlctKpxSfDr13q1Yl66XferYtrL1ro87WL7in/THQAoeQ1ARFoGPCHs3WtoRs2CZFWTh/WTfH3k1Xs1oQ97kzX7pf/E0sA62ZKC7taq9c85El+yDtspy0h8lahCJhQZU3Iw7TBgNkk2U7RNpyDOF3jA= 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 175417923761941.51461003420184; Sat, 2 Aug 2025 17:00:37 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1uiLop-0006iD-1Q; Sat, 02 Aug 2025 19:39:15 -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 1uiLmf-0003DS-E7 for qemu-devel@nongnu.org; Sat, 02 Aug 2025 19:37:02 -0400 Received: from mail-ot1-x329.google.com ([2607:f8b0:4864:20::329]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1uiLmd-0005nQ-IT for qemu-devel@nongnu.org; Sat, 02 Aug 2025 19:37:01 -0400 Received: by mail-ot1-x329.google.com with SMTP id 46e09a7af769-741a905439eso355177a34.0 for ; Sat, 02 Aug 2025 16:36:59 -0700 (PDT) Received: from stoup.. ([172.58.111.133]) by smtp.gmail.com with ESMTPSA id 46e09a7af769-741a71dc78asm380409a34.30.2025.08.02.16.36.53 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 02 Aug 2025 16:36:57 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1754177818; x=1754782618; 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=17nAzkO3yEHAvK6PxJmaLfoSw+fDYNwVzEXoZ0CbSlE=; b=MP+EdUn3FiwqRuFPcIt9vfzqoI/1OLofvtnDwxuF+/d+g1MH+MLXqFC0lEIAUS/1DW O2d0X40iO73GduSV7wCARsRGQbSxi59u8f2+vcr4rwt5e9yd/nzBZiHaa6qcBX/pJ68D f9cF3kSr65cEp2xbUX7S6tn+J89B+r1sLFgb+smFd1DM8G7JQ2cyuYpy9MO/pTOwCKmy GjRBcgb+sslfSLxUGBxh6IFfCGXnPVoX6zokD7wliGrQ3I1vuKvyQy8d3xAa2A6LOAwr x0+AZ7rgU2Q9pxTmSae38jsIxXDZIkrzFZYBs+oRFAwmakGqpyeUEbGIKbM9bAyAT1dq RAyw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1754177818; x=1754782618; 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=17nAzkO3yEHAvK6PxJmaLfoSw+fDYNwVzEXoZ0CbSlE=; b=C5h5nK8RTSJWr2fNaTBGj82zwfvAf2PCDSY8KC286VWmucw2Fw3gHLh9WMQt/iLEZE nJTEvkxuaKwTS390I/QqB2DygaOMZGWss9FxUOKaDRjtVIzEQgo0WJlPwN/KvTnvV5H4 zR3zu86OCoRI2xTIb021vjAIdWdHwc6YiIw6H9UYZCRj503br7fawYnqxKyQ8Kv03n6q HGAowoRqV3v1T1UQPqvzaay5N4A8f5Xxz6LPEhmL60xwR3cxHMYQzNwyGeyBwLx7u6yt wFcN93RBRz4s59im2gqmyZB666/vqOvzf0/zJNnH37VbIuAxjP2bvXiKs72tAojwXLHP naJg== X-Gm-Message-State: AOJu0YzksI8b4HhRy665V/6qrYZTTHcJZ0QRtgEV1a9IXRYNswOFx31p ionIktj+eF4qTNIv5B3O/LbN1a3XNBh3x+/i7r6UGpoqCrX9rfc0cll1Za822flFJNl9/8BYGLP oiLE2lAs= X-Gm-Gg: ASbGncvHXIgFk0K7GIwhKln4maQXjeGfMVgSM0QN3z9q2o9ShM8pXKZP8YNal9qo684 KWqfjRYgC3X1Wl/IVtjXqlubA2/j8/Ni8FXnmk8Lv5t2Qbf/Rzt4NFwpT/9nh+Z2I9FwIVbbA/j WMLKPouII42BYJaie1sqEHhXc6B1sNJhsGZMb5zm0ZVJ9v5kj6jAhiF/9zHjCOepDqO82TLotyc B7Yxi2hdmavNazxhTYnyx9WMIPgJjJglXCKMkt1+ll4+4d1FsIey+TgJhJpmU6a6qGP5nA+TcqE jdi4EbUJikqWpuP+wqKNYbPbhi46YPbJdLitY3kP3iqY1S2mRJUvqxm6OCym5W4WSut6S5GPkvM h2XBHKbszjrimgpg89Qr4wo/crV9SyKpLONqCuQALqVimxgfQzZPb X-Google-Smtp-Source: AGHT+IGNEoZQRBSkKLRdE+bqDlOwx7EMMpp1hV1yn3I20OGToewTUSmXvTjn8nwD5qqaHCPTjubGZQ== X-Received: by 2002:a05:6830:4489:b0:741:b197:514b with SMTP id 46e09a7af769-741b197596fmr191017a34.6.1754177818256; Sat, 02 Aug 2025 16:36:58 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Cc: qemu-arm@nongnu.org, Gustavo Romero , Pierrick Bouvier Subject: [PATCH v2 49/85] target/arm: Implement FEAT_CHK Date: Sun, 3 Aug 2025 09:29:17 +1000 Message-ID: <20250802232953.413294-50-richard.henderson@linaro.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20250802232953.413294-1-richard.henderson@linaro.org> References: <20250802232953.413294-1-richard.henderson@linaro.org> 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=2607:f8b0:4864:20::329; envelope-from=richard.henderson@linaro.org; helo=mail-ot1-x329.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=unavailable 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 @linaro.org) X-ZM-MESSAGEID: 1754179240280124100 Content-Type: text/plain; charset="utf-8" This feature contains only the CHKFEAT instruction. It has no ID enable, being back-allocated into the hint nop space. Reviewed-by: Gustavo Romero Reviewed-by: Pierrick Bouvier Signed-off-by: Richard Henderson --- target/arm/tcg/translate-a64.c | 14 ++++++++++++++ docs/system/arm/emulation.rst | 1 + target/arm/tcg/a64.decode | 1 + 3 files changed, 16 insertions(+) diff --git a/target/arm/tcg/translate-a64.c b/target/arm/tcg/translate-a64.c index 7831b3dab3..34d22cac8a 100644 --- a/target/arm/tcg/translate-a64.c +++ b/target/arm/tcg/translate-a64.c @@ -2124,6 +2124,20 @@ static bool trans_AUTIBSP(DisasContext *s, arg_AUTIB= SP *a) return true; } =20 +static bool trans_CHKFEAT(DisasContext *s, arg_CHKFEAT *a) +{ + uint64_t feat_en =3D 0; + + if (s->gcs_en) { + feat_en |=3D 1 << 0; + } + if (feat_en) { + TCGv_i64 x16 =3D cpu_reg(s, 16); + tcg_gen_andi_i64(x16, x16, ~feat_en); + } + return true; +} + static bool trans_CLREX(DisasContext *s, arg_CLREX *a) { tcg_gen_movi_i64(cpu_exclusive_addr, -1); diff --git a/docs/system/arm/emulation.rst b/docs/system/arm/emulation.rst index 6ebf9c9ce9..b894aced89 100644 --- a/docs/system/arm/emulation.rst +++ b/docs/system/arm/emulation.rst @@ -28,6 +28,7 @@ the following architecture extensions: - FEAT_BF16 (AArch64 BFloat16 instructions) - FEAT_BTI (Branch Target Identification) - FEAT_CCIDX (Extended cache index) +- FEAT_CHK (Check Feature Status) - FEAT_CMOW (Control for cache maintenance permission) - FEAT_CRC32 (CRC32 instructions) - FEAT_Crypto (Cryptographic Extension) diff --git a/target/arm/tcg/a64.decode b/target/arm/tcg/a64.decode index 8c798cde2b..4315ed8dab 100644 --- a/target/arm/tcg/a64.decode +++ b/target/arm/tcg/a64.decode @@ -246,6 +246,7 @@ ERETA 1101011 0100 11111 00001 m:1 11111 1111= 1 &reta # ERETAA, ERETAB AUTIASP 1101 0101 0000 0011 0010 0011 101 11111 AUTIBZ 1101 0101 0000 0011 0010 0011 110 11111 AUTIBSP 1101 0101 0000 0011 0010 0011 111 11111 + CHKFEAT 1101 0101 0000 0011 0010 0101 000 11111 ] # The canonical NOP has CRm =3D=3D op2 =3D=3D 0, but all of the space # that isn't specifically allocated to an instruction must NOP --=20 2.43.0