[PATCH 4/5] OvmfPkg/Microvm/virtio: add virtio-mmio support


Gerd Hoffmann
 

Add virtio-mmio support (VirtioMmioDeviceLib and VirtioFdtDxe).

https://bugzilla.tianocore.org/show_bug.cgi?id=3689
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
---
OvmfPkg/Microvm/MicrovmX64.dsc | 2 ++
OvmfPkg/Microvm/MicrovmX64.fdf | 1 +
2 files changed, 3 insertions(+)

diff --git a/OvmfPkg/Microvm/MicrovmX64.dsc b/OvmfPkg/Microvm/MicrovmX64.dsc
index 27d2024266c2..85afdca9beba 100644
--- a/OvmfPkg/Microvm/MicrovmX64.dsc
+++ b/OvmfPkg/Microvm/MicrovmX64.dsc
@@ -233,6 +233,7 @@ [LibraryClasses.common]
SerialPortLib|MdeModulePkg/Library/BaseSerialPortLib16550/BaseSerialPortLib16550.inf
PlatformHookLib|MdeModulePkg/Library/BasePlatformHookLibNull/BasePlatformHookLibNull.inf
FdtLib|EmbeddedPkg/Library/FdtLib/FdtLib.inf
+ VirtioMmioDeviceLib|OvmfPkg/Library/VirtioMmioDeviceLib/VirtioMmioDeviceLib.inf

[LibraryClasses.common.SEC]
QemuFwCfgLib|OvmfPkg/Library/QemuFwCfgLib/QemuFwCfgSecLib.inf
@@ -743,6 +744,7 @@ [Components]
# device tree
#
EmbeddedPkg/Drivers/FdtClientDxe/FdtClientDxe.inf
+ OvmfPkg/Fdt/VirtioFdtDxe/VirtioFdtDxe.inf

#
# SMBIOS Support
diff --git a/OvmfPkg/Microvm/MicrovmX64.fdf b/OvmfPkg/Microvm/MicrovmX64.fdf
index cc8892a459ee..0bf20a702764 100644
--- a/OvmfPkg/Microvm/MicrovmX64.fdf
+++ b/OvmfPkg/Microvm/MicrovmX64.fdf
@@ -278,6 +278,7 @@ [FV.DXEFV]
INF OvmfPkg/VirtioFsDxe/VirtioFsDxe.inf

INF EmbeddedPkg/Drivers/FdtClientDxe/FdtClientDxe.inf
+INF OvmfPkg/Fdt/VirtioFdtDxe/VirtioFdtDxe.inf

!if $(TOOL_CHAIN_TAG) != "XCODE5"
INF ShellPkg/DynamicCommand/TftpDynamicCommand/TftpDynamicCommand.inf
--
2.31.1


Yao, Jiewen
 

Would you please help me understand what the relationship is between VirtioMmio and VirtioFdt ?

The Bugzilla just states "add support for virtio-mmio devices". How VirtioFdt comes into this case?

Thank you
Yao Jiewen

-----Original Message-----
From: devel@edk2.groups.io <devel@edk2.groups.io> On Behalf Of Gerd
Hoffmann
Sent: Thursday, October 14, 2021 11:30 PM
To: devel@edk2.groups.io
Cc: Ard Biesheuvel <ardb+tianocore@kernel.org>; Justen, Jordan L
<jordan.l.justen@intel.com>; Yao, Jiewen <jiewen.yao@intel.com>; Gerd
Hoffmann <kraxel@redhat.com>
Subject: [edk2-devel] [PATCH 4/5] OvmfPkg/Microvm/virtio: add virtio-mmio
support

Add virtio-mmio support (VirtioMmioDeviceLib and VirtioFdtDxe).

https://bugzilla.tianocore.org/show_bug.cgi?id=3689
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
---
OvmfPkg/Microvm/MicrovmX64.dsc | 2 ++
OvmfPkg/Microvm/MicrovmX64.fdf | 1 +
2 files changed, 3 insertions(+)

diff --git a/OvmfPkg/Microvm/MicrovmX64.dsc
b/OvmfPkg/Microvm/MicrovmX64.dsc
index 27d2024266c2..85afdca9beba 100644
--- a/OvmfPkg/Microvm/MicrovmX64.dsc
+++ b/OvmfPkg/Microvm/MicrovmX64.dsc
@@ -233,6 +233,7 @@ [LibraryClasses.common]

SerialPortLib|MdeModulePkg/Library/BaseSerialPortLib16550/BaseSerialPortLib
16550.inf

PlatformHookLib|MdeModulePkg/Library/BasePlatformHookLibNull/BasePlatfo
rmHookLibNull.inf
FdtLib|EmbeddedPkg/Library/FdtLib/FdtLib.inf
+
VirtioMmioDeviceLib|OvmfPkg/Library/VirtioMmioDeviceLib/VirtioMmioDevice
Lib.inf

[LibraryClasses.common.SEC]
QemuFwCfgLib|OvmfPkg/Library/QemuFwCfgLib/QemuFwCfgSecLib.inf
@@ -743,6 +744,7 @@ [Components]
# device tree
#
EmbeddedPkg/Drivers/FdtClientDxe/FdtClientDxe.inf
+ OvmfPkg/Fdt/VirtioFdtDxe/VirtioFdtDxe.inf

#
# SMBIOS Support
diff --git a/OvmfPkg/Microvm/MicrovmX64.fdf
b/OvmfPkg/Microvm/MicrovmX64.fdf
index cc8892a459ee..0bf20a702764 100644
--- a/OvmfPkg/Microvm/MicrovmX64.fdf
+++ b/OvmfPkg/Microvm/MicrovmX64.fdf
@@ -278,6 +278,7 @@ [FV.DXEFV]
INF OvmfPkg/VirtioFsDxe/VirtioFsDxe.inf

INF EmbeddedPkg/Drivers/FdtClientDxe/FdtClientDxe.inf
+INF OvmfPkg/Fdt/VirtioFdtDxe/VirtioFdtDxe.inf

!if $(TOOL_CHAIN_TAG) != "XCODE5"
INF
ShellPkg/DynamicCommand/TftpDynamicCommand/TftpDynamicCommand.inf
--
2.31.1





Gerd Hoffmann
 

On Fri, Oct 15, 2021 at 03:57:28AM +0000, Yao, Jiewen wrote:
Would you please help me understand what the relationship is between VirtioMmio and VirtioFdt ?

The Bugzilla just states "add support for virtio-mmio devices". How VirtioFdt comes into this case?
The plan is to use an fdt to allow ovmf find the virtio-mmio devices.

The qemu patch for that is here:
https://gitlab.com/kraxel/qemu/-/commit/81b52c9fbef8f5f52c3c88dc3b80cf4093c96df6

take care,
Gerd


Yao, Jiewen
 

OK. I recommend to add those info in Bugzilla and the description as well.

-----Original Message-----
From: devel@edk2.groups.io <devel@edk2.groups.io> On Behalf Of Gerd
Hoffmann
Sent: Friday, October 15, 2021 12:57 PM
To: Yao, Jiewen <jiewen.yao@intel.com>
Cc: devel@edk2.groups.io; Ard Biesheuvel <ardb+tianocore@kernel.org>; Justen,
Jordan L <jordan.l.justen@intel.com>
Subject: Re: [edk2-devel] [PATCH 4/5] OvmfPkg/Microvm/virtio: add virtio-
mmio support

On Fri, Oct 15, 2021 at 03:57:28AM +0000, Yao, Jiewen wrote:
Would you please help me understand what the relationship is between
VirtioMmio and VirtioFdt ?

The Bugzilla just states "add support for virtio-mmio devices". How VirtioFdt
comes into this case?

The plan is to use an fdt to allow ovmf find the virtio-mmio devices.

The qemu patch for that is here:
https://gitlab.com/kraxel/qemu/-
/commit/81b52c9fbef8f5f52c3c88dc3b80cf4093c96df6

take care,
Gerd