[PATCH 0/3] hw/i386/microvm: add uefi-vars-sysbus support via platform bus

Luigi Leonardi posted 3 patches 3 weeks, 3 days ago
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/qemu tags/patchew/20260701-microvm._5Fuefi._5Fvar-v1-0-0652cae6a152@redhat.com
Maintainers: Paolo Bonzini <pbonzini@redhat.com>, Richard Henderson <richard.henderson@linaro.org>, "Michael S. Tsirkin" <mst@redhat.com>, Sergio Lopez <slp@redhat.com>
hw/core/platform-bus.c    |  4 ++++
hw/i386/Kconfig           |  1 +
hw/i386/microvm-dt.c      |  9 +++++++++
hw/i386/microvm.c         | 38 ++++++++++++++++++++++++++++++++++++++
include/hw/i386/microvm.h |  4 ++++
5 files changed, 56 insertions(+)
[PATCH 0/3] hw/i386/microvm: add uefi-vars-sysbus support via platform bus
Posted by Luigi Leonardi 3 weeks, 3 days ago
This series adds support for the uefi-vars-sysbus device on the microvm
machine type, enabling persistent UEFI variable storage.

The uefi-vars-sysbus device is a sysbus device that is attached to the
platform bus, which microvm does not currently support. To address this,
the series adds a platform bus to microvm, following the same
pattern used by the ARM virt machine.

The platform bus is mapped at 0xfec20000 with a 1 MB window, placed
after the IOAPICs. It is created without IRQ lines since the
uefi-vars-sysbus device only requires MMIO.

Patch 1 fixes a crash in the platform bus core when num_irqs is zero,
        which is needed to support an MMIO-only platform bus.
Patch 2 adds the platform bus to microvm with MMIO mapping and FDT
        integration.
Patch 3 allows the uefi-vars-sysbus device to be instantiated on
        microvm.

Corresponding edk2 changes[1]

[1]https://github.com/tianocore/edk2/pull/12751

To: qemu-devel@nongnu.org
Cc: Paolo Bonzini <pbonzini@redhat.com>
Cc: Michael S. Tsirkin <mst@redhat.com>
Cc: Richard Henderson <richard.henderson@linaro.org>
Cc: Sergio Lopez <slp@redhat.com>
Cc: Gerd Hoffmann <kraxel@redhat.com>

Suggested-by: Gerd Hoffmann <kraxel@redhat.com>
Signed-off-by: Luigi Leonardi <leonardi@redhat.com>
---
Luigi Leonardi (3):
      hw/core/platform-bus: fix crash when num_irqs is zero
      hw/i386/microvm: add platform bus support
      hw/i386/microvm: add uefi-vars-sysbus support

 hw/core/platform-bus.c    |  4 ++++
 hw/i386/Kconfig           |  1 +
 hw/i386/microvm-dt.c      |  9 +++++++++
 hw/i386/microvm.c         | 38 ++++++++++++++++++++++++++++++++++++++
 include/hw/i386/microvm.h |  4 ++++
 5 files changed, 56 insertions(+)
---
base-commit: f38d6ae70f100fc8d3f095a842d2f1ca29262218
change-id: 20260701-microvm_uefi_var-8a434ce7f8b9

Best regards,
-- 
Luigi Leonardi <leonardi@redhat.com>