From nobody Wed Oct 16 13:39:46 2024 X-Original-To: riscv@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4XTBsZ2n8Wz5YWYP for ; Wed, 16 Oct 2024 13:39:46 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XTBsY6WVmz4LyG for ; Wed, 16 Oct 2024 13:39:45 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1729085985; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=P705To/s+QHdytE51tRZC9ZS581PU7a99MWPIpR4gGM=; b=iufaNAJNoMnMa1qgoZvelFYkv4YJ7zT5/kR01lUHoQYGSbUo69FQRV8auwBh1vWjmYmQMt viH1S8IgI4pgxFWEvCCCGcX4q18h8y9X775UYZ/mVTa/QXLULxm+PlnNl5eTDlzAp9vu9K pgkiInWB38hLl5u+svt+gDWacEkA6xeyxNXwe1NPMuEagT2EvVy4LE+eSpVcNyAK9qSItu NSGKoxguB9CGAPl530wK48opxj5ruMjr7yh19Ls0Ws7rATt90g+4tLWEYaKfqDkG+vlfQE JXkH5avtvg1efcDDjJ41QZqjHXc56OznGxXAg46Ht4P+ri/yd3mkHZ9D8tgIUw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1729085985; a=rsa-sha256; cv=none; b=Wn3hhEsduicghhIDFzS2qX/TnCj7OAa9zMGnfDFqizCKXETBXtYyMgKwkT63uqHbsiqNmN mCOsJRSae3GtWeHOQ6YjXX1ZgAC5efhkX9iuWm30SP0xUU3FmZZXgVHX1eZbUeem/laDQm PjY2pVNmJZ1PEo1VCMV6Xo8TA2dwgemWA+Z/6593ObfQ7Kl4VcOpw19t93X1/9M/Dlt4Fp 72x6wQKc/AneIB9gMTuHsW0nzKsyqMdd/CKxTpPxzuvCYZn2Z0nepfJBBpffPBF04teTxm JkljXMeLf3MKhljjuJfoBPlSE+t7UklwueIY/5zyUtmukMxJINxVcGd0t1LjLg== Received: from kenobi.freebsd.org (kenobi.freebsd.org [IPv6:2610:1c1:1:606c::50:1d]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XTBsY677zz16wk for ; Wed, 16 Oct 2024 13:39:45 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from kenobi.freebsd.org ([127.0.1.5]) by kenobi.freebsd.org (8.15.2/8.15.2) with ESMTP id 49GDdjrN080480 for ; Wed, 16 Oct 2024 13:39:45 GMT (envelope-from bugzilla-noreply@freebsd.org) Received: (from www@localhost) by kenobi.freebsd.org (8.15.2/8.15.2/Submit) id 49GDdjLS080479 for riscv@FreeBSD.org; Wed, 16 Oct 2024 13:39:45 GMT (envelope-from bugzilla-noreply@freebsd.org) X-Authentication-Warning: kenobi.freebsd.org: www set sender to bugzilla-noreply@freebsd.org using -f From: bugzilla-noreply@freebsd.org To: riscv@FreeBSD.org Subject: [Bug 282138] Need system call that flushes the instruction cache for all cores Date: Wed, 16 Oct 2024 13:39:46 +0000 X-Bugzilla-Reason: AssignedTo X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: Base System X-Bugzilla-Component: riscv X-Bugzilla-Version: CURRENT X-Bugzilla-Keywords: X-Bugzilla-Severity: Affects Many People X-Bugzilla-Who: dapeng.gao@cl.cam.ac.uk X-Bugzilla-Status: New X-Bugzilla-Resolution: X-Bugzilla-Priority: --- X-Bugzilla-Assigned-To: riscv@FreeBSD.org X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: bug_id short_desc product version rep_platform op_sys bug_status bug_severity priority component assigned_to reporter Message-ID: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: https://bugs.freebsd.org/bugzilla/ Auto-Submitted: auto-generated List-Id: FreeBSD on the RISC-V instruction set architecture List-Archive: https://lists.freebsd.org/archives/freebsd-riscv List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: freebsd-riscv@freebsd.org Sender: owner-freebsd-riscv@FreeBSD.org MIME-Version: 1.0 https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D282138 Bug ID: 282138 Summary: Need system call that flushes the instruction cache for all cores Product: Base System Version: CURRENT Hardware: riscv OS: Any Status: New Severity: Affects Many People Priority: --- Component: riscv Assignee: riscv@FreeBSD.org Reporter: dapeng.gao@cl.cam.ac.uk FreeBSD's RISC-V port lacks a system call that flushes the i-cache for all cores. This syscall is essential for JIT to work properly. OpenBSD has supported the system call in sysarch (https://github.com/openbsd/src/blob/85ce0bb8dee469f412bbfb468c4393478423bb= dd/sys/arch/riscv64/riscv64/machdep.c#L511) and Linux also has it (https://github.com/riscv-collab/riscv-gnu-toolchain/blob/8b1a7508efc8ae0f6= 03f42e393bab5c5aec80390/linux-headers/include/asm/unistd.h#L28-L45), which is used by the RISC-V port of Chromium (https://github.com/CTSRD-CHERI/v8/blob/main/src/codegen/riscv/cpu-riscv.cc= ). --=20 You are receiving this mail because: You are the assignee for the bug.=