From nobody Sun Nov 24 21:45:14 2024 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=gmail.com ARC-Seal: i=1; a=rsa-sha256; t=1720379567; cv=none; d=zohomail.com; s=zohoarc; b=cls66t0XYViA6y1UluaD8ySHkZ7rSycrHZy5PrmPbm7SovP/5XYXDgRf9+Vv6b7DA2UDDf2lW5eH6FXbMDJFBkrHyf9+JTR5aTUxeb90I8YIyVrMJ8BdQ3AkAIOGEMlhX7iAdycTeUfvenK3VudXEIQpK7CLp/kegD3XEzK1iwU= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1720379567; 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=tzZW7S7trkqr70JQTEMEt+xFl2Pbm9pRqeFrftAZXeU=; b=kko1Q4mCwdtNs74mIiRGWvD9PqSFXZ2zdoV4vrwssNVOZHEIV/5g62PhTN8TcetXXVbV/jGhAKwBDBNDDtDMsT93JQUNTcCRRdh7Y9tKTXC7E6fL97ocCfrM0RAvyd7i0dkyhNR/9ePhKeFR8amxogAFO3B29xcMpBDviWF615g= 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 1720379567230447.5085203719218; Sun, 7 Jul 2024 12:12:47 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sQXIf-0000nk-Om; Sun, 07 Jul 2024 15:11:53 -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 1sQXIe-0000n2-LE for qemu-devel@nongnu.org; Sun, 07 Jul 2024 15:11:52 -0400 Received: from mail-oi1-x22c.google.com ([2607:f8b0:4864:20::22c]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1sQXId-00059m-6Y for qemu-devel@nongnu.org; Sun, 07 Jul 2024 15:11:52 -0400 Received: by mail-oi1-x22c.google.com with SMTP id 5614622812f47-3d932f991f6so44207b6e.1 for ; Sun, 07 Jul 2024 12:11:50 -0700 (PDT) Received: from localhost.localdomain ([106.222.220.84]) by smtp.gmail.com with ESMTPSA id d9443c01a7336-1fac11d8a70sm172156725ad.118.2024.07.07.12.11.48 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 07 Jul 2024 12:11:49 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1720379510; x=1720984310; 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=tzZW7S7trkqr70JQTEMEt+xFl2Pbm9pRqeFrftAZXeU=; b=LMCjp1HnhgWul6k32vvD0eC6njqViOJK8A6opiyq+SuzoBaZbVeLmNPAUjxcER3vIV LMnGhUA7fxl3YJNRutewf9PUPTFq4jG/lCODGbJnVl/QzkqEKuS0J1J1rfl7Bxdd1TEr QS+8UVHxS8eqqaWivLB8QN/a7U66GLnCDmT5YcrA65E0KTJaHFwpMICjs3JBU/MrZFLb jfMf3LSpwcT0BYcIZWhxSgc5Hp3gg2sWy3G9/9yWcVZkBrYIz0nhP29J/6FSncVE9diZ QhK2j2NfbdxMf1Eqv9kxmu6rD0o1xj5koF64rqzBEQWE+zvH+ySNG/nLYDfATz0Fwssx TjZw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1720379510; x=1720984310; 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=tzZW7S7trkqr70JQTEMEt+xFl2Pbm9pRqeFrftAZXeU=; b=U3JONzRTaUVhfNuJz76jdjAK6/un/WnBQZMPh6GO9S/ijH8glglz9/0PN4APulNNyT lfPPFq5sRAXkp/leNf5nqaBqq44xDwBt6Xszygh148eYgsGWvDDTBAT3Grvw9vaLlBWd loQbndQH6qbP2B9KElbTymdLRoXWJHaaozGeZ+jr6ZoQWl/6xjba7Kq0MvexNCc/KIbe pdHBf4dT1TSOFwcaw1fCqJrTX5xPCI3BJycgXkhMCwOgo/lSymIHvs/lLP0PLn3vK2Gx 6RNc/DN5f79udrTRDv5UsE1MrWo9JugSviBcZyzATOhP8yFVrIp2PLSSCgqgqXTKphEY Z5SQ== X-Gm-Message-State: AOJu0YzDRoXiQcVWqcv+zpvN5IXP+rRcfO2gynWc4kX6qf86NBy23I3r GysnPcICnAJORZyszIgpg+RtLvMQt8AOOowr7Oj+CVRjuKTky9LK97VG8LOx X-Google-Smtp-Source: AGHT+IGIM+wISClL3BYSAWW5tNb+206wRD4X5lJpkhYL7VdQzuueswRjaLFFiTHwc5lFCYj+nCC7Yw== X-Received: by 2002:a05:6808:210e:b0:3d5:6504:6713 with SMTP id 5614622812f47-3d914e9df47mr13520889b6e.43.1720379509847; Sun, 07 Jul 2024 12:11:49 -0700 (PDT) From: Ajeet Singh X-Google-Original-From: Ajeet Singh To: qemu-devel@nongnu.org Cc: Warner Losh , Ajeet Singh , Richard Henderson Subject: [PATCH v2 6/8] bsd-user:Add setup_sigframe_arch function for ARM AArch64 Date: Mon, 8 Jul 2024 00:41:26 +0530 Message-Id: <20240707191128.10509-7-itachis@FreeBSD.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240707191128.10509-1-itachis@FreeBSD.org> References: <20240707191128.10509-1-itachis@FreeBSD.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::22c; envelope-from=itachis6234@gmail.com; helo=mail-oi1-x22c.google.com X-Spam_score_int: -17 X-Spam_score: -1.8 X-Spam_bar: - X-Spam_report: (-1.8 / 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, FREEMAIL_ENVFROM_END_DIGIT=0.25, FREEMAIL_FROM=0.001, 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+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @gmail.com) X-ZM-MESSAGEID: 1720379568008100004 Content-Type: text/plain; charset="utf-8" From: Warner Losh The function utilizes the `get_mcontext` function to retrieve the machine context for the current CPUARMState Signed-off-by: Warner Losh Signed-off-by: Ajeet Singh Reviewed-by: Richard Henderson --- bsd-user/aarch64/signal.c | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/bsd-user/aarch64/signal.c b/bsd-user/aarch64/signal.c index ab3bf8558a..43c886e603 100644 --- a/bsd-user/aarch64/signal.c +++ b/bsd-user/aarch64/signal.c @@ -81,3 +81,17 @@ abi_long get_mcontext(CPUARMState *regs, target_mcontext= _t *mcp, int flags) =20 return err; } + +/* + * Compare to arm64/arm64/exec_machdep.c sendsig() + * Assumes that the memory is locked if frame points to user memory. + */ +abi_long setup_sigframe_arch(CPUARMState *env, abi_ulong frame_addr, + struct target_sigframe *frame, int flags) +{ + target_mcontext_t *mcp =3D &frame->sf_uc.uc_mcontext; + + get_mcontext(env, mcp, flags); + return 0; +} + --=20 2.34.1