diff mbox series

[1/3] riscv: qemu: Enable booting from NVMe

Message ID CA+eeCSMKifhHwf+oYm-vamSyimoAycEN_U5RZj3bCX3Q5qsdwQ@mail.gmail.com
State Changes Requested
Delegated to: Andes
Headers show
Series [1/3] riscv: qemu: Enable booting from NVMe | expand

Commit Message

Eva Kurchatova July 17, 2024, 6:22 p.m. UTC
From da876ced5ff607a4f21e30ab26fb1a972af56570 Mon Sep 17 00:00:00 2001
From: LekKit <50500857+LekKit@users.noreply.github.com>
Date: Wed, 17 Jul 2024 20:31:21 +0300
Subject: [PATCH 1/3] riscv: qemu: Enable booting from NVMe

QEMU supports NVMe devices, but U-Boot only tries to boot from Virtio.
This is problematic when explicitly using NVMe, so fix that.

Additionally, RVVM virtual machine is almost fully compatible with QEMU,
except it only implements NVMe drives instead of VirtIO.
---
 include/configs/qemu-riscv.h | 1 +
 1 file changed, 1 insertion(+)

Comments

Eva Kurchatova July 17, 2024, 6:24 p.m. UTC | #1
From 2f016333edcf18f520970c5ef02fcaa8d2b1b8f0 Mon Sep 17 00:00:00 2001
From: LekKit <50500857+LekKit@users.noreply.github.com>
Date: Wed, 17 Jul 2024 20:39:09 +0300
Subject: [PATCH 2/3] riscv: qemu: Enable EFI framebuffer

Enable framebuffer for better virtual machine integration.
Some guests need EFI FB to work properly.
---
 board/emulation/qemu-riscv/Kconfig | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/board/emulation/qemu-riscv/Kconfig
b/board/emulation/qemu-riscv/Kconfig
index 9538c66e..012ac14a 100644
--- a/board/emulation/qemu-riscv/Kconfig
+++ b/board/emulation/qemu-riscv/Kconfig
@@ -58,6 +58,8 @@ config BOARD_SPECIFIC_OPTIONS # dummy
  imply E1000
  imply PCI
  imply NVME_PCI
+ imply VIDEO
+ imply VIDEO_SIMPLE
  imply PCIE_ECAM_GENERIC
  imply DM_RNG
  imply DM_RTC
Eva Kurchatova July 17, 2024, 6:24 p.m. UTC | #2
From e6087bb6d1f25e8a5fddd4255fc07a957312b406 Mon Sep 17 00:00:00 2001
From: LekKit <50500857+LekKit@users.noreply.github.com>
Date: Wed, 17 Jul 2024 20:41:41 +0300
Subject: [PATCH 3/3] riscv: qemu: Explicitly advertise RVVM support

This patch series enables full RVVM virtual machine support which was
earlier inconveniently provided as out-of-tree patchset.

This should be cleaner than a separate board config, since both
emulators provide similar feature set.
---
 arch/riscv/Kconfig | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/riscv/Kconfig b/arch/riscv/Kconfig
index fa3b016c..7c52e666 100644
--- a/arch/riscv/Kconfig
+++ b/arch/riscv/Kconfig
@@ -21,7 +21,7 @@ config TARGET_OPENPITON_RISCV64
  bool "Support RISC-V cores on OpenPiton SoC"

 config TARGET_QEMU_VIRT
- bool "Support QEMU Virt Board"
+ bool "Support QEMU Virt & RVVM Boards"
  select BOARD_LATE_INIT

 config TARGET_SIFIVE_UNLEASHED
Leo Liang Sept. 9, 2024, 7:09 a.m. UTC | #3
Hi Eva,

The other two patches of this patch series are accidently sent via "Reply".
Could you please re-send this series of patches to mailing list? 
Other than that, LGTM. 

Reviewed-by: Leo Yu-Chi Liang <ycliang@andestech.com>

On Wed, Jul 17, 2024 at 09:22:26PM +0300, Eva Kurchatova wrote:
> [EXTERNAL MAIL]
> 
> From da876ced5ff607a4f21e30ab26fb1a972af56570 Mon Sep 17 00:00:00 2001
> From: LekKit <50500857+LekKit@users.noreply.github.com>
> Date: Wed, 17 Jul 2024 20:31:21 +0300
> Subject: [PATCH 1/3] riscv: qemu: Enable booting from NVMe
> 
> QEMU supports NVMe devices, but U-Boot only tries to boot from Virtio.
> This is problematic when explicitly using NVMe, so fix that.
> 
> Additionally, RVVM virtual machine is almost fully compatible with QEMU,
> except it only implements NVMe drives instead of VirtIO.
> ---
>  include/configs/qemu-riscv.h | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/include/configs/qemu-riscv.h b/include/configs/qemu-riscv.h
> index 2f594bfc..cf4fcb90 100644
> --- a/include/configs/qemu-riscv.h
> +++ b/include/configs/qemu-riscv.h
> @@ -22,6 +22,7 @@
>   "stderr=serial,vidconsole\0"
> 
>  #define BOOT_TARGET_DEVICES(func) \
> + func(NVME, nvme, 0) \
>   func(VIRTIO, virtio, 0) \
>   func(VIRTIO, virtio, 1) \
>   func(SCSI, scsi, 0) \
> --
> 2.45.2
diff mbox series

Patch

diff --git a/include/configs/qemu-riscv.h b/include/configs/qemu-riscv.h
index 2f594bfc..cf4fcb90 100644
--- a/include/configs/qemu-riscv.h
+++ b/include/configs/qemu-riscv.h
@@ -22,6 +22,7 @@ 
  "stderr=serial,vidconsole\0"

 #define BOOT_TARGET_DEVICES(func) \
+ func(NVME, nvme, 0) \
  func(VIRTIO, virtio, 0) \
  func(VIRTIO, virtio, 1) \
  func(SCSI, scsi, 0) \