Received: by 2002:a05:6a10:6d10:0:0:0:0 with SMTP id gq16csp761218pxb; Tue, 12 Apr 2022 12:45:38 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyrc23XddYGYyGCPNTvaC26j48/10k/pzgPtrdkk/JYlVHF/4M4hqSisTT5SnpziOJbZUs7 X-Received: by 2002:a17:90a:d0c5:b0:1c9:ec78:18e5 with SMTP id y5-20020a17090ad0c500b001c9ec7818e5mr6750659pjw.53.1649792738159; Tue, 12 Apr 2022 12:45:38 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1649792738; cv=none; d=google.com; s=arc-20160816; b=OEHA5Ael+AGVEkV+Gqwg40oY3mV5GHlJMx/Im2BqecVa4IdVPhDo84WL/xqSpItZMw MjKlwCB+aCB6hiDgWnadzpoARAyEvtIgE7fSjmUbQwXuMFGvaLD4zGOwvQPqT2w0IqFH Tz4UVxMY3EZxPcUm7zUH8Bv+lgr0LBx1LfQMyYk8kiAAwyd/8QWNQPHs+5WEgCr6OgJu Gbcg93A42Z17amS+VuNr+5uV0rkJi50R8kZNrJxJs2h8zSTuPZRzdm4llaowkBwTAA6K ks9/+daWCrUqkShDzSuHRZ7WNj+bTKjQ9w5mrShOm+q9tMqoG5SWEEJrwINb0+w12E/j QvuA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=y8/JYtLwGTr+r9WhKddIHXBLC5TCTeFp3FTZ8BAk6HA=; b=AlNXf+3sYt/8h/pCpw6AeWBHbnXtpvFtce3h+8TXF4AOKhE4JlirX8bIhhx71s2X4N gJxpuvvv+syWmOAyTjlVKvS15QdBMI81y/fxRuSnFJtDCEx7NOSPz/A/H7m7YMwXodgf A/sec4UVAMbjv3o17JagxEEGPTkUByO/UH6Js8qp9ntahUj0nnd/VCRDIk+YY9MJmNYo xcDF6QSbe3t+EfWsAwstZEMxNKJXxKk3Keu4c0//lsIVYwNGAtmi0OWP2mVszEjDS0jU JvUNkNlWB4/JWa/kUigkq3m0YK6h2p1Sy0lJ1PkjlvdufmVHEfOHlmrNyOXb4QTTEffh KJ9g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ventanamicro.com header.s=google header.b=BWQF6hyE; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [23.128.96.19]) by mx.google.com with ESMTPS id 76-20020a63004f000000b0039cc5344a7csi3438829pga.273.2022.04.12.12.45.37 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 12 Apr 2022 12:45:38 -0700 (PDT) Received-SPF: softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) client-ip=23.128.96.19; Authentication-Results: mx.google.com; dkim=pass header.i=@ventanamicro.com header.s=google header.b=BWQF6hyE; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 7D2A967D08; Tue, 12 Apr 2022 12:43:48 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1345137AbiDLL0L (ORCPT + 99 others); Tue, 12 Apr 2022 07:26:11 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51466 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1352737AbiDLLZl (ORCPT ); Tue, 12 Apr 2022 07:25:41 -0400 Received: from mail-pj1-x102e.google.com (mail-pj1-x102e.google.com [IPv6:2607:f8b0:4864:20::102e]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 42A6C237E5 for ; Tue, 12 Apr 2022 03:08:27 -0700 (PDT) Received: by mail-pj1-x102e.google.com with SMTP id ll10so9580533pjb.5 for ; Tue, 12 Apr 2022 03:08:27 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ventanamicro.com; s=google; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=y8/JYtLwGTr+r9WhKddIHXBLC5TCTeFp3FTZ8BAk6HA=; b=BWQF6hyEhV41fw/Vfjf8js/WHVuO3KDWVkQ8iaSse8fQWRUMxww5Qo6CNykQ17EiqJ R9plY4ivF9hhzBQTg1z4+y6mKIq64h787PG2tMSkM21BHRwuDGku3NMVlkP3l2pUgZOr 0uS52KvkqEcGka6JR8QD5Suprc65T9w/aFdLzxiyKHmZYNHvqkwYPzD3ZC1QXAMSuioi oxCseOUn1dQARtF/OdcH0P1WWbsgSOSymXv1WylLOHKcVTOM1K+1+5zNFRKwXh3K8CHw P2lU4Oksd7J26mj5hEnZmKUemEGP293GCRcM9Ix94AXPVy8w6j8ZGMy7mTjFDfuo4kOt j01w== 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=y8/JYtLwGTr+r9WhKddIHXBLC5TCTeFp3FTZ8BAk6HA=; b=LD+Zke4kjgkWF+3XE5kCpPUQCsr83gFQnpQxCnKs85pLPfvVLCh72diY15l4LGssRf N43jrNMTRMFKAjImHS1FYiY1kX+PL6x+aN1kN5cWnriDqGxBhYR0XoAraPXcAxgKE8C1 IQPYmdOVNH1LET3miwgRR+F4Egn564QbcusxjpicQCyCGUIcy7djv5E1BP6dSlMae4ol BM3ihIQhgUYpvJDb6cscu4OlaJ+n3sU76Nh2WVeupQ9Xoc00b9W1JdxqnYbaRyuz+kWi 4mzxXR2rE1Syktc7h8ol/MlB8YMLUqs4XhnjHzuCOfGP6fauvlmb7PGuselp+ZJTFoQW Rd8g== X-Gm-Message-State: AOAM530+z9af+Lg5wBuUz2OMgFWqCPEIxYv5aykcrLhFf4Lqk8UuMynC lUHZHXIYjA3DxOE5vkgN1G5YzQ== X-Received: by 2002:a17:902:8684:b0:154:af35:82ce with SMTP id g4-20020a170902868400b00154af3582cemr37178055plo.137.1649758106758; Tue, 12 Apr 2022 03:08:26 -0700 (PDT) Received: from localhost.localdomain ([122.182.197.47]) by smtp.gmail.com with ESMTPSA id j9-20020a056a00130900b004f73df40914sm37515088pfu.82.2022.04.12.03.08.22 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 12 Apr 2022 03:08:25 -0700 (PDT) From: Anup Patel To: Paolo Bonzini , Atish Patra Cc: Palmer Dabbelt , Paul Walmsley , Alistair Francis , Anup Patel , kvm@vger.kernel.org, kvm-riscv@lists.infradead.org, linux-riscv@lists.infradead.org, linux-kernel@vger.kernel.org, Anup Patel Subject: [PATCH 0/6] KVM RISC-V Sv57x4 support and HFENCE improvements Date: Tue, 12 Apr 2022 15:37:07 +0530 Message-Id: <20220412100713.1415094-1-apatel@ventanamicro.com> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-2.0 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,RDNS_NONE,SPF_HELO_NONE,T_SCC_BODY_TEXT_LINE autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org This series adds Sv57x4 support for KVM RISC-V G-stage and various HFENCE related improvements. These patches can also be found in riscv_kvm_sv57_plus_v1 branch at: https://github.com/avpatel/linux.git Anup Patel (6): RISC-V: KVM: Use G-stage name for hypervisor page table RISC-V: KVM: Add Sv57x4 mode support for G-stage RISC-V: KVM: Treat SBI HFENCE calls as NOPs RISC-V: KVM: Introduce range based local HFENCE functions RISC-V: KVM: Reduce KVM_MAX_VCPUS value RISC-V: KVM: Add remote HFENCE functions based on VCPU requests arch/riscv/include/asm/csr.h | 1 + arch/riscv/include/asm/kvm_host.h | 119 ++++++-- arch/riscv/kvm/main.c | 11 +- arch/riscv/kvm/mmu.c | 264 ++++++++--------- arch/riscv/kvm/tlb.S | 74 ----- arch/riscv/kvm/tlb.c | 456 ++++++++++++++++++++++++++++++ arch/riscv/kvm/vcpu.c | 34 ++- arch/riscv/kvm/vcpu_exit.c | 6 +- arch/riscv/kvm/vcpu_sbi_replace.c | 40 ++- arch/riscv/kvm/vcpu_sbi_v01.c | 35 ++- arch/riscv/kvm/vm.c | 8 +- arch/riscv/kvm/vmid.c | 30 +- 12 files changed, 791 insertions(+), 287 deletions(-) delete mode 100644 arch/riscv/kvm/tlb.S create mode 100644 arch/riscv/kvm/tlb.c -- 2.25.1