#
328f0879 |
| 18-Nov-2023 |
Anup Patel <apatel@ventanamicro.com> |
riscv: Use AIA in-kernel irqchip whenever KVM RISC-V supports
The KVM RISC-V kernel module supports AIA in-kernel irqchip when underlying host has AIA support. We detect and use AIA in-kernel irqchi
riscv: Use AIA in-kernel irqchip whenever KVM RISC-V supports
The KVM RISC-V kernel module supports AIA in-kernel irqchip when underlying host has AIA support. We detect and use AIA in-kernel irqchip whenever possible otherwise we fallback to PLIC emulated in user-space.
Signed-off-by: Anup Patel <apatel@ventanamicro.com> Reviewed-by: Andrew Jones <ajones@ventanamicro.com> Link: https://lore.kernel.org/r/20231118132847.758785-6-apatel@ventanamicro.com Signed-off-by: Will Deacon <will@kernel.org>
show more ...
|
#
17aab306 |
| 18-Nov-2023 |
Anup Patel <apatel@ventanamicro.com> |
riscv: Add IRQFD support for in-kernel AIA irqchip
To use irqfd with in-kernel AIA irqchip, we add custom irq__add_irqfd and irq__del_irqfd functions. This allows us to defer actual KVM_IRQFD ioctl(
riscv: Add IRQFD support for in-kernel AIA irqchip
To use irqfd with in-kernel AIA irqchip, we add custom irq__add_irqfd and irq__del_irqfd functions. This allows us to defer actual KVM_IRQFD ioctl() until AIA irqchip is initialized by KVMTOOL.
Signed-off-by: Anup Patel <apatel@ventanamicro.com> Reviewed-by: Andrew Jones <ajones@ventanamicro.com> Link: https://lore.kernel.org/r/20231118132847.758785-5-apatel@ventanamicro.com Signed-off-by: Will Deacon <will@kernel.org>
show more ...
|
#
0dff3501 |
| 18-Nov-2023 |
Anup Patel <apatel@ventanamicro.com> |
riscv: Make irqchip support pluggable
We will be having different types of irqchip: 1) PLIC emulated by user-space 2) AIA APLIC and IMSIC provided by in-kernel KVM module
To support above, we de-co
riscv: Make irqchip support pluggable
We will be having different types of irqchip: 1) PLIC emulated by user-space 2) AIA APLIC and IMSIC provided by in-kernel KVM module
To support above, we de-couple PLIC specific code from generic RISC-V code (such as FDT generation) so that we can easily add other types of irqchip. As part of the PLIC de-coupling, we introduce various riscv_irqchip_xyz global variable to describe the chosen irqchip hence PLIC is no longer required to register itself using device__register().
Signed-off-by: Anup Patel <apatel@ventanamicro.com> Reviewed-by: Andrew Jones <ajones@ventanamicro.com> Link: https://lore.kernel.org/r/20231118132847.758785-4-apatel@ventanamicro.com Signed-off-by: Will Deacon <will@kernel.org>
show more ...
|
#
9b46ebc5 |
| 20-Mar-2023 |
Rajnesh Kanwal <rkanwal@rivosinc.com> |
Add virtio-transport option and deprecate force-pci and virtio-legacy.
This is a follow-up patch for [0] which proposed the --force-pci option for riscv. As per the discussion it was concluded to ad
Add virtio-transport option and deprecate force-pci and virtio-legacy.
This is a follow-up patch for [0] which proposed the --force-pci option for riscv. As per the discussion it was concluded to add virtio-tranport option taking in four options (pci, pci-legacy, mmio, mmio-legacy).
With this change force-pci and virtio-legacy are both deprecated and arm's default transport changes from MMIO to PCI as agreed in [0]. This is also true for riscv.
Nothing changes for other architectures.
[0]: https://lore.kernel.org/all/20230118172007.408667-1-rkanwal@rivosinc.com/
Signed-off-by: Rajnesh Kanwal <rkanwal@rivosinc.com> Link: https://lore.kernel.org/r/20230320143344.404307-1-rkanwal@rivosinc.com Signed-off-by: Will Deacon <will@kernel.org>
show more ...
|
#
2f030d28 |
| 03-Feb-2023 |
Rajnesh Kanwal <rkanwal@rivosinc.com> |
riscv: Move serial and rtc from IO port space to MMIO area.
The default serial and rtc IO region overlaps with PCI IO bar region leading bar 0 activation to fail. Moving these devices to MMIO region
riscv: Move serial and rtc from IO port space to MMIO area.
The default serial and rtc IO region overlaps with PCI IO bar region leading bar 0 activation to fail. Moving these devices to MMIO region similar to ARM.
Given serial has been moved from 0x3f8 to 0x10000000, this requires us to now pass earlycon=uart8250,mmio,0x10000000 from cmdline rather than earlycon=uart8250,mmio,0x3f8.
To avoid the need to change the address every time the tool is updated, we can also just pass "earlycon" from cmdline and guest then finds the type and base address by following the Device Tree's stdout-path property.
Signed-off-by: Rajnesh Kanwal <rkanwal@rivosinc.com> Tested-by: Atish Patra <atishp@rivosinc.com> Reviewed-by: Atish Patra <atishp@rivosinc.com> Link: https://lore.kernel.org/r/20230203122934.18714-1-rkanwal@rivosinc.com Signed-off-by: Will Deacon <will@kernel.org>
show more ...
|
#
5fe5eb04 |
| 01-Jul-2022 |
Jean-Philippe Brucker <jean-philippe.brucker@arm.com> |
virtio: Add support for modern virtio-mmio
Add modern MMIO transport to virtio, make it the default. Legacy transport can be enabled with --virtio-legacy. The main change for MMIO is the queue addre
virtio: Add support for modern virtio-mmio
Add modern MMIO transport to virtio, make it the default. Legacy transport can be enabled with --virtio-legacy. The main change for MMIO is the queue addresses. They are now 64-bit addresses instead of 32-bit PFNs. Apart from that all changes for supporting modern devices are already implemented.
Signed-off-by: Jean-Philippe Brucker <jean-philippe.brucker@arm.com> Link: https://lore.kernel.org/r/20220701142434.75170-11-jean-philippe.brucker@arm.com Signed-off-by: Will Deacon <will@kernel.org>
show more ...
|
#
cdd7d8cc |
| 19-Nov-2021 |
Anup Patel <anup.patel@wdc.com> |
riscv: Generate PCI host DT node
This patch extends FDT generation to generate PCI host DT node.
Of course, PCI host for Guest/VM is not useful at the moment because it's mostly for PCI pass-throug
riscv: Generate PCI host DT node
This patch extends FDT generation to generate PCI host DT node.
Of course, PCI host for Guest/VM is not useful at the moment because it's mostly for PCI pass-through and we don't have IOMMU and interrupt routing available for KVM RISC-V. In future, we might be able to use PCI host for VirtIO PCI transport or other software emulated PCI devices.
Signed-off-by: Anup Patel <anup.patel@wdc.com> Link: https://lore.kernel.org/r/20211119124515.89439-9-anup.patel@wdc.com Signed-off-by: Will Deacon <will@kernel.org>
show more ...
|
#
7c9aac00 |
| 19-Nov-2021 |
Anup Patel <anup.patel@wdc.com> |
riscv: Generate FDT at runtime for Guest/VM
We generate FDT at runtime for RISC-V Guest/VM so that KVMTOOL users don't have to pass FDT separately via command-line parameters.
Also, we provide "--d
riscv: Generate FDT at runtime for Guest/VM
We generate FDT at runtime for RISC-V Guest/VM so that KVMTOOL users don't have to pass FDT separately via command-line parameters.
Also, we provide "--dump-dtb <filename>" command-line option to dump generated FDT into a file for debugging purpose.
Signed-off-by: Atish Patra <atish.patra@wdc.com> Signed-off-by: Anup Patel <anup.patel@wdc.com> Link: https://lore.kernel.org/r/20211119124515.89439-7-anup.patel@wdc.com Signed-off-by: Will Deacon <will@kernel.org>
show more ...
|
#
762224e4 |
| 19-Nov-2021 |
Anup Patel <anup.patel@wdc.com> |
riscv: Add PLIC device emulation
The PLIC (platform level interrupt controller) manages peripheral interrupts in RISC-V world. The per-CPU interrupts are managed using CPU CSRs hence virtualized in-
riscv: Add PLIC device emulation
The PLIC (platform level interrupt controller) manages peripheral interrupts in RISC-V world. The per-CPU interrupts are managed using CPU CSRs hence virtualized in-kernel by KVM RISC-V.
This patch adds PLIC device emulation for KVMTOOL RISC-V.
Signed-off-by: Vincent Chen <vincent.chen@sifive.com> [For PLIC context CLAIM register emulation] Signed-off-by: Anup Patel <anup.patel@wdc.com> Link: https://lore.kernel.org/r/20211119124515.89439-6-anup.patel@wdc.com Signed-off-by: Will Deacon <will@kernel.org>
show more ...
|
#
867159a7 |
| 19-Nov-2021 |
Anup Patel <anup.patel@wdc.com> |
riscv: Implement Guest/VM arch functions
This patch implements all kvm__arch_<xyz> Guest/VM arch functions.
These functions mostly deal with: 1. Guest/VM RAM initialization 2. Updating terminals on
riscv: Implement Guest/VM arch functions
This patch implements all kvm__arch_<xyz> Guest/VM arch functions.
These functions mostly deal with: 1. Guest/VM RAM initialization 2. Updating terminals on character read 3. Loading kernel and initrd images
Firmware loading is not implemented currently because initially we will be booting kernel directly without any bootloader. In future, we will certainly support firmware loading.
Signed-off-by: Anup Patel <anup.patel@wdc.com> Link: https://lore.kernel.org/r/20211119124515.89439-4-anup.patel@wdc.com Signed-off-by: Will Deacon <will@kernel.org>
show more ...
|
#
2e996783 |
| 19-Nov-2021 |
Anup Patel <anup.patel@wdc.com> |
riscv: Initial skeletal support
This patch adds initial skeletal KVMTOOL RISC-V support which just compiles for RV32 and RV64 host.
Signed-off-by: Anup Patel <anup.patel@wdc.com> Link: https://lore
riscv: Initial skeletal support
This patch adds initial skeletal KVMTOOL RISC-V support which just compiles for RV32 and RV64 host.
Signed-off-by: Anup Patel <anup.patel@wdc.com> Link: https://lore.kernel.org/r/20211119124515.89439-3-anup.patel@wdc.com Signed-off-by: Will Deacon <will@kernel.org>
show more ...
|