[PATCH 0/2] RISC-V: KVM: SBI system suspend support

Anup Patel anup at brainfault.org
Wed Dec 4 22:08:53 PST 2024


On Thu, Oct 17, 2024 at 1:15 PM Andrew Jones <ajones at ventanamicro.com> wrote:
>
> The SBI spec provides a specification for system suspend to RAM and Linux
> already supports invoking the SBI call for suspend to RAM when
> CONFIG_SUSPEND is selected. Implement support for the SBI call in KVM
> so guests may initiate a system suspend. However, since what a "system
> suspend" means for a VM may differ between VM providers, leave it up
> to the VMM to decide what to do. KVM only needs to ensure the entry
> criteria for system suspend (per the spec) is met and prepare things for
> the resume for when the VMM triggers it.
>
> Tested with this kvmtool branch [1]
>
> [1] https://github.com/jones-drew/kvmtool/commits/riscv/sbi-sys-susp/
>
>
> Andrew Jones (2):
>   RISC-V: KVM: Add SBI system suspend support
>   KVM: riscv: selftests: Add SBI SUSP to get-reg-list test

Queued this series for 6.14

Thanks,
Anup

>
>  arch/riscv/include/asm/kvm_vcpu_sbi.h         |  1 +
>  arch/riscv/include/uapi/asm/kvm.h             |  1 +
>  arch/riscv/kvm/Makefile                       |  1 +
>  arch/riscv/kvm/vcpu_sbi.c                     |  4 +
>  arch/riscv/kvm/vcpu_sbi_system.c              | 73 +++++++++++++++++++
>  .../selftests/kvm/riscv/get-reg-list.c        |  6 +-
>  6 files changed, 85 insertions(+), 1 deletion(-)
>  create mode 100644 arch/riscv/kvm/vcpu_sbi_system.c
>
> --
> 2.46.2
>



More information about the linux-riscv mailing list