Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp1162633pxu; Fri, 27 Nov 2020 00:54:35 -0800 (PST) X-Google-Smtp-Source: ABdhPJwpH9jbG8TahAuLHt+/nXODxLu+dIw6JWfsvf61+6ewEfUDLOYBP0ZsETlFpc42MmyNhDei X-Received: by 2002:a05:6402:491:: with SMTP id k17mr6581463edv.370.1606467275286; Fri, 27 Nov 2020 00:54:35 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1606467275; cv=none; d=google.com; s=arc-20160816; b=knYdh9wNJBOIISWvtmgoOq+qiwIl5/iI58gHWqQH8N6oWLMsHPvps6t2aCnEW33Si5 LlAqjnmdlMU3nWVd6v+/eu6iRvF0mXzawDCHOex9YYCYvBKRygEJxtIPyo6BycWqtx6W 1/v6cTixR3HY2n92dsnGnTnBcJGG2r4kBO0mRVAOJ3fkM3LiWMCa5P3obgFq2mw1jo4e Fp95t1Zj1GcMhHeaPIM0fki8jx5PLoaoF5y/flykVrhDqlj2gmEssFIR5b6DCga5jl5u T1m8C7mIv09d+AZL1TGnyvjjU0SOcR5JXKJNIkaM15umO8QIt2ZTxlWPBw1XjY/jm2jX 1zgg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=NMhtxoOQO9MieYk5Rltrie3Vdx47/RH1jVgYv6FFhaQ=; b=ndMSHViyQk4hUH0f9LQtNdb28W90yrwcpQPEgV6sa/WgMbMwbxNUCm6n0WaGVWkD06 MiQVtqeJWMDezK0RNqsMy6IscL3cdZmHgxSTYMPnCIczOd7QLO/svaX/ietMYx+gXQvd MAWHzC3C0w2xXZkvD2qXQw4phOc2bU8lDXSaMegkrJBDUAA6vHrrA41LbVFNcxlOSzES hELpdL6TJjvwJJ47hMIreT0FmeNdH7vd1qX4njbUbw7lhyQIbSP8gycDWqg/vK8Mpmon vs+WTwekBGt2dvoqvfTiNksxsAlztqdk5Fu1Iqsz6QqVGDr6vne/Ys8vxwRMf2sKVYCh jNeQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@brainfault-org.20150623.gappssmtp.com header.s=20150623 header.b=m18nERKW; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id x8si6694660edl.492.2020.11.27.00.54.13; Fri, 27 Nov 2020 00:54:35 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@brainfault-org.20150623.gappssmtp.com header.s=20150623 header.b=m18nERKW; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726881AbgK0IPI (ORCPT + 99 others); Fri, 27 Nov 2020 03:15:08 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60082 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725616AbgK0IPH (ORCPT ); Fri, 27 Nov 2020 03:15:07 -0500 Received: from mail-wm1-x342.google.com (mail-wm1-x342.google.com [IPv6:2a00:1450:4864:20::342]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6B8A9C0613D1 for ; Fri, 27 Nov 2020 00:15:05 -0800 (PST) Received: by mail-wm1-x342.google.com with SMTP id 1so5665784wme.3 for ; Fri, 27 Nov 2020 00:15:05 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=brainfault-org.20150623.gappssmtp.com; s=20150623; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=NMhtxoOQO9MieYk5Rltrie3Vdx47/RH1jVgYv6FFhaQ=; b=m18nERKWsFZ00KX/m38Vvp9IoTZj62sK5tPmNvoeLIbF/briBEzrkI4Hs/aP0+f5Dk b6L6mUdr+pMsHGojOE1pYEaNg+qTaTwxdx3UC3m6PH7giJbpoICZWLUfN6McEJznQI0/ ADGFpQpnm3rro734UAHnBzt65wVTVP9BpbCXcx94t+MOoll+iCpnDcavAFcdF0+QDELM 12QxEZVpZX7d+cnirVswy7GSxpe3Mi/4Rk9WyUD/NhH36baHA//UTri8KODMTLjGwSZU jLOOkQku0V93aTg4vi4zxvjXe+Whmc44JqBeo++EqL9Q/YPCtY5Ta5ONyPUR14qNpZId wP5Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=NMhtxoOQO9MieYk5Rltrie3Vdx47/RH1jVgYv6FFhaQ=; b=KhVyQscASaHMaInM0cT7fQJsT74pO+UuqoTepqnDUb0uWMULEB1C0Iim1PXNnRjv9g JCUJrgyeKYzf2Vfwhv08S1gCpJi6APIaG5BKRICKVIZp20Xt/bpRxJoyzKvxv+GTiLTY Y6DTbTdDFfK8M60uPvWmHe4ZDARrZyXp1ElCYi3P2B2H0Qeb4oSP8Tx1jyQiKun5gFvw PST/XIuUtSiWmIpVKoAzGLKR6ZlLTMq6wbp7JafAbn5WZPZve2F99AY+6/Z9fH17WnQ7 FNqCQD8Sb+ajjTtlHhFW+JjWla7GznL2QX4LDUay5qr9RwlGWzLvn3QL/Zxpwzvm+xlr IvOQ== X-Gm-Message-State: AOAM531ZfZ4YYcQPJZVIFo2ol4VMrqBEhKbNxl85hEG51UgVbTxhokbA IVI3RplIK43MHojVxvNHeL5tt1qW9VH/ygp3+ExKZw== X-Received: by 2002:a05:600c:298:: with SMTP id 24mr121691wmk.157.1606464903925; Fri, 27 Nov 2020 00:15:03 -0800 (PST) MIME-Version: 1.0 References: <20200803175846.26272-1-atish.patra@wdc.com> In-Reply-To: <20200803175846.26272-1-atish.patra@wdc.com> From: Anup Patel Date: Fri, 27 Nov 2020 13:44:52 +0530 Message-ID: Subject: Re: [PATCH 0/6] Add SBI v0.2 support for KVM To: Atish Patra Cc: kvm-riscv@lists.infradead.org, linux-riscv , Albert Ou , Anup Patel , Kefeng Wang , KVM General , "linux-kernel@vger.kernel.org List" , Palmer Dabbelt , Paul Walmsley , Thomas Gleixner , Alexander Graf , Paolo Bonzini , Alistair Francis Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Aug 3, 2020 at 11:29 PM Atish Patra wrote: > > The Supervisor Binary Interface(SBI) specification[1] now defines a > base extension that provides extendability to add future extensions > while maintaining backward compatibility with previous versions. > The new version is defined as 0.2 and older version is marked as 0.1. > > This series adds following features to RISC-V Linux KVM. > 1. Adds support for SBI v0.2 in KVM > 2. SBI Hart state management extension (HSM) in KVM > 3. Ordered booting of guest vcpus in guest Linux > > This series depends on the base kvm support series[2]. > > Guest kernel needs to also support SBI v0.2 and HSM extension in Kernel > to boot multiple vcpus. Linux kernel supports both starting v5.7. > In absense of that, guest can only boot 1vcpu. > > [1] https://github.com/riscv/riscv-sbi-doc/blob/master/riscv-sbi.adoc > [2] http://lists.infradead.org/pipermail/linux-riscv/2020-July/001028.html > > Atish Patra (6): > RISC-V: Add a non-void return for sbi v02 functions > RISC-V: Mark the existing SBI v0.1 implementation as legacy > RISC-V: Reorganize SBI code by moving legacy SBI to its own file > RISC-V: Add SBI v0.2 base extension > RISC-V: Add v0.1 replacement SBI extensions defined in v02 > RISC-V: Add SBI HSM extension in KVM > > arch/riscv/include/asm/kvm_vcpu_sbi.h | 32 +++++ > arch/riscv/include/asm/sbi.h | 17 ++- > arch/riscv/kernel/sbi.c | 32 ++--- > arch/riscv/kvm/Makefile | 4 +- > arch/riscv/kvm/vcpu.c | 19 +++ > arch/riscv/kvm/vcpu_sbi.c | 194 ++++++++++++-------------- > arch/riscv/kvm/vcpu_sbi_base.c | 73 ++++++++++ > arch/riscv/kvm/vcpu_sbi_hsm.c | 109 +++++++++++++++ > arch/riscv/kvm/vcpu_sbi_legacy.c | 129 +++++++++++++++++ > arch/riscv/kvm/vcpu_sbi_replace.c | 136 ++++++++++++++++++ > 10 files changed, 619 insertions(+), 126 deletions(-) > create mode 100644 arch/riscv/include/asm/kvm_vcpu_sbi.h > create mode 100644 arch/riscv/kvm/vcpu_sbi_base.c > create mode 100644 arch/riscv/kvm/vcpu_sbi_hsm.c > create mode 100644 arch/riscv/kvm/vcpu_sbi_legacy.c > create mode 100644 arch/riscv/kvm/vcpu_sbi_replace.c > > -- > 2.24.0 > Please implement the SBI SRST extension in your series. Also, the PATCH1 can be merged separately so I would suggest you to send this patch separately. Regards, Anup