[PATCH v4 0/2] KVM: RISC-V: Add CPU PM notifier for non-retention idle states
Yong-Xuan Wang <[email protected]> Tue, 21 Jul 2026 22:52:01 -0700
| Newsgroups | org.infradead.lists.kvm-riscv,org.infradead.lists.linux-riscv,org.kernel.vger.kvm,org.kernel.vger.linux-kernel |
|---|---|
| Message-ID | <[email protected]> |
This series adds CPU_PM notifier support to save and restore hypervisor CSR state when CPUs enter non-retention idle states where the CPU domain is powered off. Patch 1 fixes a VCPU cache invalidation bug that could cause incorrect CSR restoration after power state transitions. Patch 2 implements the CPU_PM notifier to handle CSR save/restore during CPU idle, completing KVM's power management coverage alongside existing CPU hotplug and system suspend mechanisms. --- Changes in v4: - Remove the system_state checking (sashiko) - Link to v3: https://patch.msgid.link/[email protected] Changes in v3: - Remove the error kvm_riscv_nacl_disable() call in kvm_riscv_csr_disable() (sashiko) - Unregister CPU PM notifier first in riscv_kvm_exit() (sashiko) - Link to v2: https://patch.msgid.link/[email protected] Changes in v2: - Add patch 1 force restore VCPU after power state transitions (sashiko) - Added CPU_PM_ENTER_FAILED event handling (sashiko) - Optimized HGEIE save/restore with saved_value field (sashiko) - Fixed HIE CSR restoration in lightweight idle resume path (sashiko) - Link to v1: https://patch.msgid.link/[email protected] --- To: Anup Patel <[email protected]> To: Atish Patra <[email protected]> To: Paul Walmsley <[email protected]> To: Palmer Dabbelt <[email protected]> To: Albert Ou <[email protected]> To: Alexandre Ghiti <[email protected]> To: Radim Krčmář <[email protected]> To: Andrew Jones <[email protected]> To: Nutty Liu <[email protected]> To: Jinyu Tang <[email protected]> Cc: [email protected] Cc: [email protected] Cc: [email protected] Cc: [email protected] Cc: [email protected] Cc: [email protected] Cc: [email protected] --- Yong-Xuan Wang (2): KVM: RISC-V: Clear former VCPU cache on virtualization disable KVM: RISC-V: Add CPU PM notifier for non-retention idle states arch/riscv/include/asm/kvm_aia.h | 15 +++- arch/riscv/include/asm/kvm_host.h | 2 + arch/riscv/kvm/aia.c | 144 +++++++++++++++++++++----------------- arch/riscv/kvm/main.c | 89 ++++++++++++++++++----- arch/riscv/kvm/vcpu.c | 11 +++ 5 files changed, 178 insertions(+), 83 deletions(-) --- base-commit: 52738352a6f29279e15285fcb7b50241ef867e27 change-id: 20260624-kvm-cpu-pm-94141aecd5fa -- kvm-riscv mailing list [email protected] http://lists.infradead.org/mailman/listinfo/kvm-riscv