linux-xiaomi-chiron/arch/riscv/include/uapi/asm
Anup Patel cce69aff68 RISC-V: KVM: Implement VCPU interrupts and requests handling
This patch implements VCPU interrupts and requests which are both
asynchronous events.

The VCPU interrupts can be set/unset using KVM_INTERRUPT ioctl from
user-space. In future, the in-kernel IRQCHIP emulation will use
kvm_riscv_vcpu_set_interrupt() and kvm_riscv_vcpu_unset_interrupt()
functions to set/unset VCPU interrupts.

Important VCPU requests implemented by this patch are:
KVM_REQ_SLEEP       - set whenever VCPU itself goes to sleep state
KVM_REQ_VCPU_RESET  - set whenever VCPU reset is requested

The WFI trap-n-emulate (added later) will use KVM_REQ_SLEEP request
and kvm_riscv_vcpu_has_interrupt() function.

The KVM_REQ_VCPU_RESET request will be used by SBI emulation (added
later) to power-up a VCPU in power-off state. The user-space can use
the GET_MPSTATE/SET_MPSTATE ioctls to get/set power state of a VCPU.

Signed-off-by: Anup Patel <anup.patel@wdc.com>
Acked-by: Paolo Bonzini <pbonzini@redhat.com>
Reviewed-by: Paolo Bonzini <pbonzini@redhat.com>
Reviewed-by: Alexander Graf <graf@amazon.com>
Acked-by: Palmer Dabbelt <palmerdabbelt@google.com>
2021-10-04 15:42:43 +05:30
..
auxvec.h riscv: Add cache information in AUX vector 2020-09-15 18:46:08 -07:00
bitsperlong.h treewide: add "WITH Linux-syscall-note" to SPDX tag of uapi headers 2019-07-25 11:05:10 +02:00
bpf_perf_event.h riscv, bpf: Add missing uapi header for BPF_PROG_TYPE_PERF_EVENT programs 2019-12-19 16:03:31 +01:00
byteorder.h treewide: add "WITH Linux-syscall-note" to SPDX tag of uapi headers 2019-07-25 11:05:10 +02:00
elf.h riscv: clean up the macro format in each header file 2019-11-12 12:04:52 -08:00
hwcap.h riscv: Fix typo in asm/hwcap.h uapi header 2020-07-30 11:37:38 -07:00
Kbuild treewide: Add SPDX license identifier - Kbuild 2019-05-30 11:32:33 -07:00
kvm.h RISC-V: KVM: Implement VCPU interrupts and requests handling 2021-10-04 15:42:43 +05:30
perf_regs.h riscv: Add support for perf registers sampling 2019-09-05 00:48:58 -07:00
ptrace.h treewide: add "WITH Linux-syscall-note" to SPDX tag of uapi headers 2019-07-25 11:05:10 +02:00
sigcontext.h treewide: add "WITH Linux-syscall-note" to SPDX tag of uapi headers 2019-07-25 11:05:10 +02:00
ucontext.h riscv: clean up the macro format in each header file 2019-11-12 12:04:52 -08:00
unistd.h Replace HTTP links with HTTPS ones: RISC-V 2020-07-30 11:37:40 -07:00