Skip to content

RISC-V: KVM: SBI system suspend support

Andrew Jones kvm-riscv linux-riscv 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest2 patches 3 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/2RISC-V: KVM: Add SBI system suspend supportarch/riscv/include/asm/kvm_vcpu_sbi.h arch/riscv/include/uapi/asm/kvm.h arch/riscv/kvm/Makefile +2 more+80 -01 reply
2/2KVM: riscv: selftests: Add SBI SUSP to get-reg-list testtools/testing/selftests/kvm/riscv/get-reg-list.c+5 -11 reply

Reviews trailers per patch

All 2 patches have a Reviewed-by or Acked-by.

PatchAnup Patel
1/2R-b
2/2R-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v1 thread

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

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

 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
Signature · 1 line
2.46.2