From nobody Sun Nov 24 12:08:36 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=1722925645; cv=none; d=zohomail.com; s=zohoarc; b=Wc3/RTcr0xo6m3bnyN3C7u44pLg+0l1NJbgBHdfx1gydEGu0TJvBjLEVT7NUe7od4k4Qrwg212ZOAilBYQyTYz1fhH/lciJ0spKOtBtEzf7tVqd3qyiQx4ATF67wmvUkCjboxPFy27NtjToLr0pTlJ+aPXBZyFKqU+zMFMSkZTw= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1722925645; 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=kqP4ivw7uQVKQSYmqJWEmyZWTEcacM5pMYJS2o///Ys=; b=EQkdMOzaUgM+0ejd6BG3tZwD9tqfWn4RnTUx3SHaFgq6vGwUeCOFCWThatvGVSLS42wESGImdvy7PXJcJA2ZxzhEsNn91AydTIAYsa3NbXyEq72N3qcumjYAVz96yHPcGKReptRqyEKGEo796x6HqM7VOzCw/M/0DncUYxywtq4= 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 1722925645046358.72008281526837; Mon, 5 Aug 2024 23:27:25 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sbDe0-0002za-PT; Tue, 06 Aug 2024 02:26:04 -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 1sbDdz-0002uq-Fs for qemu-devel@nongnu.org; Tue, 06 Aug 2024 02:26:03 -0400 Received: from mail-pl1-x62f.google.com ([2607:f8b0:4864:20::62f]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1sbDdx-0003wd-Lo for qemu-devel@nongnu.org; Tue, 06 Aug 2024 02:26:03 -0400 Received: by mail-pl1-x62f.google.com with SMTP id d9443c01a7336-1fc52394c92so4168905ad.1 for ; Mon, 05 Aug 2024 23:26:00 -0700 (PDT) Received: from toolbox.alistair23.me (2403-580b-97e8-0-82ce-f179-8a79-69f4.ip6.aussiebb.net. [2403:580b:97e8:0:82ce:f179:8a79:69f4]) by smtp.gmail.com with ESMTPSA id d9443c01a7336-1ff5927f161sm79464975ad.232.2024.08.05.23.25.55 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 05 Aug 2024 23:25:58 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1722925559; x=1723530359; 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=kqP4ivw7uQVKQSYmqJWEmyZWTEcacM5pMYJS2o///Ys=; b=WNcxVnR9M1VFqjtL+po2VPZw4PQPvZhxn3J61uuFnUyb1iDg6lPfNhDpnhsj6HZ8jt Hk7AMad5xEsgNNt3tDdrEwSfn1VIQYwuHdlIOfAHVspABCqr9xN759bKDFtfrp84gChu CHB77UlWxt7YPCZ4FMix/VC/SMGsDMEKPx+ShCEFG8coQD8Gzx3T6f1JwSseuQj/quxJ HKFsA2etHIwdmRrFH4i8emYAb+CYISU8r2BgLEiCxCkj3lFhKe9IrLzUlRrMkgQVwIHf EIMXZJyNqkctx4D98XUAjUcaF+NL0D77gBcxbGAbR9Y9VPIGJY9Mkw3LMeM0lHsJhTqS KYrg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1722925559; x=1723530359; 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=kqP4ivw7uQVKQSYmqJWEmyZWTEcacM5pMYJS2o///Ys=; b=iBYpWnhSoCKsfuR6/YNeti9eQR8Lo0F0xcg8Zw5NvfMTIxAQk04g9Q1Fhw964dwIPR SfbPbbZ6unEbTdA54enBcL+70yRYYu7npCzSyOsFD0vUxLGit0qTP4f3euQ8pd25iu5O hxYe/Y+JPw91F3XcDllC8pRFo1opZv5JpCGp/s+xOyH49wV/JI6ei2vxb5oWOXxNLylI 2VPl4fKaM7ginO0PvM3EKNiu7SLzNr98hM/BCW4BT4ze96rVB870aDkeGXShK5nVXCH1 /F+00jty6JYJRoSJYLMG5MItNKhD/iTIaneQiMV9RFI3EidbgtZ+5gD/Xu7sq6i+G2qw a8IA== X-Gm-Message-State: AOJu0YwS5wuuiRVnUcwmyOmw++QpaP+hH1T/+cXkHhRtZ/Mp3yRjDa4D 0ZQ1jz2G2vi9c2a6fh7+avDrujIWq0bHAUYfp3/DuDJAmWZGLkQeMbOIm6gP X-Google-Smtp-Source: AGHT+IE0HC2Vrz6UuBTBb25TQ3gWeAZLMY0BZXqlSDs6NgOPNuxNpwSnS0x4GprcH8LLvljO0Gq/3w== X-Received: by 2002:a17:902:f68e:b0:1f9:f1e1:da72 with SMTP id d9443c01a7336-1ff574a6fecmr171649735ad.63.1722925558906; Mon, 05 Aug 2024 23:25:58 -0700 (PDT) From: Alistair Francis X-Google-Original-From: Alistair Francis To: qemu-devel@nongnu.org Cc: alistair23@gmail.com, LIU Zhiwei , Alistair Francis , Richard Henderson Subject: [PULL 1/5] target/riscv: Remove redundant insn length check for zama16b Date: Tue, 6 Aug 2024 16:25:41 +1000 Message-ID: <20240806062545.1250910-2-alistair.francis@wdc.com> X-Mailer: git-send-email 2.45.2 In-Reply-To: <20240806062545.1250910-1-alistair.francis@wdc.com> References: <20240806062545.1250910-1-alistair.francis@wdc.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=2607:f8b0:4864:20::62f; envelope-from=alistair23@gmail.com; helo=mail-pl1-x62f.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: 1722925646023116600 Content-Type: text/plain; charset="utf-8" From: LIU Zhiwei Compressed encodings also applies to zama16b. https://github.com/riscv/riscv-isa-manual/pull/1557 Suggested-by: Alistair Francis Signed-off-by: LIU Zhiwei Reviewed-by: Alistair Francis Reviewed-by: Richard Henderson Message-ID: <20240802072417.659-2-zhiwei_liu@linux.alibaba.com> Signed-off-by: Alistair Francis --- target/riscv/insn_trans/trans_rvd.c.inc | 4 ++-- target/riscv/insn_trans/trans_rvf.c.inc | 4 ++-- target/riscv/insn_trans/trans_rvi.c.inc | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/target/riscv/insn_trans/trans_rvd.c.inc b/target/riscv/insn_tr= ans/trans_rvd.c.inc index 1f5fac65a2..0ac42c3223 100644 --- a/target/riscv/insn_trans/trans_rvd.c.inc +++ b/target/riscv/insn_trans/trans_rvd.c.inc @@ -47,7 +47,7 @@ static bool trans_fld(DisasContext *ctx, arg_fld *a) REQUIRE_FPU; REQUIRE_EXT(ctx, RVD); =20 - if (ctx->cfg_ptr->ext_zama16b && (ctx->cur_insn_len !=3D 2)) { + if (ctx->cfg_ptr->ext_zama16b) { memop |=3D MO_ATOM_WITHIN16; } =20 @@ -67,7 +67,7 @@ static bool trans_fsd(DisasContext *ctx, arg_fsd *a) REQUIRE_FPU; REQUIRE_EXT(ctx, RVD); =20 - if (ctx->cfg_ptr->ext_zama16b && (ctx->cur_insn_len !=3D 2)) { + if (ctx->cfg_ptr->ext_zama16b) { memop |=3D MO_ATOM_WITHIN16; } =20 diff --git a/target/riscv/insn_trans/trans_rvf.c.inc b/target/riscv/insn_tr= ans/trans_rvf.c.inc index f771aa1939..0222a728df 100644 --- a/target/riscv/insn_trans/trans_rvf.c.inc +++ b/target/riscv/insn_trans/trans_rvf.c.inc @@ -48,7 +48,7 @@ static bool trans_flw(DisasContext *ctx, arg_flw *a) REQUIRE_FPU; REQUIRE_EXT(ctx, RVF); =20 - if (ctx->cfg_ptr->ext_zama16b && (ctx->cur_insn_len !=3D 2)) { + if (ctx->cfg_ptr->ext_zama16b) { memop |=3D MO_ATOM_WITHIN16; } =20 @@ -70,7 +70,7 @@ static bool trans_fsw(DisasContext *ctx, arg_fsw *a) REQUIRE_FPU; REQUIRE_EXT(ctx, RVF); =20 - if (ctx->cfg_ptr->ext_zama16b && (ctx->cur_insn_len !=3D 2)) { + if (ctx->cfg_ptr->ext_zama16b) { memop |=3D MO_ATOM_WITHIN16; } =20 diff --git a/target/riscv/insn_trans/trans_rvi.c.inc b/target/riscv/insn_tr= ans/trans_rvi.c.inc index 98e3806d5e..fab5c06719 100644 --- a/target/riscv/insn_trans/trans_rvi.c.inc +++ b/target/riscv/insn_trans/trans_rvi.c.inc @@ -268,7 +268,7 @@ static bool gen_load(DisasContext *ctx, arg_lb *a, MemO= p memop) { bool out; =20 - if (ctx->cfg_ptr->ext_zama16b && (ctx->cur_insn_len !=3D 2)) { + if (ctx->cfg_ptr->ext_zama16b) { memop |=3D MO_ATOM_WITHIN16; } decode_save_opc(ctx); @@ -369,7 +369,7 @@ static bool gen_store_i128(DisasContext *ctx, arg_sb *a= , MemOp memop) =20 static bool gen_store(DisasContext *ctx, arg_sb *a, MemOp memop) { - if (ctx->cfg_ptr->ext_zama16b && (ctx->cur_insn_len !=3D 2)) { + if (ctx->cfg_ptr->ext_zama16b) { memop |=3D MO_ATOM_WITHIN16; } decode_save_opc(ctx); --=20 2.45.2 From nobody Sun Nov 24 12:08:36 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=1722925645; cv=none; d=zohomail.com; s=zohoarc; b=ees9g6IA5dZI0Hma22K9P+PuERJ/j4xOafGUvUaF1uonoySGgh37JQYuvbkYKXzPkupGtCVmwfyctFRX8JHhbaP/AtG37Cw9zKpypZgaKRXEs3h35C1ziHP6zdjauVONvf2kMS17iBJV6f5BhVYPmxc69GZ4ysZccGHS1REzB2Q= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1722925645; 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=zUA5stD664rN/7Zk/IxG6em8g6FU8KrpOoscG0RunZg=; b=W+pDIcvIR9ZzrMm9oTSXTRwQnyleM56+O05tWQvVckwFYWGUNNUkfyB/feW/DdIqSYh+b33IaG05S56HKW2+3juLZjRWXtxITQavPdZewBq0Vua+OZxBWxflLydQ/F+MHAAGR9j9gcHA5CPQIkkzLjIhvILTGTtM1R1pk9K5mg8= 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 1722925645600685.4401568392577; Mon, 5 Aug 2024 23:27:25 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sbDe2-00036g-K9; Tue, 06 Aug 2024 02:26:06 -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 1sbDe1-000325-CS for qemu-devel@nongnu.org; Tue, 06 Aug 2024 02:26:05 -0400 Received: from mail-pl1-x62e.google.com ([2607:f8b0:4864:20::62e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1sbDdz-0003wo-Ox for qemu-devel@nongnu.org; Tue, 06 Aug 2024 02:26:05 -0400 Received: by mail-pl1-x62e.google.com with SMTP id d9443c01a7336-1fd9e6189d5so1999905ad.3 for ; Mon, 05 Aug 2024 23:26:03 -0700 (PDT) Received: from toolbox.alistair23.me (2403-580b-97e8-0-82ce-f179-8a79-69f4.ip6.aussiebb.net. [2403:580b:97e8:0:82ce:f179:8a79:69f4]) by smtp.gmail.com with ESMTPSA id d9443c01a7336-1ff5927f161sm79464975ad.232.2024.08.05.23.25.59 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 05 Aug 2024 23:26:01 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1722925562; x=1723530362; 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=zUA5stD664rN/7Zk/IxG6em8g6FU8KrpOoscG0RunZg=; b=f5yf83KSP5OP411ic2cZi4Ae9D+U8B3Tr2ennccu3npzlGlCYR7Ob9QmkmyvraiL8Z CNdi9xjcsezPSIKHsQXPuy/MwMPtnk0k3v6Ns0GFU+n9H1iOMFl1n+ijhjWB5t6gSQY6 s4wZW9iY/R2Uuykv4PtFopzI5fU1I6OWJrrZn+RjewEkpR8x8ttqD9sjENFTOsOWMGCE QqycXjrrxPOlKc0cj32p9E9DR+VT5T0asCf33ANyxr99m7KUeqgcayRbhyljnlVa8fpZ zq+2SXKhIKpZ+VJTtYl8hBmA3OxhG8ZKOJ9wXOLgrqc1Zg0mZlEWa7BPIU1yDYagCeKp URng== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1722925562; x=1723530362; 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=zUA5stD664rN/7Zk/IxG6em8g6FU8KrpOoscG0RunZg=; b=c0SxQxNzM2n3DR92ITW7MorCcWrvnl7sHtPr1QiTNzHCIiGqX9brMm4bkZ+WUGh7vV M8SXfEYbhHgtVTumV0O+pmRgByH2C8P0DlfbR0+kB6zEnxTmKmyooI272AglzD/SGjkM kD54whEJkZMTbVjH0La70aOe9wmcGDM0czAEhJm5C5HqQ90E7B0vBCsBjGE3Bq6uM1hv 7KFlHuEJTERR6pb3TDBmtTDVsaNrNnciSMiSef3+TKNGmwI8Wu/wdITI2ihaGlZeTRov VLBRco3IZYplsxbbzyNJLI7FoKBxewSVX3UIdN2y7IS3FqYKossoic3H8OiUv9arikm6 a7pQ== X-Gm-Message-State: AOJu0YycyRaI2HRcUU1/yLog4dNsobWKAXd8B8aLoHVNnLfS8PyE+ucy lwn9j9YR7oTZIF8j2Buo6mky3LX0xfM1azxp2io0ht+P8DDCXtjsOk7cxeQr X-Google-Smtp-Source: AGHT+IHy9tL4GmTAckhYQFoklVJycu1UlYdZIS0ZHsnJc8vPTPc+FeO55DIE76FRkMsDjKrY8eN9dw== X-Received: by 2002:a17:902:e808:b0:1fc:4f9b:6055 with SMTP id d9443c01a7336-1ff5725863emr137507355ad.1.1722925561909; Mon, 05 Aug 2024 23:26:01 -0700 (PDT) From: Alistair Francis X-Google-Original-From: Alistair Francis To: qemu-devel@nongnu.org Cc: alistair23@gmail.com, LIU Zhiwei , Alistair Francis , Richard Henderson Subject: [PULL 2/5] target/riscv: Add MXLEN check for F/D/Q applies to zama16b Date: Tue, 6 Aug 2024 16:25:42 +1000 Message-ID: <20240806062545.1250910-3-alistair.francis@wdc.com> X-Mailer: git-send-email 2.45.2 In-Reply-To: <20240806062545.1250910-1-alistair.francis@wdc.com> References: <20240806062545.1250910-1-alistair.francis@wdc.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=2607:f8b0:4864:20::62e; envelope-from=alistair23@gmail.com; helo=mail-pl1-x62e.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: 1722925645998116600 Content-Type: text/plain; charset="utf-8" From: LIU Zhiwei Zama16b loads and stores of no more than MXLEN bits defined in the F, D, an= d Q extensions. Signed-off-by: LIU Zhiwei Reviewed-by: Alistair Francis Reviewed-by: Richard Henderson Message-ID: <20240802072417.659-3-zhiwei_liu@linux.alibaba.com> Signed-off-by: Alistair Francis --- target/riscv/insn_trans/trans_rvd.c.inc | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/target/riscv/insn_trans/trans_rvd.c.inc b/target/riscv/insn_tr= ans/trans_rvd.c.inc index 0ac42c3223..49682292b8 100644 --- a/target/riscv/insn_trans/trans_rvd.c.inc +++ b/target/riscv/insn_trans/trans_rvd.c.inc @@ -47,7 +47,11 @@ static bool trans_fld(DisasContext *ctx, arg_fld *a) REQUIRE_FPU; REQUIRE_EXT(ctx, RVD); =20 - if (ctx->cfg_ptr->ext_zama16b) { + /* + * Zama16b applies to loads and stores of no more than MXLEN bits defi= ned + * in the F, D, and Q extensions. + */ + if ((get_xl_max(ctx) >=3D MXL_RV64) && ctx->cfg_ptr->ext_zama16b) { memop |=3D MO_ATOM_WITHIN16; } =20 @@ -67,7 +71,7 @@ static bool trans_fsd(DisasContext *ctx, arg_fsd *a) REQUIRE_FPU; REQUIRE_EXT(ctx, RVD); =20 - if (ctx->cfg_ptr->ext_zama16b) { + if ((get_xl_max(ctx) >=3D MXL_RV64) && ctx->cfg_ptr->ext_zama16b) { memop |=3D MO_ATOM_WITHIN16; } =20 --=20 2.45.2 From nobody Sun Nov 24 12:08:36 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=1722925645; cv=none; d=zohomail.com; s=zohoarc; b=BA428XuVmaM5TEKr/SI+qWbpXrBuSaT7BXwxcKrA0ttPlfNodk+rb1aP9ShTk5I6YnOWxELRXKORui9iOhvErVjAoZToHSK125+CCUnz9fSXdOSHQaIKbO918Fsn7pxj6aZ/I28GwyFcpgPvD+putZ9tFPt7t/ndeKAVN47d4mk= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1722925645; 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=OTX/GHXUmXFh0D4AEM8ZY3l4zU6LP3K0z3O3UyAfsjo=; b=iLZJqtLqQO7SxpbipfI0qrx+VtzODJ5bOd6PRWa+jlMwqORdA/hcbPE4FQEj9UPWkjVw6Gxf0KmN3KYyUF1uNLU1cuHGFYarf2WdJDqnJQBp9CqJf5j5VVncwT4gqtW2c7+T40aUzwSB7A/l7P9M/0SPUMd2t2ni6KJRutsZ8so= 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 1722925645877639.470470577184; Mon, 5 Aug 2024 23:27:25 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sbDe6-0003Lg-Kb; Tue, 06 Aug 2024 02:26:10 -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 1sbDe4-0003H3-UU for qemu-devel@nongnu.org; Tue, 06 Aug 2024 02:26:08 -0400 Received: from mail-pl1-x631.google.com ([2607:f8b0:4864:20::631]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1sbDe3-0003xF-3t for qemu-devel@nongnu.org; Tue, 06 Aug 2024 02:26:08 -0400 Received: by mail-pl1-x631.google.com with SMTP id d9443c01a7336-1fd640a6454so1766075ad.3 for ; Mon, 05 Aug 2024 23:26:06 -0700 (PDT) Received: from toolbox.alistair23.me (2403-580b-97e8-0-82ce-f179-8a79-69f4.ip6.aussiebb.net. [2403:580b:97e8:0:82ce:f179:8a79:69f4]) by smtp.gmail.com with ESMTPSA id d9443c01a7336-1ff5927f161sm79464975ad.232.2024.08.05.23.26.02 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 05 Aug 2024 23:26:04 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1722925565; x=1723530365; 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=OTX/GHXUmXFh0D4AEM8ZY3l4zU6LP3K0z3O3UyAfsjo=; b=DXUJkiskpBzfwoGnMlRgOFv1sX+Vy0aVpyJtXbC25dqyE7ibhI1icf2b5Ga+cjt0Cr yllI1lyUzbtA6Y+2NQLnrPRkE450+k9IhYeRLnIHqkznPEXCaucEAbxKVyc4FJ1FI+ji sVC6TUk8qy7UUzq1POUjRB9rqyE8D4ZAn/rXt7U207/9eHinAWzDboHaWtKuoeXqRry4 Om80/DrYpufEZC53tP5fPKEf+oVdiX+e3Q+1PlEHpTgxcVZNAiAQEhfwmVH4euuO24Lx ydwSdianQXmN/JRkfM3HfzWkU+OT5mq1jejPROWiOLmTm+UJB0N+43GwD4E4Bn2SC/Bw /RIQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1722925565; x=1723530365; 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=OTX/GHXUmXFh0D4AEM8ZY3l4zU6LP3K0z3O3UyAfsjo=; b=wZRIe/UlQKlqmg+g5JjfM8qeZV5FSQ9IgNBmIQPyJa7DPjvn+DNINDxSvHLLCx/xQr 0qOb0HmEv55lkHG3mO8H/tAQZFFIArp9uJNIqE2z5FfopEbZ091XgE+ySY1AghTZQGuL OENSE+NzLTvTEFCelzC3BzMEijF12UZuFVieWRODMJSgG5sa8bkTaP/XXVEs2HhMqrEf PzcZHyy4EIrGN67l7/7vZONpEF6dygGkoCZEUC+M670tSNGqlXcPKjsTPFyWyLUCMOad jC4H+4pUylxI7TJB5NhKQkg8hZUmPcwWH4hMgbD7GeqeX5grNy6EBQJG+3xynG6vM1k4 DEaA== X-Gm-Message-State: AOJu0Yyy5uU+Oui31TAIu7BEWaShpJz5ORp/gjKWiH1/qZLDlwrHdePO Ieov2fK//148gfIDLL03lBPfYMYzukFzV9JNYop9r3avFVIlPM/4q4+eNIup X-Google-Smtp-Source: AGHT+IF5Pl8s81U4n/WjooUF8w3HVO5+U4CDYPQsgS7HIJmcv4isCuQj5MMesKX9GIfrsx177CDIqw== X-Received: by 2002:a17:903:110f:b0:1fb:8e00:e5e8 with SMTP id d9443c01a7336-1ff5727cff6mr152124725ad.10.1722925564932; Mon, 05 Aug 2024 23:26:04 -0700 (PDT) From: Alistair Francis X-Google-Original-From: Alistair Francis To: qemu-devel@nongnu.org Cc: alistair23@gmail.com, LIU Zhiwei , Alistair Francis , Richard Henderson Subject: [PULL 3/5] target/riscv: Relax fld alignment requirement Date: Tue, 6 Aug 2024 16:25:43 +1000 Message-ID: <20240806062545.1250910-4-alistair.francis@wdc.com> X-Mailer: git-send-email 2.45.2 In-Reply-To: <20240806062545.1250910-1-alistair.francis@wdc.com> References: <20240806062545.1250910-1-alistair.francis@wdc.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" 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::631; envelope-from=alistair23@gmail.com; helo=mail-pl1-x631.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: 1722925647819116600 From: LIU Zhiwei According to the risc-v specification: "FLD and FSD are only guaranteed to execute atomically if the effective address is naturally aligned and XLEN=E2=89=A564." We currently implement fld as MO_ATOM_IFALIGN when XLEN < 64, which does not violate the rules. But it will hide some problems. So relax it to MO_ATOM_NONE. Signed-off-by: LIU Zhiwei Reviewed-by: Alistair Francis Reviewed-by: Richard Henderson Message-ID: <20240802072417.659-4-zhiwei_liu@linux.alibaba.com> Signed-off-by: Alistair Francis --- target/riscv/insn_trans/trans_rvd.c.inc | 18 ++++++++++++++---- 1 file changed, 14 insertions(+), 4 deletions(-) diff --git a/target/riscv/insn_trans/trans_rvd.c.inc b/target/riscv/insn_tr= ans/trans_rvd.c.inc index 49682292b8..8a46124f98 100644 --- a/target/riscv/insn_trans/trans_rvd.c.inc +++ b/target/riscv/insn_trans/trans_rvd.c.inc @@ -48,11 +48,17 @@ static bool trans_fld(DisasContext *ctx, arg_fld *a) REQUIRE_EXT(ctx, RVD); =20 /* - * Zama16b applies to loads and stores of no more than MXLEN bits defi= ned - * in the F, D, and Q extensions. + * FLD and FSD are only guaranteed to execute atomically if the effect= ive + * address is naturally aligned and XLEN=E2=89=A564. Also, zama16b app= lies to + * loads and stores of no more than MXLEN bits defined in the F, D, and + * Q extensions. */ - if ((get_xl_max(ctx) >=3D MXL_RV64) && ctx->cfg_ptr->ext_zama16b) { + if (get_xl_max(ctx) =3D=3D MXL_RV32) { + memop |=3D MO_ATOM_NONE; + } else if (ctx->cfg_ptr->ext_zama16b) { memop |=3D MO_ATOM_WITHIN16; + } else { + memop |=3D MO_ATOM_IFALIGN; } =20 decode_save_opc(ctx); @@ -71,8 +77,12 @@ static bool trans_fsd(DisasContext *ctx, arg_fsd *a) REQUIRE_FPU; REQUIRE_EXT(ctx, RVD); =20 - if ((get_xl_max(ctx) >=3D MXL_RV64) && ctx->cfg_ptr->ext_zama16b) { + if (get_xl_max(ctx) =3D=3D MXL_RV32) { + memop |=3D MO_ATOM_NONE; + } else if (ctx->cfg_ptr->ext_zama16b) { memop |=3D MO_ATOM_WITHIN16; + } else { + memop |=3D MO_ATOM_IFALIGN; } =20 decode_save_opc(ctx); --=20 2.45.2 From nobody Sun Nov 24 12:08:36 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=1722925627; cv=none; d=zohomail.com; s=zohoarc; b=nb/Kb0s8F0mhZAFj+mIPWqphqQVmb5dsw5qXy+mUk5VYHYE0+H5dO38nSoUcVeQrJ0GFQp8Gjg70ygii0x/mpqhSnyCA1ZI33w2156BrY/gxf8wBbNu1MgbhDapVohGy/2aVMwnwia8mzslgMKCqqc/8qpyXtdikItM4bt6EmL8= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1722925627; 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=rIl02MTGpKMjmvTqt9QTISYxUzrPTliJWcVLJpIrITo=; b=WWXhRAlftM+0XHiuXiouoXMBXn4I/xpBVsaZbiqSBnyE2CF9zxVN6Wb9ph5sOdmRCgDPTVybsEBcR7tMDZxa4kAE6VacPNJJx/ApUasOxqRGmcXBs9jueRvQKxqEgyb3MgiebnsQ3QoJ87vCIvyjUkZVoNZMifjUP4UsaBUIUrk= 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 1722925627216274.1490450084365; Mon, 5 Aug 2024 23:27:07 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sbDe9-0003Ud-Dg; Tue, 06 Aug 2024 02:26:13 -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 1sbDe8-0003QA-0J for qemu-devel@nongnu.org; Tue, 06 Aug 2024 02:26:12 -0400 Received: from mail-pl1-x633.google.com ([2607:f8b0:4864:20::633]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1sbDe5-0003yx-S6 for qemu-devel@nongnu.org; Tue, 06 Aug 2024 02:26:11 -0400 Received: by mail-pl1-x633.google.com with SMTP id d9443c01a7336-1fd69e44596so3678765ad.1 for ; Mon, 05 Aug 2024 23:26:09 -0700 (PDT) Received: from toolbox.alistair23.me (2403-580b-97e8-0-82ce-f179-8a79-69f4.ip6.aussiebb.net. [2403:580b:97e8:0:82ce:f179:8a79:69f4]) by smtp.gmail.com with ESMTPSA id d9443c01a7336-1ff5927f161sm79464975ad.232.2024.08.05.23.26.05 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 05 Aug 2024 23:26:07 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1722925568; x=1723530368; 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=rIl02MTGpKMjmvTqt9QTISYxUzrPTliJWcVLJpIrITo=; b=Tm0mLU3f8U7J3Sr21hd4InKIXhTc9Dh1GI4LDjdHd/Aj4J7KVhhB24eZQ8/23nfnS0 /Tt7blz1DSaIGVYzO51tQ+ZKlxP90N+s0XRGoHNktm61Tn0jdHI2N6k9S4dT7lYUOyrP 4V5H39+Hj/VCvjtf31dGMEPjoXD0Xg1EjpQLIs4bMQlKiM0bTos/H5njUx6VSEGXrSMe GN1IN2S/5r/jKupkIu7mOsNXDBlvNXTzheXiQxf0Pfxm/KbwnpIBbhCfBz6cOsRV274n 6XpkK6oV9eGPxDbnP1CqFHcHT8NBT5XRguCH9fb05PWg6xxJJCOfmaURrDsM7e+3mDu9 lrig== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1722925568; x=1723530368; 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=rIl02MTGpKMjmvTqt9QTISYxUzrPTliJWcVLJpIrITo=; b=QDm4zEhu0RhDMC5gf5wZMfRmSpNd021Gio3VicZ9xNS+56FL5TjJR2iGhKD9zd+/ww A+mlwk1XqXN2zTluIQ/SRMh6bZX8bW6hMFHAAMI6a9YFU1OGVDe8IsaeqSnnV0drVUeb F6PMDJMIY9qB8BmTOHM60ouVMsP1v6yXpLj5LXfQXasgTbn4fiMxG6vZX0BTIXmb5Ob8 BoLpzGzmHpLILT1IvmSg0x4OFGCK6SGwXsXbtP0fBmP7k2W1jNikkKmERgwDzCAcEwp9 LXfUfvTj/Q1mhkI1MR6Gx8IkZLRc7MpN+wFSAKPHzYp4O3hV4a59ANt0RPZcBO9DBnhV 1SZw== X-Gm-Message-State: AOJu0YyQgMy5uCrIl9T1wkyK4yo7Qkgl/YV+hacfvvMq3rOUYHJdxDS2 WXVjfIEoMAGCsE66OA61CeeT7MqdYnmuhLqLPeRwTEfT7TNxGbgv+yMQt1Pj X-Google-Smtp-Source: AGHT+IF2StyMO+TE6pXy0EkMoCl3aVVqXH7bU7UWvt/7od5BX1lNAvKJ9ZJYokYxPGiegAJObMjr7Q== X-Received: by 2002:a17:902:dac3:b0:1fa:2b11:657d with SMTP id d9443c01a7336-1ff57b827c9mr222497785ad.10.1722925567929; Mon, 05 Aug 2024 23:26:07 -0700 (PDT) From: Alistair Francis X-Google-Original-From: Alistair Francis To: qemu-devel@nongnu.org Cc: alistair23@gmail.com, Atish Patra , Peter Maydell , Alistair Francis Subject: [PULL 4/5] target/riscv: Add asserts for out-of-bound access Date: Tue, 6 Aug 2024 16:25:44 +1000 Message-ID: <20240806062545.1250910-5-alistair.francis@wdc.com> X-Mailer: git-send-email 2.45.2 In-Reply-To: <20240806062545.1250910-1-alistair.francis@wdc.com> References: <20240806062545.1250910-1-alistair.francis@wdc.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=2607:f8b0:4864:20::633; envelope-from=alistair23@gmail.com; helo=mail-pl1-x633.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: 1722925628910116600 Content-Type: text/plain; charset="utf-8" From: Atish Patra Coverity complained about the possible out-of-bounds access with counter_virt/counter_virt_prev because these two arrays are accessed with privilege mode. However, these two arrays are accessed only when virt is enabled. Thus, the privilege mode can't be M mode. Add the asserts anyways to detect any wrong usage of these arrays in the future. Suggested-by: Peter Maydell Signed-off-by: Atish Patra Fixes: Coverity CID 1558459 Fixes: Coverity CID 1558462 Reviewed-by: Alistair Francis Message-ID: <20240724-fixes-v1-1-4a64596b0d64@rivosinc.com> Signed-off-by: Alistair Francis --- target/riscv/pmu.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/target/riscv/pmu.c b/target/riscv/pmu.c index 3cc0b3648c..e05ab067d2 100644 --- a/target/riscv/pmu.c +++ b/target/riscv/pmu.c @@ -204,6 +204,7 @@ static void riscv_pmu_icount_update_priv(CPURISCVState = *env, } =20 if (env->virt_enabled) { + g_assert(env->priv <=3D PRV_S); counter_arr =3D env->pmu_fixed_ctrs[1].counter_virt; snapshot_prev =3D env->pmu_fixed_ctrs[1].counter_virt_prev; } else { @@ -212,6 +213,7 @@ static void riscv_pmu_icount_update_priv(CPURISCVState = *env, } =20 if (new_virt) { + g_assert(newpriv <=3D PRV_S); snapshot_new =3D env->pmu_fixed_ctrs[1].counter_virt_prev; } else { snapshot_new =3D env->pmu_fixed_ctrs[1].counter_prev; @@ -242,6 +244,7 @@ static void riscv_pmu_cycle_update_priv(CPURISCVState *= env, } =20 if (env->virt_enabled) { + g_assert(env->priv <=3D PRV_S); counter_arr =3D env->pmu_fixed_ctrs[0].counter_virt; snapshot_prev =3D env->pmu_fixed_ctrs[0].counter_virt_prev; } else { @@ -250,6 +253,7 @@ static void riscv_pmu_cycle_update_priv(CPURISCVState *= env, } =20 if (new_virt) { + g_assert(newpriv <=3D PRV_S); snapshot_new =3D env->pmu_fixed_ctrs[0].counter_virt_prev; } else { snapshot_new =3D env->pmu_fixed_ctrs[0].counter_prev; --=20 2.45.2 From nobody Sun Nov 24 12:08:36 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=1722925645; cv=none; d=zohomail.com; s=zohoarc; b=i4/EsAFdafiQmH38MN6bJxhrS6B3soJz4chUJvGrwrnYdb6gqV1eHciJtx3ryqRSVJpGPoHOb3Xz9Gl0DLPvY3Mr80eeYnjXYb6FKG+6+VlR8Ejx5ix7Ve3FSaJBNJYeC4NZs8tIXCq+UJCwY7S4x01OsTVv7joMBkrevnyQBls= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1722925645; 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=MoTwcmHl5mcDqGL4UUvT/B4Y37addNNwVei5KB700ZE=; b=jB/ZclzUtj1HozSdC2o/tdmh+jtixhsZcNAvOT8nEdU3p2vjXPam+unQvhtl5u5pSfo6tsjgVDZ7UNZD/MHYWujEeW3xPYfZZywK4tCAIder8z2h6Wqgylaf2TGX5o5BRmP3dQj2NOkpGM7ESbN3hIKD3ijwmZEenS8P2CUo3kU= 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 1722925645647259.812530427771; Mon, 5 Aug 2024 23:27:25 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sbDeC-0003fs-RT; Tue, 06 Aug 2024 02:26:16 -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 1sbDeB-0003aJ-2H for qemu-devel@nongnu.org; Tue, 06 Aug 2024 02:26:15 -0400 Received: from mail-pl1-x629.google.com ([2607:f8b0:4864:20::629]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1sbDe8-0003z7-Ry for qemu-devel@nongnu.org; Tue, 06 Aug 2024 02:26:14 -0400 Received: by mail-pl1-x629.google.com with SMTP id d9443c01a7336-1fd78c165eeso1800555ad.2 for ; Mon, 05 Aug 2024 23:26:12 -0700 (PDT) Received: from toolbox.alistair23.me (2403-580b-97e8-0-82ce-f179-8a79-69f4.ip6.aussiebb.net. [2403:580b:97e8:0:82ce:f179:8a79:69f4]) by smtp.gmail.com with ESMTPSA id d9443c01a7336-1ff5927f161sm79464975ad.232.2024.08.05.23.26.08 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 05 Aug 2024 23:26:10 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1722925571; x=1723530371; 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=MoTwcmHl5mcDqGL4UUvT/B4Y37addNNwVei5KB700ZE=; b=MxgQUfNYQWSIg4g2QeDoRzXR8vPsmB8NERdVMFARYp2d4Ulu3hYKnPMKfM782Qf7XI aV/bjcOX+fhb9qtFb2IPWykrRYyiHtquguQtFgsTZXu8Qs5xNRedzq6K61sDcjuBjOw7 LUCrOMBKf9vE0VlJotguhL315NpOuvHvOig5qcbi5kUDQ3jSJkCABLW+JgLK1qEwghpp DZnzCz8feqxSM6ev5bR1LP85eQb+Bei6wVeMVajzLZQDVuhyQ92u31sUipoSxTvk8Bsd +8rTIDeaTOTpVkVF3qRp45oMFvzJ6CNXX2yyBFnBs3SCtnBu1ayEvttJRDzqcUP8nOVO MMWQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1722925571; x=1723530371; 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=MoTwcmHl5mcDqGL4UUvT/B4Y37addNNwVei5KB700ZE=; b=vQurD9MwdkQUTjgsM5q3ug618tf1xjayyi+wXR2jTGOudnricfWflCDOUAnh/Ooixt uZxMHshB4BXRMDxFi8WjmrpCCX0FJIiBP7nvXtlr7feQzeotJ0GFdCvDC531jmyRbkx4 0OfWEveivMewL7750iXrSEhwqlHOmnImjIDCr83od3FJUW+zaADOxqpLZFC0vSNAKNXD 1CrV7ss/5jtLCVC/prz8IJsFqzR38w++m66RqK3AgYIVFzusD2L8YEfl3sNaEGd4Z7Qp yUYNdr+KvbpvxDMzlLovr3jnkAGCWkS/FqSPOr6dNsuOOfzCSiTdt1JVRWQAu2ulSHVR wcCQ== X-Gm-Message-State: AOJu0Yxaq82HrVzKUOrtrVYBRLP4tkhEJisMvvvu2Y9O3orwnG+3nLMh DFzjU1tI84HXxIr9j3WYozFcp+WJryJer3uO8+CSGu4m3atEZx41S+RZHKH3 X-Google-Smtp-Source: AGHT+IEC48/uJnwZpMuWhnrQaO+o3WSskFr2Ji/M2NIoDlFjc9p9yczC3oLq7xG5tBGEcOGerWreGQ== X-Received: by 2002:a17:902:e745:b0:1fc:58fc:caf7 with SMTP id d9443c01a7336-1ff572733edmr174070515ad.14.1722925570797; Mon, 05 Aug 2024 23:26:10 -0700 (PDT) From: Alistair Francis X-Google-Original-From: Alistair Francis To: qemu-devel@nongnu.org Cc: alistair23@gmail.com, Daniel Henrique Barboza , Alistair Francis Subject: [PULL 5/5] roms/opensbi: Update to v1.5.1 Date: Tue, 6 Aug 2024 16:25:45 +1000 Message-ID: <20240806062545.1250910-6-alistair.francis@wdc.com> X-Mailer: git-send-email 2.45.2 In-Reply-To: <20240806062545.1250910-1-alistair.francis@wdc.com> References: <20240806062545.1250910-1-alistair.francis@wdc.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=2607:f8b0:4864:20::629; envelope-from=alistair23@gmail.com; helo=mail-pl1-x629.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: 1722925646026116600 Content-Type: text/plain; charset="utf-8" From: Daniel Henrique Barboza A new minor version of OpenSBI was just released after our bump to OpenSBI 1.5. It contains significant bug fixes that it's worth doing a new update for QEMU 9.1. Submodule roms/opensbi 455de672dd..43cace6c36: > lib: sbi: check result of pmp_get() in is_pmp_entry_mapped() > lib: sbi: fwft: fix incorrect size passed to sbi_zalloc() > lib: sbi: dbtr: fix potential NULL pointer dereferences > include: Adjust Sscofpmf mhpmevent mask for upper 8 bits > lib: sbi_hsm: Save/restore menvcfg only when it exists Signed-off-by: Daniel Henrique Barboza Message-ID: <20240805120259.1705016-2-dbarboza@ventanamicro.com> Reviewed-by: Alistair Francis Signed-off-by: Alistair Francis --- .../opensbi-riscv32-generic-fw_dynamic.bin | Bin 268312 -> 268312 bytes .../opensbi-riscv64-generic-fw_dynamic.bin | Bin 272504 -> 272504 bytes roms/opensbi | 2 +- 3 files changed, 1 insertion(+), 1 deletion(-) diff --git a/pc-bios/opensbi-riscv32-generic-fw_dynamic.bin b/pc-bios/opens= bi-riscv32-generic-fw_dynamic.bin index 7ec260ff40..b2e740010b 100644 Binary files a/pc-bios/opensbi-riscv32-generic-fw_dynamic.bin and b/pc-bios= /opensbi-riscv32-generic-fw_dynamic.bin differ diff --git a/pc-bios/opensbi-riscv64-generic-fw_dynamic.bin b/pc-bios/opens= bi-riscv64-generic-fw_dynamic.bin index 090c0cf6ac..018b4731a7 100644 Binary files a/pc-bios/opensbi-riscv64-generic-fw_dynamic.bin and b/pc-bios= /opensbi-riscv64-generic-fw_dynamic.bin differ diff --git a/roms/opensbi b/roms/opensbi index 455de672dd..43cace6c36 160000 --- a/roms/opensbi +++ b/roms/opensbi @@ -1 +1 @@ -Subproject commit 455de672dd7c2aa1992df54dfb08dc11abbc1b1a +Subproject commit 43cace6c3671e5172d0df0a8963e552bb04b7b20 --=20 2.45.2