diff mbox series

qemu-arm: Enable NVMe for distro boot

Message ID 20220227122032.35069-1-agraf@csgraf.de
State Accepted
Commit 5c9b420ada3b4f2a08da4789571f0ea373881565
Delegated to: Tom Rini
Headers show
Series qemu-arm: Enable NVMe for distro boot | expand

Commit Message

Alexander Graf Feb. 27, 2022, 12:20 p.m. UTC
We already support the NVMe commands and PCIe backend in the QEMU target,
so let's make it easy for anyone to consume them and enable NVMe distro
boot along the way!

With this patch, I can put an NVMe backed disk image into my QEMU VM and
have it automatically load a UEFI target blob.

Signed-off-by: Alexander Graf <agraf@csgraf.de>
---
 include/configs/qemu-arm.h | 7 +++++++
 1 file changed, 7 insertions(+)

Comments

Mark Kettenis Feb. 27, 2022, 1:08 p.m. UTC | #1
> From: Alexander Graf <agraf@csgraf.de>
> Date: Sun, 27 Feb 2022 13:20:32 +0100
> 
> We already support the NVMe commands and PCIe backend in the QEMU target,
> so let's make it easy for anyone to consume them and enable NVMe distro
> boot along the way!
> 
> With this patch, I can put an NVMe backed disk image into my QEMU VM and
> have it automatically load a UEFI target blob.
> 
> Signed-off-by: Alexander Graf <agraf@csgraf.de>
> ---
>  include/configs/qemu-arm.h | 7 +++++++
>  1 file changed, 7 insertions(+)

Reviewed-by: Mark Kettenis <kettenis@openbsd.org>

> diff --git a/include/configs/qemu-arm.h b/include/configs/qemu-arm.h
> index d45f606860..7ae71e0029 100644
> --- a/include/configs/qemu-arm.h
> +++ b/include/configs/qemu-arm.h
> @@ -39,6 +39,12 @@
>  # define BOOT_TARGET_VIRTIO(func)
>  #endif
>  
> +#if CONFIG_IS_ENABLED(CMD_NVME)
> +# define BOOT_TARGET_NVME(func) func(NVME, nvme, 0)
> +#else
> +# define BOOT_TARGET_NVME(func)
> +#endif
> +
>  #if CONFIG_IS_ENABLED(CMD_DHCP)
>  # define BOOT_TARGET_DHCP(func) func(DHCP, dhcp, na)
>  #else
> @@ -49,6 +55,7 @@
>  	BOOT_TARGET_USB(func) \
>  	BOOT_TARGET_SCSI(func) \
>  	BOOT_TARGET_VIRTIO(func) \
> +	BOOT_TARGET_NVME(func) \
>  	BOOT_TARGET_DHCP(func)
>  
>  #include <config_distro_bootcmd.h>
> -- 
> 2.32.0
> 
>
Tom Rini April 5, 2022, 6 p.m. UTC | #2
On Sun, Feb 27, 2022 at 01:20:32PM +0100, Alexander Graf wrote:

> We already support the NVMe commands and PCIe backend in the QEMU target,
> so let's make it easy for anyone to consume them and enable NVMe distro
> boot along the way!
> 
> With this patch, I can put an NVMe backed disk image into my QEMU VM and
> have it automatically load a UEFI target blob.
> 
> Signed-off-by: Alexander Graf <agraf@csgraf.de>
> Reviewed-by: Mark Kettenis <kettenis@openbsd.org>

Applied to u-boot/master, thanks!
diff mbox series

Patch

diff --git a/include/configs/qemu-arm.h b/include/configs/qemu-arm.h
index d45f606860..7ae71e0029 100644
--- a/include/configs/qemu-arm.h
+++ b/include/configs/qemu-arm.h
@@ -39,6 +39,12 @@ 
 # define BOOT_TARGET_VIRTIO(func)
 #endif
 
+#if CONFIG_IS_ENABLED(CMD_NVME)
+# define BOOT_TARGET_NVME(func) func(NVME, nvme, 0)
+#else
+# define BOOT_TARGET_NVME(func)
+#endif
+
 #if CONFIG_IS_ENABLED(CMD_DHCP)
 # define BOOT_TARGET_DHCP(func) func(DHCP, dhcp, na)
 #else
@@ -49,6 +55,7 @@ 
 	BOOT_TARGET_USB(func) \
 	BOOT_TARGET_SCSI(func) \
 	BOOT_TARGET_VIRTIO(func) \
+	BOOT_TARGET_NVME(func) \
 	BOOT_TARGET_DHCP(func)
 
 #include <config_distro_bootcmd.h>