From: Anup Patel <apatel@ventanamicro.com>
To: kvm-riscv@lists.infradead.org
Subject: [PATCH v3 0/8] RISC-V KVM virtualize AIA CSRs
Date: Mon, 3 Apr 2023 15:03:02 +0530 [thread overview]
Message-ID: <20230403093310.2271142-1-apatel@ventanamicro.com> (raw)
The RISC-V AIA specification is now frozen as-per the RISC-V international
process. The latest frozen specifcation can be found at:
https://github.com/riscv/riscv-aia/releases/download/1.0-RC3/riscv-interrupts-1.0-RC3.pdf
This series implements first phase of AIA virtualization which targets
virtualizing AIA CSRs. This also provides a foundation for the second
phase of AIA virtualization which will target in-kernel AIA irqchip
(including both IMSIC and APLIC).
The first two patches are shared with the "Linux RISC-V AIA Support"
series which adds AIA driver support.
To test this series, use AIA drivers from the "Linux RISC-V AIA Support"
series and use KVMTOOL from the riscv_aia_v1 branch at:
https://github.com/avpatel/kvmtool.git
These patches can also be found in the riscv_kvm_aia_csr_v3 branch at:
https://github.com/avpatel/linux.git
Changes since v2:
- Rebased on Linux-6.3-rc5
- Split PATCH5 into two separate patches as suggested by Atish.
Changes since v1:
- Addressed from Drew and Conor in PATCH1
- Use alphabetical ordering for SMAIA and SSAIA enum in PATCH2
- Use GENMASK() in PATCH3
Anup Patel (8):
RISC-V: Add AIA related CSR defines
RISC-V: Detect AIA CSRs from ISA string
RISC-V: KVM: Drop the _MASK suffix from hgatp.VMID mask defines
RISC-V: KVM: Initial skeletal support for AIA
RISC-V: KVM: Implement subtype for CSR ONE_REG interface
RISC-V: KVM: Add ONE_REG interface for AIA CSRs
RISC-V: KVM: Virtualize per-HART AIA CSRs
RISC-V: KVM: Implement guest external interrupt line management
arch/riscv/include/asm/csr.h | 107 ++++-
arch/riscv/include/asm/hwcap.h | 8 +
arch/riscv/include/asm/kvm_aia.h | 137 +++++++
arch/riscv/include/asm/kvm_host.h | 14 +-
arch/riscv/include/uapi/asm/kvm.h | 18 +-
arch/riscv/kernel/cpu.c | 2 +
arch/riscv/kernel/cpufeature.c | 2 +
arch/riscv/kvm/Makefile | 1 +
arch/riscv/kvm/aia.c | 624 ++++++++++++++++++++++++++++++
arch/riscv/kvm/main.c | 23 +-
arch/riscv/kvm/mmu.c | 3 +-
arch/riscv/kvm/vcpu.c | 185 +++++++--
arch/riscv/kvm/vcpu_insn.c | 1 +
arch/riscv/kvm/vm.c | 4 +
arch/riscv/kvm/vmid.c | 4 +-
15 files changed, 1077 insertions(+), 56 deletions(-)
create mode 100644 arch/riscv/include/asm/kvm_aia.h
create mode 100644 arch/riscv/kvm/aia.c
--
2.34.1
WARNING: multiple messages have this Message-ID (diff)
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>,
Andrew Jones <ajones@ventanamicro.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 v3 0/8] RISC-V KVM virtualize AIA CSRs
Date: Mon, 3 Apr 2023 15:03:02 +0530 [thread overview]
Message-ID: <20230403093310.2271142-1-apatel@ventanamicro.com> (raw)
The RISC-V AIA specification is now frozen as-per the RISC-V international
process. The latest frozen specifcation can be found at:
https://github.com/riscv/riscv-aia/releases/download/1.0-RC3/riscv-interrupts-1.0-RC3.pdf
This series implements first phase of AIA virtualization which targets
virtualizing AIA CSRs. This also provides a foundation for the second
phase of AIA virtualization which will target in-kernel AIA irqchip
(including both IMSIC and APLIC).
The first two patches are shared with the "Linux RISC-V AIA Support"
series which adds AIA driver support.
To test this series, use AIA drivers from the "Linux RISC-V AIA Support"
series and use KVMTOOL from the riscv_aia_v1 branch at:
https://github.com/avpatel/kvmtool.git
These patches can also be found in the riscv_kvm_aia_csr_v3 branch at:
https://github.com/avpatel/linux.git
Changes since v2:
- Rebased on Linux-6.3-rc5
- Split PATCH5 into two separate patches as suggested by Atish.
Changes since v1:
- Addressed from Drew and Conor in PATCH1
- Use alphabetical ordering for SMAIA and SSAIA enum in PATCH2
- Use GENMASK() in PATCH3
Anup Patel (8):
RISC-V: Add AIA related CSR defines
RISC-V: Detect AIA CSRs from ISA string
RISC-V: KVM: Drop the _MASK suffix from hgatp.VMID mask defines
RISC-V: KVM: Initial skeletal support for AIA
RISC-V: KVM: Implement subtype for CSR ONE_REG interface
RISC-V: KVM: Add ONE_REG interface for AIA CSRs
RISC-V: KVM: Virtualize per-HART AIA CSRs
RISC-V: KVM: Implement guest external interrupt line management
arch/riscv/include/asm/csr.h | 107 ++++-
arch/riscv/include/asm/hwcap.h | 8 +
arch/riscv/include/asm/kvm_aia.h | 137 +++++++
arch/riscv/include/asm/kvm_host.h | 14 +-
arch/riscv/include/uapi/asm/kvm.h | 18 +-
arch/riscv/kernel/cpu.c | 2 +
arch/riscv/kernel/cpufeature.c | 2 +
arch/riscv/kvm/Makefile | 1 +
arch/riscv/kvm/aia.c | 624 ++++++++++++++++++++++++++++++
arch/riscv/kvm/main.c | 23 +-
arch/riscv/kvm/mmu.c | 3 +-
arch/riscv/kvm/vcpu.c | 185 +++++++--
arch/riscv/kvm/vcpu_insn.c | 1 +
arch/riscv/kvm/vm.c | 4 +
arch/riscv/kvm/vmid.c | 4 +-
15 files changed, 1077 insertions(+), 56 deletions(-)
create mode 100644 arch/riscv/include/asm/kvm_aia.h
create mode 100644 arch/riscv/kvm/aia.c
--
2.34.1
_______________________________________________
linux-riscv mailing list
linux-riscv@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-riscv
WARNING: multiple messages have this Message-ID (diff)
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>,
Andrew Jones <ajones@ventanamicro.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 v3 0/8] RISC-V KVM virtualize AIA CSRs
Date: Mon, 3 Apr 2023 15:03:02 +0530 [thread overview]
Message-ID: <20230403093310.2271142-1-apatel@ventanamicro.com> (raw)
The RISC-V AIA specification is now frozen as-per the RISC-V international
process. The latest frozen specifcation can be found at:
https://github.com/riscv/riscv-aia/releases/download/1.0-RC3/riscv-interrupts-1.0-RC3.pdf
This series implements first phase of AIA virtualization which targets
virtualizing AIA CSRs. This also provides a foundation for the second
phase of AIA virtualization which will target in-kernel AIA irqchip
(including both IMSIC and APLIC).
The first two patches are shared with the "Linux RISC-V AIA Support"
series which adds AIA driver support.
To test this series, use AIA drivers from the "Linux RISC-V AIA Support"
series and use KVMTOOL from the riscv_aia_v1 branch at:
https://github.com/avpatel/kvmtool.git
These patches can also be found in the riscv_kvm_aia_csr_v3 branch at:
https://github.com/avpatel/linux.git
Changes since v2:
- Rebased on Linux-6.3-rc5
- Split PATCH5 into two separate patches as suggested by Atish.
Changes since v1:
- Addressed from Drew and Conor in PATCH1
- Use alphabetical ordering for SMAIA and SSAIA enum in PATCH2
- Use GENMASK() in PATCH3
Anup Patel (8):
RISC-V: Add AIA related CSR defines
RISC-V: Detect AIA CSRs from ISA string
RISC-V: KVM: Drop the _MASK suffix from hgatp.VMID mask defines
RISC-V: KVM: Initial skeletal support for AIA
RISC-V: KVM: Implement subtype for CSR ONE_REG interface
RISC-V: KVM: Add ONE_REG interface for AIA CSRs
RISC-V: KVM: Virtualize per-HART AIA CSRs
RISC-V: KVM: Implement guest external interrupt line management
arch/riscv/include/asm/csr.h | 107 ++++-
arch/riscv/include/asm/hwcap.h | 8 +
arch/riscv/include/asm/kvm_aia.h | 137 +++++++
arch/riscv/include/asm/kvm_host.h | 14 +-
arch/riscv/include/uapi/asm/kvm.h | 18 +-
arch/riscv/kernel/cpu.c | 2 +
arch/riscv/kernel/cpufeature.c | 2 +
arch/riscv/kvm/Makefile | 1 +
arch/riscv/kvm/aia.c | 624 ++++++++++++++++++++++++++++++
arch/riscv/kvm/main.c | 23 +-
arch/riscv/kvm/mmu.c | 3 +-
arch/riscv/kvm/vcpu.c | 185 +++++++--
arch/riscv/kvm/vcpu_insn.c | 1 +
arch/riscv/kvm/vm.c | 4 +
arch/riscv/kvm/vmid.c | 4 +-
15 files changed, 1077 insertions(+), 56 deletions(-)
create mode 100644 arch/riscv/include/asm/kvm_aia.h
create mode 100644 arch/riscv/kvm/aia.c
--
2.34.1
next reply other threads:[~2023-04-03 9:33 UTC|newest]
Thread overview: 90+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-04-03 9:33 Anup Patel [this message]
2023-04-03 9:33 ` [PATCH v3 0/8] RISC-V KVM virtualize AIA CSRs Anup Patel
2023-04-03 9:33 ` Anup Patel
2023-04-03 9:33 ` [PATCH v3 1/8] RISC-V: Add AIA related CSR defines Anup Patel
2023-04-03 9:33 ` Anup Patel
2023-04-03 9:33 ` Anup Patel
2023-04-03 9:33 ` [PATCH v3 2/8] RISC-V: Detect AIA CSRs from ISA string Anup Patel
2023-04-03 9:33 ` Anup Patel
2023-04-03 9:33 ` Anup Patel
2023-04-03 9:39 ` Conor Dooley
2023-04-03 9:40 ` Conor Dooley
2023-04-03 9:39 ` Conor Dooley
2023-04-03 12:05 ` Anup Patel
2023-04-03 12:05 ` Anup Patel
2023-04-03 12:05 ` Anup Patel
2023-04-03 9:33 ` [PATCH v3 3/8] RISC-V: KVM: Drop the _MASK suffix from hgatp.VMID mask defines Anup Patel
2023-04-03 9:33 ` Anup Patel
2023-04-03 9:33 ` Anup Patel
2023-04-03 9:33 ` [PATCH v3 4/8] RISC-V: KVM: Initial skeletal support for AIA Anup Patel
2023-04-03 9:33 ` Anup Patel
2023-04-03 9:33 ` Anup Patel
2023-04-03 12:00 ` Andrew Jones
2023-04-03 12:00 ` Andrew Jones
2023-04-03 12:00 ` Andrew Jones
2023-04-03 23:49 ` Atish Patra
2023-04-03 23:49 ` Atish Patra
2023-04-03 23:49 ` Atish Patra
2023-04-04 3:22 ` Anup Patel
2023-04-04 3:22 ` Anup Patel
2023-04-04 3:22 ` Anup Patel
2023-04-03 9:33 ` [PATCH v3 5/8] RISC-V: KVM: Implement subtype for CSR ONE_REG interface Anup Patel
2023-04-03 9:33 ` Anup Patel
2023-04-03 9:33 ` Anup Patel
2023-04-03 12:18 ` Andrew Jones
2023-04-03 12:18 ` Andrew Jones
2023-04-03 12:18 ` Andrew Jones
2023-04-04 0:54 ` Atish Patra
2023-04-04 0:54 ` Atish Patra
2023-04-04 0:54 ` Atish Patra
2023-04-03 9:33 ` [PATCH v3 6/8] RISC-V: KVM: Add ONE_REG interface for AIA CSRs Anup Patel
2023-04-03 9:33 ` Anup Patel
2023-04-03 9:33 ` Anup Patel
2023-04-03 11:31 ` Andrew Jones
2023-04-03 11:31 ` Andrew Jones
2023-04-03 11:31 ` Andrew Jones
2023-04-03 12:04 ` Anup Patel
2023-04-03 12:04 ` Anup Patel
2023-04-03 12:04 ` Anup Patel
2023-04-03 12:23 ` Andrew Jones
2023-04-03 12:23 ` Andrew Jones
2023-04-03 12:23 ` Andrew Jones
2023-04-04 11:52 ` Andrew Jones
2023-04-04 11:52 ` Andrew Jones
2023-04-04 11:52 ` Andrew Jones
2023-04-04 11:58 ` Conor Dooley
2023-04-04 11:59 ` Conor Dooley
2023-04-04 11:58 ` Conor Dooley
2023-04-05 9:28 ` Conor Dooley
2023-04-05 9:28 ` Conor Dooley
2023-04-05 9:28 ` Conor Dooley
2023-04-04 12:03 ` Andrew Jones
2023-04-04 12:03 ` Andrew Jones
2023-04-04 12:03 ` Andrew Jones
2023-04-03 12:27 ` Andrew Jones
2023-04-03 12:27 ` Andrew Jones
2023-04-03 12:27 ` Andrew Jones
2023-04-04 0:55 ` Atish Patra
2023-04-04 0:55 ` Atish Patra
2023-04-04 0:55 ` Atish Patra
2023-04-03 9:33 ` [PATCH v3 7/8] RISC-V: KVM: Virtualize per-HART " Anup Patel
2023-04-03 9:33 ` Anup Patel
2023-04-03 9:33 ` Anup Patel
2023-04-03 16:37 ` Andrew Jones
2023-04-03 16:37 ` Andrew Jones
2023-04-03 16:37 ` Andrew Jones
2023-04-04 13:31 ` Anup Patel
2023-04-04 13:31 ` Anup Patel
2023-04-04 13:31 ` Anup Patel
2023-04-04 13:54 ` Anup Patel
2023-04-04 13:54 ` Anup Patel
2023-04-04 13:54 ` Anup Patel
2023-04-03 9:33 ` [PATCH v3 8/8] RISC-V: KVM: Implement guest external interrupt line management Anup Patel
2023-04-03 9:33 ` Anup Patel
2023-04-03 9:33 ` Anup Patel
2023-04-04 12:45 ` Andrew Jones
2023-04-04 12:45 ` Andrew Jones
2023-04-04 12:45 ` Andrew Jones
2023-04-04 13:52 ` Anup Patel
2023-04-04 13:52 ` Anup Patel
2023-04-04 13:52 ` 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=20230403093310.2271142-1-apatel@ventanamicro.com \
--to=apatel@ventanamicro.com \
--cc=kvm-riscv@lists.infradead.org \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.