[edk2-devel] [PATCH 00/17] [RFC] OvmfPkg: Add support for microvm machine type

Gerd Hoffmann posted 17 patches 2 years, 7 months ago
Failed in applying to current master (apply log)
There is a newer version of this series
OvmfPkg/Microvm/MicrovmX64.dsc                | 838 ++++++++++++++++++
OvmfPkg/Microvm/MicrovmX64.fdf                | 462 ++++++++++
.../BaseResetSystemLibMicrovm.inf             |  37 +
.../DxeResetSystemLibMicrovm.inf              |  40 +
OvmfPkg/Include/IndustryStandard/Microvm.h    |  13 +
OvmfPkg/Include/OvmfPlatforms.h               |   1 +
.../PlatformBootManagerLib/BdsPlatform.c      |  42 +
.../ResetSystemLib/DxeResetSystemLibMicrovm.c |  49 +
.../ResetSystemLib/ResetSystemLibMicrovm.c    |  89 ++
OvmfPkg/PlatformPei/MemDetect.c               |   4 +
OvmfPkg/PlatformPei/Platform.c                |  14 +
OvmfPkg/Microvm/rebase-update.sh              |   6 +
12 files changed, 1595 insertions(+)
create mode 100644 OvmfPkg/Microvm/MicrovmX64.dsc
create mode 100644 OvmfPkg/Microvm/MicrovmX64.fdf
create mode 100644 OvmfPkg/Library/ResetSystemLib/BaseResetSystemLibMicrovm.inf
create mode 100644 OvmfPkg/Library/ResetSystemLib/DxeResetSystemLibMicrovm.inf
create mode 100644 OvmfPkg/Include/IndustryStandard/Microvm.h
create mode 100644 OvmfPkg/Library/ResetSystemLib/DxeResetSystemLibMicrovm.c
create mode 100644 OvmfPkg/Library/ResetSystemLib/ResetSystemLibMicrovm.c
create mode 100755 OvmfPkg/Microvm/rebase-update.sh
[edk2-devel] [PATCH 00/17] [RFC] OvmfPkg: Add support for microvm machine type
Posted by Gerd Hoffmann 2 years, 7 months ago
This patch series adds basic support for the
microvm machine type to OVMF.

Working:
  - uefi shell @ serial console.
  - direct kernel boot.

Comming in followup patches:
  - virtio-mmio support.
  - pcie support.

TODO:
  - better timer support.

Usage:
  qemu-system-x86_64 -nographic -M microvm -bios MICROVM.fd ...

Gerd Hoffmann (17):
  OvmfPkg/Microvm: copy OvmfPkgX64 files as-is
  OvmfPkg/Microvm: rename output files, fix includes
  OvmfPkg/Microvm: no smm
  OvmfPkg/Microvm: no secure boot
  OvmfPkg/Microvm: no tpm
  OvmfPkg/Microvm: no sev
  OvmfPkg/Microvm: no csm
  OvmfPkg/Microvm: no emulated scsi
  OvmfPkg/Microvm: use MdePkg/Library/SecPeiDxeTimerLibCpu
  OvmfPkg/Microvm: use XenTimerDxe (lapic timer)
  OvmfPkg/Microvm: PlatformPei/MemDetect tweaks
  OvmfPkg/Microvm: PlatformPei/Platform memory map tweaks
  OvmfPkg/Microvm: PlatformPei/Platform misc tweaks
  OvmfPkg/ResetSystemLib: add driver for microvm
  OvmfPkg/Microvm: BdsPlatform: PciAcpiInitialization tweak.
  OvmfPkg/Microvm: use PciHostBridgeLibNull
  OvmfPkg/Microvm: wire up serial console, drop super-io

 OvmfPkg/Microvm/MicrovmX64.dsc                | 838 ++++++++++++++++++
 OvmfPkg/Microvm/MicrovmX64.fdf                | 462 ++++++++++
 .../BaseResetSystemLibMicrovm.inf             |  37 +
 .../DxeResetSystemLibMicrovm.inf              |  40 +
 OvmfPkg/Include/IndustryStandard/Microvm.h    |  13 +
 OvmfPkg/Include/OvmfPlatforms.h               |   1 +
 .../PlatformBootManagerLib/BdsPlatform.c      |  42 +
 .../ResetSystemLib/DxeResetSystemLibMicrovm.c |  49 +
 .../ResetSystemLib/ResetSystemLibMicrovm.c    |  89 ++
 OvmfPkg/PlatformPei/MemDetect.c               |   4 +
 OvmfPkg/PlatformPei/Platform.c                |  14 +
 OvmfPkg/Microvm/rebase-update.sh              |   6 +
 12 files changed, 1595 insertions(+)
 create mode 100644 OvmfPkg/Microvm/MicrovmX64.dsc
 create mode 100644 OvmfPkg/Microvm/MicrovmX64.fdf
 create mode 100644 OvmfPkg/Library/ResetSystemLib/BaseResetSystemLibMicrovm.inf
 create mode 100644 OvmfPkg/Library/ResetSystemLib/DxeResetSystemLibMicrovm.inf
 create mode 100644 OvmfPkg/Include/IndustryStandard/Microvm.h
 create mode 100644 OvmfPkg/Library/ResetSystemLib/DxeResetSystemLibMicrovm.c
 create mode 100644 OvmfPkg/Library/ResetSystemLib/ResetSystemLibMicrovm.c
 create mode 100755 OvmfPkg/Microvm/rebase-update.sh

-- 
2.31.1



-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#79984): https://edk2.groups.io/g/devel/message/79984
Mute This Topic: https://groups.io/mt/85272548/1787277
Group Owner: devel+owner@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [importer@patchew.org]
-=-=-=-=-=-=-=-=-=-=-=-


Re: [edk2-devel] [PATCH 00/17] [RFC] OvmfPkg: Add support for microvm machine type
Posted by Ard Biesheuvel 2 years, 7 months ago
Hi Gerd,

On Tue, 31 Aug 2021 at 11:57, Gerd Hoffmann <kraxel@redhat.com> wrote:
>
> This patch series adds basic support for the
> microvm machine type to OVMF.
>

Can you provide a bit more background on this machine type, and on why
we'd want to support this? Does it have any relation to confidential
computing?


> Working:
>   - uefi shell @ serial console.
>   - direct kernel boot.
>
> Comming in followup patches:
>   - virtio-mmio support.
>   - pcie support.
>
> TODO:
>   - better timer support.
>
> Usage:
>   qemu-system-x86_64 -nographic -M microvm -bios MICROVM.fd ...
>
> Gerd Hoffmann (17):
>   OvmfPkg/Microvm: copy OvmfPkgX64 files as-is
>   OvmfPkg/Microvm: rename output files, fix includes
>   OvmfPkg/Microvm: no smm
>   OvmfPkg/Microvm: no secure boot
>   OvmfPkg/Microvm: no tpm
>   OvmfPkg/Microvm: no sev
>   OvmfPkg/Microvm: no csm
>   OvmfPkg/Microvm: no emulated scsi
>   OvmfPkg/Microvm: use MdePkg/Library/SecPeiDxeTimerLibCpu
>   OvmfPkg/Microvm: use XenTimerDxe (lapic timer)
>   OvmfPkg/Microvm: PlatformPei/MemDetect tweaks
>   OvmfPkg/Microvm: PlatformPei/Platform memory map tweaks
>   OvmfPkg/Microvm: PlatformPei/Platform misc tweaks
>   OvmfPkg/ResetSystemLib: add driver for microvm
>   OvmfPkg/Microvm: BdsPlatform: PciAcpiInitialization tweak.
>   OvmfPkg/Microvm: use PciHostBridgeLibNull
>   OvmfPkg/Microvm: wire up serial console, drop super-io
>
>  OvmfPkg/Microvm/MicrovmX64.dsc                | 838 ++++++++++++++++++
>  OvmfPkg/Microvm/MicrovmX64.fdf                | 462 ++++++++++
>  .../BaseResetSystemLibMicrovm.inf             |  37 +
>  .../DxeResetSystemLibMicrovm.inf              |  40 +
>  OvmfPkg/Include/IndustryStandard/Microvm.h    |  13 +
>  OvmfPkg/Include/OvmfPlatforms.h               |   1 +
>  .../PlatformBootManagerLib/BdsPlatform.c      |  42 +
>  .../ResetSystemLib/DxeResetSystemLibMicrovm.c |  49 +
>  .../ResetSystemLib/ResetSystemLibMicrovm.c    |  89 ++
>  OvmfPkg/PlatformPei/MemDetect.c               |   4 +
>  OvmfPkg/PlatformPei/Platform.c                |  14 +
>  OvmfPkg/Microvm/rebase-update.sh              |   6 +
>  12 files changed, 1595 insertions(+)
>  create mode 100644 OvmfPkg/Microvm/MicrovmX64.dsc
>  create mode 100644 OvmfPkg/Microvm/MicrovmX64.fdf
>  create mode 100644 OvmfPkg/Library/ResetSystemLib/BaseResetSystemLibMicrovm.inf
>  create mode 100644 OvmfPkg/Library/ResetSystemLib/DxeResetSystemLibMicrovm.inf
>  create mode 100644 OvmfPkg/Include/IndustryStandard/Microvm.h
>  create mode 100644 OvmfPkg/Library/ResetSystemLib/DxeResetSystemLibMicrovm.c
>  create mode 100644 OvmfPkg/Library/ResetSystemLib/ResetSystemLibMicrovm.c
>  create mode 100755 OvmfPkg/Microvm/rebase-update.sh
>
> --
> 2.31.1
>
>
>
> 
>
>


-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#80003): https://edk2.groups.io/g/devel/message/80003
Mute This Topic: https://groups.io/mt/85272548/1787277
Group Owner: devel+owner@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [importer@patchew.org]
-=-=-=-=-=-=-=-=-=-=-=-


Re: [edk2-devel] [PATCH 00/17] [RFC] OvmfPkg: Add support for microvm machine type
Posted by Gerd Hoffmann 2 years, 7 months ago
On Tue, Aug 31, 2021 at 12:23:32PM +0200, Ard Biesheuvel wrote:
> Hi Gerd,
> 
> On Tue, 31 Aug 2021 at 11:57, Gerd Hoffmann <kraxel@redhat.com> wrote:
> >
> > This patch series adds basic support for the
> > microvm machine type to OVMF.
> >
> 
> Can you provide a bit more background on this machine type, and on why
> we'd want to support this?

See reply to Jiewen Yao.

> Does it have any relation to confidential computing?

As of today microvm does not support confidential computing.  Didn't
investigate yet how much work it would be to add this.  With luck it
would be just a few lines adding a config switch and hook up the
existing setup code for pc/q35 (at least for amd sev which is merged in
qemu upstream already).

Having seen how the tdx patches for qemu bend the q35 machine type to
make it fit, for example adding switches to disable pit+pic, I suspect
microvm might actually be an interesting target for confidential
computing.

take care,
  Gerd



-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#80008): https://edk2.groups.io/g/devel/message/80008
Mute This Topic: https://groups.io/mt/85272548/1787277
Group Owner: devel+owner@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [importer@patchew.org]
-=-=-=-=-=-=-=-=-=-=-=-


Re: [edk2-devel] [PATCH 00/17] [RFC] OvmfPkg: Add support for microvm machine type
Posted by Yao, Jiewen 2 years, 7 months ago
Hi Gerd
I would like to confirm a couple of things:

-1) Since this is a big new feature, please follow process to submit Bugzilla.

0) I hope we can include a readme file to introduce more background and the scope of the new project.

1) What is the device list of microvm? Or do you mean https://qemu.readthedocs.io/en/latest/system/i386/microvm.html?

2) How many QEMU configurations do we want to support ? Do we need support all described in https://qemu.readthedocs.io/en/latest/system/i386/microvm.html?

3) What is the reason to add a new dsc/fdf instead of add a MACRO/PCD in OVMF?


> -----Original Message-----
> From: Gerd Hoffmann <kraxel@redhat.com>
> Sent: Tuesday, August 31, 2021 5:57 PM
> To: devel@edk2.groups.io
> Cc: Marc-André Lureau <marcandre.lureau@redhat.com>; Anthony Perard
> <anthony.perard@citrix.com>; Gerd Hoffmann <kraxel@redhat.com>; Ard
> Biesheuvel <ardb+tianocore@kernel.org>; Yao, Jiewen <jiewen.yao@intel.com>;
> Justen, Jordan L <jordan.l.justen@intel.com>; Julien Grall <julien@xen.org>;
> Stefan Berger <stefanb@linux.ibm.com>
> Subject: [PATCH 00/17] [RFC] OvmfPkg: Add support for microvm machine type
> 
> This patch series adds basic support for the
> microvm machine type to OVMF.
> 
> Working:
>   - uefi shell @ serial console.
>   - direct kernel boot.
> 
> Comming in followup patches:
>   - virtio-mmio support.
>   - pcie support.
> 
> TODO:
>   - better timer support.
> 
> Usage:
>   qemu-system-x86_64 -nographic -M microvm -bios MICROVM.fd ...
> 
> Gerd Hoffmann (17):
>   OvmfPkg/Microvm: copy OvmfPkgX64 files as-is
>   OvmfPkg/Microvm: rename output files, fix includes
>   OvmfPkg/Microvm: no smm
>   OvmfPkg/Microvm: no secure boot
>   OvmfPkg/Microvm: no tpm
>   OvmfPkg/Microvm: no sev
>   OvmfPkg/Microvm: no csm
>   OvmfPkg/Microvm: no emulated scsi
>   OvmfPkg/Microvm: use MdePkg/Library/SecPeiDxeTimerLibCpu
>   OvmfPkg/Microvm: use XenTimerDxe (lapic timer)
>   OvmfPkg/Microvm: PlatformPei/MemDetect tweaks
>   OvmfPkg/Microvm: PlatformPei/Platform memory map tweaks
>   OvmfPkg/Microvm: PlatformPei/Platform misc tweaks
>   OvmfPkg/ResetSystemLib: add driver for microvm
>   OvmfPkg/Microvm: BdsPlatform: PciAcpiInitialization tweak.
>   OvmfPkg/Microvm: use PciHostBridgeLibNull
>   OvmfPkg/Microvm: wire up serial console, drop super-io
> 
>  OvmfPkg/Microvm/MicrovmX64.dsc                | 838 ++++++++++++++++++
>  OvmfPkg/Microvm/MicrovmX64.fdf                | 462 ++++++++++
>  .../BaseResetSystemLibMicrovm.inf             |  37 +
>  .../DxeResetSystemLibMicrovm.inf              |  40 +
>  OvmfPkg/Include/IndustryStandard/Microvm.h    |  13 +
>  OvmfPkg/Include/OvmfPlatforms.h               |   1 +
>  .../PlatformBootManagerLib/BdsPlatform.c      |  42 +
>  .../ResetSystemLib/DxeResetSystemLibMicrovm.c |  49 +
>  .../ResetSystemLib/ResetSystemLibMicrovm.c    |  89 ++
>  OvmfPkg/PlatformPei/MemDetect.c               |   4 +
>  OvmfPkg/PlatformPei/Platform.c                |  14 +
>  OvmfPkg/Microvm/rebase-update.sh              |   6 +
>  12 files changed, 1595 insertions(+)
>  create mode 100644 OvmfPkg/Microvm/MicrovmX64.dsc
>  create mode 100644 OvmfPkg/Microvm/MicrovmX64.fdf
>  create mode 100644
> OvmfPkg/Library/ResetSystemLib/BaseResetSystemLibMicrovm.inf
>  create mode 100644
> OvmfPkg/Library/ResetSystemLib/DxeResetSystemLibMicrovm.inf
>  create mode 100644 OvmfPkg/Include/IndustryStandard/Microvm.h
>  create mode 100644
> OvmfPkg/Library/ResetSystemLib/DxeResetSystemLibMicrovm.c
>  create mode 100644
> OvmfPkg/Library/ResetSystemLib/ResetSystemLibMicrovm.c
>  create mode 100755 OvmfPkg/Microvm/rebase-update.sh
> 
> --
> 2.31.1



-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#80004): https://edk2.groups.io/g/devel/message/80004
Mute This Topic: https://groups.io/mt/85272548/1787277
Group Owner: devel+owner@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [importer@patchew.org]
-=-=-=-=-=-=-=-=-=-=-=-


Re: [edk2-devel] [PATCH 00/17] [RFC] OvmfPkg: Add support for microvm machine type
Posted by Gerd Hoffmann 2 years, 7 months ago
On Tue, Aug 31, 2021 at 10:31:31AM +0000, Yao, Jiewen wrote:
> Hi Gerd
> I would like to confirm a couple of things:
> 
> -1) Since this is a big new feature, please follow process to submit Bugzilla.
> 
> 0) I hope we can include a readme file to introduce more background and the scope of the new project.

Sure, will do both.

> 1) What is the device list of microvm?

It is a minimal virtual machine designed for modern (aka virtio-aware) guests.
Most legacy isa devices (pic, pit, rtc) are optional and can be turned
off.  storage/network/etc. uses virtio-mmio.

Optional pcie support is available and any pcie device supported by qemu
cane plugged in (including virtio-pci if you prefer that over
virtio-mmio).

> Or do you mean https://qemu.readthedocs.io/en/latest/system/i386/microvm.html?

Yes, it's this.

> 2) How many QEMU configurations do we want to support?

This series adds just the basics.  I want add support for virtio-mmio
and pcie later on, once the basics are sorted and merged.

> 3) What is the reason to add a new dsc/fdf instead of add a MACRO/PCD in OVMF?

microvm borrowed a bunch of ideas from arm virt.  So it doesn't work
like a classic pc chipset in many areas.  There is no pci config space
access via ioport 0xcf8 for example.  Also power management works
completely different (see patch #14).

Adapting at runtime would need glue code basically switching between
between different *Lib implementations, depending on machine type.
Similar to DxePciLibI440FxQ35 for pci / pcie, but for a bunch of more
places too.

Xen moved to a separate dsc/fdf too recently, I suspect for simliar
reasons.

take care,
  Gerd



-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#80007): https://edk2.groups.io/g/devel/message/80007
Mute This Topic: https://groups.io/mt/85272548/1787277
Group Owner: devel+owner@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [importer@patchew.org]
-=-=-=-=-=-=-=-=-=-=-=-


Re: [edk2-devel] [PATCH 00/17] [RFC] OvmfPkg: Add support for microvm machine type
Posted by Yao, Jiewen 2 years, 7 months ago
Thank you. That confirms my guess.

If you can add all those info in readme, that would be great, especially the URL https://qemu.readthedocs.io/en/latest/system/i386/microvm.html, as well as the scope.

I have not reviewed all detail, and I think it is good idea.
Acked-by: Jiewen Yao <Jiewen.yao@intel.com>


> -----Original Message-----
> From: Gerd Hoffmann <kraxel@redhat.com>
> Sent: Tuesday, August 31, 2021 7:27 PM
> To: Yao, Jiewen <jiewen.yao@intel.com>
> Cc: devel@edk2.groups.io; Marc-André Lureau
> <marcandre.lureau@redhat.com>; Anthony Perard
> <anthony.perard@citrix.com>; Ard Biesheuvel <ardb+tianocore@kernel.org>;
> Justen, Jordan L <jordan.l.justen@intel.com>; Julien Grall <julien@xen.org>;
> Stefan Berger <stefanb@linux.ibm.com>
> Subject: Re: [PATCH 00/17] [RFC] OvmfPkg: Add support for microvm machine
> type
> 
> On Tue, Aug 31, 2021 at 10:31:31AM +0000, Yao, Jiewen wrote:
> > Hi Gerd
> > I would like to confirm a couple of things:
> >
> > -1) Since this is a big new feature, please follow process to submit Bugzilla.
> >
> > 0) I hope we can include a readme file to introduce more background and the
> scope of the new project.
> 
> Sure, will do both.
> 
> > 1) What is the device list of microvm?
> 
> It is a minimal virtual machine designed for modern (aka virtio-aware) guests.
> Most legacy isa devices (pic, pit, rtc) are optional and can be turned
> off.  storage/network/etc. uses virtio-mmio.
> 
> Optional pcie support is available and any pcie device supported by qemu
> cane plugged in (including virtio-pci if you prefer that over
> virtio-mmio).
> 
> > Or do you mean
> https://qemu.readthedocs.io/en/latest/system/i386/microvm.html?
> 
> Yes, it's this.
> 
> > 2) How many QEMU configurations do we want to support?
> 
> This series adds just the basics.  I want add support for virtio-mmio
> and pcie later on, once the basics are sorted and merged.
> 
> > 3) What is the reason to add a new dsc/fdf instead of add a MACRO/PCD in
> OVMF?
> 
> microvm borrowed a bunch of ideas from arm virt.  So it doesn't work
> like a classic pc chipset in many areas.  There is no pci config space
> access via ioport 0xcf8 for example.  Also power management works
> completely different (see patch #14).
> 
> Adapting at runtime would need glue code basically switching between
> between different *Lib implementations, depending on machine type.
> Similar to DxePciLibI440FxQ35 for pci / pcie, but for a bunch of more
> places too.
> 
> Xen moved to a separate dsc/fdf too recently, I suspect for simliar
> reasons.
> 
> take care,
>   Gerd



-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#80011): https://edk2.groups.io/g/devel/message/80011
Mute This Topic: https://groups.io/mt/85272548/1787277
Group Owner: devel+owner@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [importer@patchew.org]
-=-=-=-=-=-=-=-=-=-=-=-


Re: [edk2-devel] [PATCH 00/17] [RFC] OvmfPkg: Add support for microvm machine type
Posted by Gerd Hoffmann 2 years, 7 months ago
On Tue, Aug 31, 2021 at 02:32:45PM +0000, Yao, Jiewen wrote:
> Thank you. That confirms my guess.
> 
> If you can add all those info in readme, that would be great, especially the URL https://qemu.readthedocs.io/en/latest/system/i386/microvm.html, as well as the scope.

Current README below (also covering the not-yet submitted
virtio-mmio and pcie patches).

take care,
  Gerd

-------------------- cut here -----------------------

This is an *experimental* port of OVMF for the qemu microvm
machine type.

microvm background info
-----------------------

microvm is designed for modern, virtio-based workloads.  Most legacy
lpc/isa devices like pit and pic can be turned off.  virtio-mmio
(i.e. '-device virtio-{blk,net,scsi,...}-device') is used for
storage/network/etc.

Optional pcie support is available and any pcie device supported by
qemu can be plugged in (including virtio-pci if you prefer that over
virtio-mmio).

https://qemu.readthedocs.io/en/latest/system/i386/microvm.html
https://www.kraxel.org/blog/2020/10/qemu-microvm-acpi/

design issues
-------------

Not fully clear yet how to do hardware detection best.  Right now
using device tree to find virtio-mmio devices and pcie host bridge,
can reuse existing ArmVirtPkg code that way.  Needs patched qemu.

features
--------
 [working] serial console
 [working] direct kernel boot
 [in progress] virtio-mmio support
 [in progress] pcie support

known limitations
-----------------
 * rtc=on is required for now.
 * can't use separate code/vars (actually an microvm limitation,
   there is no pflash support).
 * transitional virtio-pci devices do not work.  microvm doesn't
   support ioports on pcie, and ovmf doesn't initialize pcie devices
   with ioports if there is no address space for them (even though
   pcie devices are required to be functional without ioports).

known bugs
----------
 * timer has wrong frequency (running fast on my hardware).

usage
-----
qemu-system-x86_64 \
    -nographic \
    -machine microvm,acpi=on,pit=off,pic=off,rtc=on \
    -bios /path/to/MICROVM.fd \
    [ ... more args here ... ]



-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#80060): https://edk2.groups.io/g/devel/message/80060
Mute This Topic: https://groups.io/mt/85272548/1787277
Group Owner: devel+owner@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [importer@patchew.org]
-=-=-=-=-=-=-=-=-=-=-=-


Re: [edk2-devel] [PATCH 00/17] [RFC] OvmfPkg: Add support for microvm machine type
Posted by Yao, Jiewen 2 years, 7 months ago
That is good info.

I recommend to add microvm feature to the https://github.com/tianocore/edk2/blob/master/Maintainers.txt

OvmfPkg: microvm-related modules
F: OvmfPkg/microvm/
F: OvmfPkg/Include/IndustryStandard/Microvm.h    

I also recommend you to be reviewer for the feature.
Feel free to add other people as reviewer too, if you think he/she can help review the patch set.


Thank you
Yao Jiewen

> -----Original Message-----
> From: devel@edk2.groups.io <devel@edk2.groups.io> On Behalf Of Gerd
> Hoffmann
> Sent: Wednesday, September 1, 2021 3:25 PM
> To: Yao, Jiewen <jiewen.yao@intel.com>
> Cc: devel@edk2.groups.io; Marc-André Lureau
> <marcandre.lureau@redhat.com>; Anthony Perard
> <anthony.perard@citrix.com>; Ard Biesheuvel <ardb+tianocore@kernel.org>;
> Justen, Jordan L <jordan.l.justen@intel.com>; Julien Grall <julien@xen.org>;
> Stefan Berger <stefanb@linux.ibm.com>
> Subject: Re: [edk2-devel] [PATCH 00/17] [RFC] OvmfPkg: Add support for
> microvm machine type
> 
> On Tue, Aug 31, 2021 at 02:32:45PM +0000, Yao, Jiewen wrote:
> > Thank you. That confirms my guess.
> >
> > If you can add all those info in readme, that would be great, especially the URL
> https://qemu.readthedocs.io/en/latest/system/i386/microvm.html, as well as
> the scope.
> 
> Current README below (also covering the not-yet submitted
> virtio-mmio and pcie patches).
> 
> take care,
>   Gerd
> 
> -------------------- cut here -----------------------
> 
> This is an *experimental* port of OVMF for the qemu microvm
> machine type.
> 
> microvm background info
> -----------------------
> 
> microvm is designed for modern, virtio-based workloads.  Most legacy
> lpc/isa devices like pit and pic can be turned off.  virtio-mmio
> (i.e. '-device virtio-{blk,net,scsi,...}-device') is used for
> storage/network/etc.
> 
> Optional pcie support is available and any pcie device supported by
> qemu can be plugged in (including virtio-pci if you prefer that over
> virtio-mmio).
> 
> https://qemu.readthedocs.io/en/latest/system/i386/microvm.html
> https://www.kraxel.org/blog/2020/10/qemu-microvm-acpi/
> 
> design issues
> -------------
> 
> Not fully clear yet how to do hardware detection best.  Right now
> using device tree to find virtio-mmio devices and pcie host bridge,
> can reuse existing ArmVirtPkg code that way.  Needs patched qemu.
> 
> features
> --------
>  [working] serial console
>  [working] direct kernel boot
>  [in progress] virtio-mmio support
>  [in progress] pcie support
> 
> known limitations
> -----------------
>  * rtc=on is required for now.
>  * can't use separate code/vars (actually an microvm limitation,
>    there is no pflash support).
>  * transitional virtio-pci devices do not work.  microvm doesn't
>    support ioports on pcie, and ovmf doesn't initialize pcie devices
>    with ioports if there is no address space for them (even though
>    pcie devices are required to be functional without ioports).
> 
> known bugs
> ----------
>  * timer has wrong frequency (running fast on my hardware).
> 
> usage
> -----
> qemu-system-x86_64 \
>     -nographic \
>     -machine microvm,acpi=on,pit=off,pic=off,rtc=on \
>     -bios /path/to/MICROVM.fd \
>     [ ... more args here ... ]
> 
> 
> 
> 
> 



-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#80193): https://edk2.groups.io/g/devel/message/80193
Mute This Topic: https://groups.io/mt/85272548/1787277
Group Owner: devel+owner@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [importer@patchew.org]
-=-=-=-=-=-=-=-=-=-=-=-