Re: [PATCH 0/3] bhyve: enabling bus enumeration

From: Corvin Khne <corvink_at_FreeBSD.org>
Date: Tue, 06 Jun 2023 09:56:24 UTC
On Thu, 2023-05-11 at 15:05 +0200, Corvin Köhne wrote:
> Hi,
> 
> this is the next patch series, it'd like to send to the EDKII
> project.
> It enables bus enumeration. The use case for this is PCI ROM support.
> 
> Enabling bus enumeration means that the firmware reassigns the
> address
> of the BAR of all PCI devices and executes PCI ROMs if it find some.
> Our
> previous approach was that bhyve assigns the address of all BARs.
> This
> is required in cases were no firmware is available like booting with
> bhyveload or grub2-bhyve. While reassigning BARs in guest firmware
> seems
> unnecessary, it's required to fully support PCI ROMs.
> 
> Some use cases where bus enumeration is required:
> 1. GPU passthrough
>    Here bus enumeration solves two issues:
>    1. The ROM can contain a GOP driver. This is required for
> graphical
>       output before the OS driver is loaded.
>    2. The linux drm driver has a dependency on the ROM. As GPU ROMs
> are
>       shadowed in system memory, it searches for this shadowed
> version.
>       So, drm won't be able to find the ROM if bus enumeration is
>       disabled and refuses to load.
> 2. NIC passthrough
>    The ROM can contain a PXE driver which is required to PXE boot
> from
>    this device.
> 
> Any feedback is appreciated.
> 
> 
> Thanks,
> Corvin
> 
> Corvin Köhne (3):
>   Revert "OvmfPkg/Bhyve: consume PciHostBridgeLibScan"
>   Revert "OvmfPkg/Bhyve: remove IncompatiblePciDeviceSupport DXE
> driver"
>   OvmfPkg/BhyveBhfPkg: enable bus enumeration
> 
>  OvmfPkg/Bhyve/BhyveX64.dsc | 4 ++--
>  OvmfPkg/Bhyve/BhyveX64.fdf | 1 +
>  2 files changed, 3 insertions(+), 2 deletions(-)
> 

If I don't get any feedback within a week, I'm going to send this patch
series to the EDKII project.


-- 
Kind regards,
Corvin