From: Atish Patra <atish.patra@wdc.com> To: linux-kernel@vger.kernel.org Cc: Atish Patra <atish.patra@wdc.com>, Anup Patel <anup.patel@wdc.com>, Heinrich Schuchardt <xypron.glpk@gmx.de>, kvm-riscv@lists.infradead.org, kvm@vger.kernel.org, linux-riscv@lists.infradead.org, Palmer Dabbelt <palmer@dabbelt.com>, Paul Walmsley <paul.walmsley@sifive.com>, Vincent Chen <vincent.chen@sifive.com>, pbonzini@redhat.com, Sean Christopherson <seanjc@google.com> Subject: [PATCH v4 0/5] Add SBI v0.2 support for KVM Date: Fri, 5 Nov 2021 16:58:47 -0700 [thread overview] Message-ID: <20211105235852.3011900-1-atish.patra@wdc.com> (raw) 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 is based on base KVM series which is already part of the kvm-next[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 1 vcpu. Changes from v3->v4: 1. Fixed the commit text title. 2. Removed a redundant memory barrier from patch 4. 3. Replaced preempt_enable/disable with get_cpu/put_cpu. 4. Renamed the exixting implementation as v01 instead of legacy. Changes from v2->v3: 1. Rebased on the latest merged kvm series. 2. Dropped the reset extension patch because reset extension is not merged in kernel. However, my tree[3] still contains it in case anybody wants to test it. Changes from v1->v2: 1. Sent the patch 1 separately as it can merged independently. 2. Added Reset extension functionality. Tested on Qemu and Rocket core FPGA. [1] https://github.com/riscv/riscv-sbi-doc/blob/master/riscv-sbi.adoc [3] https://github.com/atishp04/linux/tree/kvm_sbi_v03_reset [4] https://github.com/atishp04/linux/tree/kvm_sbi_v03 Atish Patra (5): RISC-V: KVM: Mark the existing SBI implementation as v01 RISC-V: KVM: Reorganize SBI code by moving SBI v0.1 to its own file RISC-V: KVM: Add SBI v0.2 base extension RISC-V: KVM: Add v0.1 replacement SBI extensions defined in v02 RISC-V: KVM: Add SBI HSM extension in KVM arch/riscv/include/asm/kvm_vcpu_sbi.h | 33 +++++ arch/riscv/include/asm/sbi.h | 9 ++ arch/riscv/kvm/Makefile | 4 + arch/riscv/kvm/vcpu.c | 23 +++ arch/riscv/kvm/vcpu_sbi.c | 206 ++++++++++++-------------- arch/riscv/kvm/vcpu_sbi_base.c | 73 +++++++++ arch/riscv/kvm/vcpu_sbi_hsm.c | 107 +++++++++++++ arch/riscv/kvm/vcpu_sbi_replace.c | 136 +++++++++++++++++ arch/riscv/kvm/vcpu_sbi_v01.c | 129 ++++++++++++++++ 9 files changed, 609 insertions(+), 111 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_replace.c create mode 100644 arch/riscv/kvm/vcpu_sbi_v01.c -- 2.31.1
WARNING: multiple messages have this Message-ID (diff)
From: Atish Patra <atish.patra@wdc.com> To: linux-kernel@vger.kernel.org Cc: Atish Patra <atish.patra@wdc.com>, Anup Patel <anup.patel@wdc.com>, Heinrich Schuchardt <xypron.glpk@gmx.de>, kvm-riscv@lists.infradead.org, kvm@vger.kernel.org, linux-riscv@lists.infradead.org, Palmer Dabbelt <palmer@dabbelt.com>, Paul Walmsley <paul.walmsley@sifive.com>, Vincent Chen <vincent.chen@sifive.com>, pbonzini@redhat.com, Sean Christopherson <seanjc@google.com> Subject: [PATCH v4 0/5] Add SBI v0.2 support for KVM Date: Fri, 5 Nov 2021 16:58:47 -0700 [thread overview] Message-ID: <20211105235852.3011900-1-atish.patra@wdc.com> (raw) 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 is based on base KVM series which is already part of the kvm-next[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 1 vcpu. Changes from v3->v4: 1. Fixed the commit text title. 2. Removed a redundant memory barrier from patch 4. 3. Replaced preempt_enable/disable with get_cpu/put_cpu. 4. Renamed the exixting implementation as v01 instead of legacy. Changes from v2->v3: 1. Rebased on the latest merged kvm series. 2. Dropped the reset extension patch because reset extension is not merged in kernel. However, my tree[3] still contains it in case anybody wants to test it. Changes from v1->v2: 1. Sent the patch 1 separately as it can merged independently. 2. Added Reset extension functionality. Tested on Qemu and Rocket core FPGA. [1] https://github.com/riscv/riscv-sbi-doc/blob/master/riscv-sbi.adoc [3] https://github.com/atishp04/linux/tree/kvm_sbi_v03_reset [4] https://github.com/atishp04/linux/tree/kvm_sbi_v03 Atish Patra (5): RISC-V: KVM: Mark the existing SBI implementation as v01 RISC-V: KVM: Reorganize SBI code by moving SBI v0.1 to its own file RISC-V: KVM: Add SBI v0.2 base extension RISC-V: KVM: Add v0.1 replacement SBI extensions defined in v02 RISC-V: KVM: Add SBI HSM extension in KVM arch/riscv/include/asm/kvm_vcpu_sbi.h | 33 +++++ arch/riscv/include/asm/sbi.h | 9 ++ arch/riscv/kvm/Makefile | 4 + arch/riscv/kvm/vcpu.c | 23 +++ arch/riscv/kvm/vcpu_sbi.c | 206 ++++++++++++-------------- arch/riscv/kvm/vcpu_sbi_base.c | 73 +++++++++ arch/riscv/kvm/vcpu_sbi_hsm.c | 107 +++++++++++++ arch/riscv/kvm/vcpu_sbi_replace.c | 136 +++++++++++++++++ arch/riscv/kvm/vcpu_sbi_v01.c | 129 ++++++++++++++++ 9 files changed, 609 insertions(+), 111 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_replace.c create mode 100644 arch/riscv/kvm/vcpu_sbi_v01.c -- 2.31.1 _______________________________________________ linux-riscv mailing list linux-riscv@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-riscv
next reply other threads:[~2021-11-05 23:59 UTC|newest] Thread overview: 28+ messages / expand[flat|nested] mbox.gz Atom feed top 2021-11-05 23:58 Atish Patra [this message] 2021-11-05 23:58 ` [PATCH v4 0/5] Add SBI v0.2 support for KVM Atish Patra 2021-11-05 23:58 ` [PATCH v4 1/5] RISC-V: KVM: Mark the existing SBI implementation as v01 Atish Patra 2021-11-05 23:58 ` Atish Patra 2021-11-06 4:27 ` Heinrich Schuchardt 2021-11-06 4:27 ` Heinrich Schuchardt 2021-11-06 4:35 ` Anup Patel 2021-11-06 4:35 ` Anup Patel 2021-11-08 16:45 ` Atish Patra 2021-11-08 16:45 ` Atish Patra 2021-11-06 4:41 ` Anup Patel 2021-11-06 4:41 ` Anup Patel 2021-11-05 23:58 ` [PATCH v4 2/5] RISC-V: KVM: Reorganize SBI code by moving SBI v0.1 to its own file Atish Patra 2021-11-05 23:58 ` Atish Patra 2021-11-06 4:43 ` Anup Patel 2021-11-06 4:43 ` Anup Patel 2021-11-05 23:58 ` [PATCH v4 3/5] RISC-V: KVM: Add SBI v0.2 base extension Atish Patra 2021-11-05 23:58 ` Atish Patra 2021-11-06 4:45 ` Anup Patel 2021-11-06 4:45 ` Anup Patel 2021-11-05 23:58 ` [PATCH v4 4/5] RISC-V: KVM: Add v0.1 replacement SBI extensions defined in v02 Atish Patra 2021-11-05 23:58 ` Atish Patra 2021-11-06 4:46 ` Anup Patel 2021-11-06 4:46 ` Anup Patel 2021-11-05 23:58 ` [PATCH v4 5/5] RISC-V: KVM: Add SBI HSM extension in KVM Atish Patra 2021-11-05 23:58 ` Atish Patra 2021-11-06 4:50 ` Anup Patel 2021-11-06 4:50 ` Anup Patel
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=20211105235852.3011900-1-atish.patra@wdc.com \ --to=atish.patra@wdc.com \ --cc=anup.patel@wdc.com \ --cc=kvm-riscv@lists.infradead.org \ --cc=kvm@vger.kernel.org \ --cc=linux-kernel@vger.kernel.org \ --cc=linux-riscv@lists.infradead.org \ --cc=palmer@dabbelt.com \ --cc=paul.walmsley@sifive.com \ --cc=pbonzini@redhat.com \ --cc=seanjc@google.com \ --cc=vincent.chen@sifive.com \ --cc=xypron.glpk@gmx.de \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.