From: Anup Patel <apatel@ventanamicro.com>
To: Paolo Bonzini <pbonzini@redhat.com>, Atish Patra <atishp@atishpatra.org>
Cc: Palmer Dabbelt <palmer@dabbelt.com>,
Paul Walmsley <paul.walmsley@sifive.com>,
Alistair Francis <Alistair.Francis@wdc.com>,
Anup Patel <anup@brainfault.org>,
kvm@vger.kernel.org, kvm-riscv@lists.infradead.org,
linux-riscv@lists.infradead.org, linux-kernel@vger.kernel.org,
Anup Patel <apatel@ventanamicro.com>
Subject: [PATCH 0/3] Improve instruction and CSR emulation in KVM RISC-V
Date: Fri, 10 Jun 2022 10:35:52 +0530 [thread overview]
Message-ID: <20220610050555.288251-1-apatel@ventanamicro.com> (raw)
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
next reply other threads:[~2022-06-10 5:06 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-06-10 5:05 Anup Patel [this message]
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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20220610050555.288251-1-apatel@ventanamicro.com \
--to=apatel@ventanamicro.com \
--cc=Alistair.Francis@wdc.com \
--cc=anup@brainfault.org \
--cc=atishp@atishpatra.org \
--cc=kvm-riscv@lists.infradead.org \
--cc=kvm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-riscv@lists.infradead.org \
--cc=palmer@dabbelt.com \
--cc=paul.walmsley@sifive.com \
--cc=pbonzini@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox