From nobody Sun Jul 26 14:10:33 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=reject dis=none) header.from=oss.qualcomm.com ARC-Seal: i=1; a=rsa-sha256; t=1781155890; cv=none; d=zohomail.com; s=zohoarc; b=Uzdc2ueLFekTdc5D9/J+0Hd2Lu1MzT+0gswBfFa2Mfu1zqnhGFbrIDxO21UD+8wFB/SvrKaP4zW0oOSxO2/rLSE2L+EsnlL5SOiDubb/c+Fa7kHEP3dD4bWbCMNDu5cygj1FFRVBFK5lYjKjFi5MYNUNyCsQdTmLop3AhLWGI0Y= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1781155890; h=Content-Type: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=X1535rWHbX3maN5NHx9P8KfIpPdOoals3VppoQq+RNI=; b=TLsCajybqNTGW2FT5e6aJ79WdwAoqSMHXu9jSZyWLUrMOWwj7IeDy3Wcvei4QDF3n2QoK9Sizm53YSmMfO64AzuSzYw3SSdbLdkWxhWGXnQh8QfzMvqxmfxUEVgDtxZ1wMm2TAStsEpYN/BkW2cfE5XyLulgqAPXad0Y2s0rDdQ= 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=reject dis=none) Return-Path: Received: from lists1p.gnu.org (lists1p.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1781155890345695.4630812545269; Wed, 10 Jun 2026 22:31:30 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists1p.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1wXXyy-0007ip-7P; Thu, 11 Jun 2026 01:29:36 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists1p.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1wXXyq-0007g9-2k for qemu-devel@nongnu.org; Thu, 11 Jun 2026 01:29:28 -0400 Received: from mx0a-0031df01.pphosted.com ([205.220.168.131]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1wXXyn-0000pd-VF for qemu-devel@nongnu.org; Thu, 11 Jun 2026 01:29:27 -0400 Received: from pps.filterd (m0279863.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.18.1.11/8.18.1.11) with ESMTP id 65B5GPtH3817101 for ; Thu, 11 Jun 2026 05:29:24 GMT Received: from mail-dy1-f198.google.com (mail-dy1-f198.google.com [74.125.82.198]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 4eqe6usrq8-1 (version=TLSv1.3 cipher=TLS_AES_128_GCM_SHA256 bits=128 verify=NOT) for ; Thu, 11 Jun 2026 05:29:23 +0000 (GMT) Received: by mail-dy1-f198.google.com with SMTP id 5a478bee46e88-304f1820babso9679172eec.1 for ; Wed, 10 Jun 2026 22:29:23 -0700 (PDT) Received: from hu-bcain-lv.qualcomm.com (Global_NAT1.qualcomm.com. [129.46.96.20]) by smtp.gmail.com with ESMTPSA id 5a478bee46e88-30806e8a402sm880475eec.17.2026.06.10.22.29.21 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 10 Jun 2026 22:29:22 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=qualcomm.com; h= cc:content-transfer-encoding:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to; s=qcppdkim1; bh= X1535rWHbX3maN5NHx9P8KfIpPdOoals3VppoQq+RNI=; b=ehWFdv6nA/jYpLbx 7LIyvlK5zB9uCmC+A6uONztO2e/TTf3zHFhCvHRJOff7uim25k0J+kKpjDlp5xYd cUBImvWBK1cYUUU0AOW1wrds6H/qjJqqNhAbzPI4Tmp/vXNAaWqNoqzJxKfBKtnb 5p05Q/Zr2oro0tbiLjEP0L2YGwwIQ76TcQrjB37lYSBsKK5Z9ZSrnzufuRrzP9Pz U6lMD5DjbSepld0+l+X+q2T9ypTy3/nmDoCIqpeGzXuGnvDtMUpUit43Y5tED6/h CfjybkseoadggRWjHN7KIKhO+J1QYIMBJRl7pv4vGlVX+/3FIdqQbXL/F+fAiztu uc14Rg== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oss.qualcomm.com; s=google; t=1781155763; x=1781760563; 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=X1535rWHbX3maN5NHx9P8KfIpPdOoals3VppoQq+RNI=; b=ajk5L6sZmrV5ZQUONxEuNOwLv24VnM0JSzKBuFE67PBBO2aSmkQ2CFQRsMyA1kUNfH 9V3XhXu5SzEJ3wmozF3QKdXyAyNQv5YpUHlhQ6QR67h1mkN0kuhAsJfR388+XqDmsNt6 Q1gfr062GlsMaezBThcJdYil3Vg/t9YZwE97AXjP2P2B139LSiHMfgEzkEPef4TGvJV8 gRbirFqf/IlsAU0d9xIkUzADmjvpyICwnuIckwzytevCTvN5XeUwSBGqxOzBw938co6u VgWACr8/YmIdaFGL/GZyhizbrv4M4ReXXATsCw+Ch1uYqdAdH6BGcZziNyY7e1HrjCN5 +6ug== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1781155763; x=1781760563; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-gg:x-gm-message-state:from :to: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sKys X-Received: by 2002:a05:7301:5789:b0:304:b93a:5107 with SMTP id 5a478bee46e88-30804bbd409mr933486eec.21.1781155763323; Wed, 10 Jun 2026 22:29:23 -0700 (PDT) X-Received: by 2002:a05:7301:5789:b0:304:b93a:5107 with SMTP id 5a478bee46e88-30804bbd409mr933463eec.21.1781155762811; Wed, 10 Jun 2026 22:29:22 -0700 (PDT) From: Brian Cain To: qemu-devel@nongnu.org Cc: brian.cain@oss.qualcomm.com, matheus.bernardino@oss.qualcomm.com, pierrick.bouvier@oss.qualcomm.com, ltaylorsimpson@gmail.com, philmd@mailo.org, philmd@oss.qualcomm.com, Brian Cain Subject: [PATCH v8] target/hexagon: Add guest, system reg number state Date: Wed, 10 Jun 2026 22:28:32 -0700 Message-Id: <20260611052857.3911981-12-brian.cain@oss.qualcomm.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20260611052857.3911981-1-brian.cain@oss.qualcomm.com> References: <20260611052857.3911981-1-brian.cain@oss.qualcomm.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-Authority-Analysis: v=2.4 cv=FJ8rAeos c=1 sm=1 tr=0 ts=6a2a47b3 cx=c_pps a=wEP8DlPgTf/vqF+yE6f9lg==:117 a=ouPCqIW2jiPt+lZRy3xVPw==:17 a=IkcTkHD0fZMA:10 a=FelO9ux0wxsA:10 a=s4-Qcg_JpJYA:10 a=VkNPw1HP01LnGYTKEx00:22 a=u7WPNUs3qKkmUXheDGA7:22 a=yOCtJkima9RkubShWh1s:22 a=COk6AnOGAAAA:8 a=pGLkceISAAAA:8 a=EUspDBNiAAAA:8 a=ikZfMmNF8Hme0_TNbpMA:9 a=QEXdDO2ut3YA:10 a=bBxd6f-gb0O0v-kibOvt:22 a=TjNXssC_j7lpFel5tvFf:22 X-Proofpoint-Spam-Info: AW1haW4tMjYwNjExMDA1MSBTYWx0ZWRfX+66nbcaGSKU/ CrLzPgqZADYYrzPr43spj4GB4l018bHHcnQ/qifCONdqDybZtHxDfyTvTpf9X4/VvyO7JV/2iG/ SsjchOgD30SVztIGrFlnEkJKeBeaWyU= X-Proofpoint-Spam-Details-Enc: AW1haW4tMjYwNjExMDA1MSBTYWx0ZWRfXyMCttiLOOkbJ OShP3zfNR7SsIqGLRrOoUgC5XD9SJfIZqzMz2tP8M3ff0s5gSjilZt43U2XJd830jztfsid/dVs dVCEE7khXjK6zy03gm2RWVEfv8g0iOc2ZWdSOU8BlZms8GIZ7dIPu8ghUnreOfZBGPjn8Wl6BlZ ioaTePpwZrfvXFLZftntY9rMsWBAHyajrJ9WDkjveso4TY71S4g8LCfRBeYlEb7bW1tZZz7yahO Mgy3Z0CxbDCYKvwhp4nZHrBnB1ELDgnXKeAHrs9irq0sRJJ2yT5/0uR+657t3xGZG8pNeJzmdDa n+dlBQh4qb4D/3kHgOirO9vjGDSc2oJr+mOBnbOcmDn2AkCD3NDdafyWmYNc7KiwUFM3zVsC/Gh fplFQ7f2yGozNr34W9JQY2vWuMPyoJ26IDvsnOU1KkDttrBqOwYHeJbE9mydXv9lDcvDjnzBa45 NCian1GGxkwTuegP0/w== X-Proofpoint-GUID: Lu9qzpW7vA7i5B57i4tzktn63ZxzaK_T X-Proofpoint-ORIG-GUID: Lu9qzpW7vA7i5B57i4tzktn63ZxzaK_T X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1143,Hydra:6.1.125,FMLib:17.12.100.49 definitions=2026-06-11_01,2026-06-09_02,2025-10-01_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 malwarescore=0 clxscore=1015 adultscore=0 lowpriorityscore=0 bulkscore=0 impostorscore=0 priorityscore=1501 spamscore=0 phishscore=0 suspectscore=0 classifier=typeunknown authscore=0 authtc= authcc= route=outbound adjust=0 reason=mlx scancount=1 engine=8.22.0-2606040000 definitions=main-2606110051 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=lists1p.gnu.org; Received-SPF: pass client-ip=205.220.168.131; envelope-from=brian.cain@oss.qualcomm.com; helo=mx0a-0031df01.pphosted.com X-Spam_score_int: -27 X-Spam_score: -2.8 X-Spam_bar: -- X-Spam_report: (-2.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, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H2=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: qemu development 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 @qualcomm.com) X-ZM-MESSAGEID: 1781155890889158500 From: Brian Cain Reviewed-by: Taylor Simpson Signed-off-by: Brian Cain --- target/hexagon/cpu.h | 11 +++++++++++ target/hexagon/cpu.c | 5 +++++ 2 files changed, 16 insertions(+) diff --git a/target/hexagon/cpu.h b/target/hexagon/cpu.h index e0cf87e5a4c..4bea953ac73 100644 --- a/target/hexagon/cpu.h +++ b/target/hexagon/cpu.h @@ -100,6 +100,17 @@ typedef struct CPUArchState { target_ulong stack_start; =20 uint8_t slot_cancelled; + +#ifndef CONFIG_USER_ONLY + /* Some system registers are per thread and some are global. */ + uint32_t t_sreg[NUM_SREGS]; + + uint32_t greg[NUM_GREGS]; + uint32_t wait_next_pc; + + /* This alias of CPUState.cpu_index is used by imported sources: */ + uint32_t threadId; +#endif target_ulong new_value_usr; =20 MemLog mem_log_stores[STORES_MAX]; diff --git a/target/hexagon/cpu.c b/target/hexagon/cpu.c index 5bf6e85b939..d30e5b64eac 100644 --- a/target/hexagon/cpu.c +++ b/target/hexagon/cpu.c @@ -299,6 +299,11 @@ static void hexagon_cpu_reset_hold(Object *obj, ResetT= ype type) set_float_detect_tininess(float_tininess_before_rounding, &env->fp_sta= tus); /* Default NaN value: sign bit set, all frac bits set */ set_float_default_nan_pattern(0b11111111, &env->fp_status); +#ifndef CONFIG_USER_ONLY + memset(env->t_sreg, 0, sizeof(uint32_t) * NUM_SREGS); + memset(env->greg, 0, sizeof(uint32_t) * NUM_GREGS); + env->wait_next_pc =3D 0; +#endif env->cause_code =3D HEX_EVENT_NONE; } =20 --=20 2.34.1