From patchwork Wed Oct 20 10:19:27 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alexey Baturo X-Patchwork-Id: 12572051 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 40C30C433EF for ; Wed, 20 Oct 2021 10:44:39 +0000 (UTC) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id CA3BD610EA for ; Wed, 20 Oct 2021 10:44:38 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org CA3BD610EA Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=nongnu.org Received: from localhost ([::1]:60256 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1md95J-0002bD-Pu for qemu-devel@archiver.kernel.org; Wed, 20 Oct 2021 06:44:37 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:48030) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1md8hK-0003ad-IA; Wed, 20 Oct 2021 06:19:50 -0400 Received: from mail-ed1-x530.google.com ([2a00:1450:4864:20::530]:40878) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1md8hI-0002vI-F4; Wed, 20 Oct 2021 06:19:50 -0400 Received: by mail-ed1-x530.google.com with SMTP id 5so23540121edw.7; Wed, 20 Oct 2021 03:19:44 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=7g0itDDTe+xtO3AVn6KLaMvpY80eg7ZVZXv/91r/MG0=; b=P1wE+JN50B24ChDIPgBsKunUYIdRlM4KlGydDmNk94cowghyfmzsJ/VAt7mJ6q5xQ5 Ag6+f7ju+srhNj9AdW2ulvCkQLbI9XXvQ/bbkBlBpUH2MYJYgbt10L9OdYjj2xt3CZhK zOk4UmMnC5uSBxJNGCA/yKlljcYbXi68msecqZ8e2aap1WcvSJZ/dzg6Psr8Fenp4aIV CsLl/eTTljKbRCBZ3lC8nz4w1CiDRjSfWGjHcEMD0URet4hoSOViOZ5Fs2cnK3Bl4Cei DHNBxC2+b3Un03bwjc/xJtEMPLYO5NwDqO05nBPLGjn1tLLQrQoHiZyF8FYeo8vR7Svv 8NPw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=7g0itDDTe+xtO3AVn6KLaMvpY80eg7ZVZXv/91r/MG0=; b=w0LRJUG6YdRgg+cv4iMg5ftiDevAstWCDiPydxhmWfSH6mv3Ce/Y5r0hAybBQLbNgU QcQiLa1XbfXrh0HN8YLu49MHDzqOGwrBEbkgUf/M0ccxzq7dQBa7/cBcJlSMYVAGrb8w ThG/3QNDfy6dcGMx9L1OFxJv42nJIZkYVaYKNY7upo5ICAaL0po0xSwjXb3clmcnfdGj XkaNDDTQzHoMIhKNjHl4pBdK2StqBXLHVWNg3H33z8jgQvcNq03PvorJgJlLcexRuxH6 TJpQCs2fIJADK9Hw+OC4evI2Qb0PFv1NULCez170Od1Zs83MI2Y3g6UhpmBH/wsdVydS bKOQ== X-Gm-Message-State: AOAM531bgsi5kpgj0FfU9wNuZ+Hd0UoH89EeqSnWcHTrJ49pwknEYIRY SCl6HmrfVEhUtlFnNmdHqRc= X-Google-Smtp-Source: ABdhPJwtbNmBptfJS1++CHcQAjbCzPD1H+O/A3AxF+d8MUedBf6fD18NdYLqjNZq6eW8x52OLQCTNg== X-Received: by 2002:a50:d8cf:: with SMTP id y15mr61240746edj.66.1634725182846; Wed, 20 Oct 2021 03:19:42 -0700 (PDT) Received: from neptune.lab ([46.39.228.224]) by smtp.googlemail.com with ESMTPSA id k19sm821284ejg.13.2021.10.20.03.19.41 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 20 Oct 2021 03:19:42 -0700 (PDT) From: Alexey Baturo X-Google-Original-From: Alexey Baturo To: Subject: [PATCH v15 0/8] RISC-V Pointer Masking implementation Date: Wed, 20 Oct 2021 13:19:27 +0300 Message-Id: <20211020101935.1369682-1-space.monkey.delivers@gmail.com> X-Mailer: git-send-email 2.30.2 MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::530; envelope-from=baturo.alexey@gmail.com; helo=mail-ed1-x530.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, 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.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: baturo.alexey@gmail.com, qemu-riscv@nongnu.org, sagark@eecs.berkeley.edu, kbastian@mail.uni-paderborn.de, richard.henderson@linaro.org, qemu-devel@nongnu.org, space.monkey.delivers@gmail.com, Alistair.Francis@wdc.com, kupokupokupopo@gmail.com, palmer@dabbelt.com Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: "Qemu-devel" v14: Addressed Richard's comments from previous series. v13: Rebased QEMU and addressed Richard's comment. v12: Updated function for adjusting address with pointer masking to allocate and use temp register. v11: Addressed a few style issues Alistair mentioned in the previous review. If this patch series would be accepted, I think my further attention would be to: - Support pm for memory operations for RVV - Add proper csr and support pm for memory operations for Hypervisor mode - Support address wrapping on unaligned accesses as @Richard mentioned previously Thanks! Alexey Baturo (7): [RISCV_PM] Add J-extension into RISC-V [RISCV_PM] Add CSR defines for RISC-V PM extension [RISCV_PM] Support CSRs required for RISC-V PM extension except for the h-mode [RISCV_PM] Add J extension state description [RISCV_PM] Print new PM CSRs in QEMU logs [RISCV_PM] Support pointer masking for RISC-V for i/c/f/d/a types of instructions [RISCV_PM] Allow experimental J-ext to be turned on Anatoly Parshintsev (1): [RISCV_PM] Implement address masking functions required for RISC-V Pointer Masking extension target/riscv/cpu.c | 31 +++ target/riscv/cpu.h | 33 +++ target/riscv/cpu_bits.h | 96 ++++++++ target/riscv/csr.c | 285 ++++++++++++++++++++++++ target/riscv/insn_trans/trans_rva.c.inc | 3 + target/riscv/insn_trans/trans_rvd.c.inc | 2 + target/riscv/insn_trans/trans_rvf.c.inc | 2 + target/riscv/insn_trans/trans_rvi.c.inc | 2 + target/riscv/machine.c | 27 +++ target/riscv/translate.c | 43 ++++ 10 files changed, 524 insertions(+)