public inbox for kvm@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/3] Improve instruction and CSR emulation in KVM RISC-V
@ 2022-06-10  5:05 Anup Patel
  2022-06-10  5:05 ` [PATCH 1/3] RISC-V: KVM: Factor-out instruction emulation into separate sources Anup Patel
                   ` (2 more replies)
  0 siblings, 3 replies; 6+ messages in thread
From: Anup Patel @ 2022-06-10  5:05 UTC (permalink / raw)
  To: Paolo Bonzini, Atish Patra
  Cc: Palmer Dabbelt, Paul Walmsley, Alistair Francis, Anup Patel, kvm,
	kvm-riscv, linux-riscv, linux-kernel, Anup Patel

Currently, the instruction emulation for MMIO traps and Virtual instruction
traps co-exist with general VCPU exit handling. The instruction and CSR
emulation will grow with upcoming SBI PMU, AIA, and Nested virtualization
in KVM RISC-V. In addition, we also need a mechanism to allow user-space
emulate certain CSRs under certain situation (example, host has AIA support
but user-space does not wants to use in-kernel AIA IMSIC and APLIC support).

This series improves instruction and CSR emulation in KVM RISC-V to make
it extensible based on above.

These patches can also be found in riscv_kvm_csr_v1 branch at:
https://github.com/avpatel/linux.git

Anup Patel (3):
  RISC-V: KVM: Factor-out instruction emulation into separate sources
  RISC-V: KVM: Add extensible system instruction emulation framework
  RISC-V: KVM: Add extensible CSR emulation framework

 arch/riscv/include/asm/kvm_host.h           |  16 +-
 arch/riscv/include/asm/kvm_vcpu_insn.h      |  48 ++
 arch/riscv/kvm/Makefile                     |   1 +
 arch/riscv/kvm/vcpu.c                       |  11 +
 arch/riscv/kvm/vcpu_exit.c                  | 490 +----------------
 arch/riscv/kvm/{vcpu_exit.c => vcpu_insn.c} | 560 +++++++++++---------
 include/uapi/linux/kvm.h                    |   8 +
 7 files changed, 382 insertions(+), 752 deletions(-)
 create mode 100644 arch/riscv/include/asm/kvm_vcpu_insn.h
 copy arch/riscv/kvm/{vcpu_exit.c => vcpu_insn.c} (64%)

-- 
2.34.1


^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2022-06-13 10:00 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-06-10  5:05 [PATCH 0/3] Improve instruction and CSR emulation in KVM RISC-V Anup Patel
2022-06-10  5:05 ` [PATCH 1/3] RISC-V: KVM: Factor-out instruction emulation into separate sources Anup Patel
2022-06-10  5:05 ` [PATCH 2/3] RISC-V: KVM: Add extensible system instruction emulation framework Anup Patel
2022-06-12 15:31   ` Liu Zhao
2022-06-13  9:59     ` Anup Patel
2022-06-10  5:05 ` [PATCH 3/3] RISC-V: KVM: Add extensible CSR " Anup Patel

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox