On 2/5/21 5:44 PM, Stefan Hajnoczi wrote:
> From: Jagannathan Raman <[email protected]>
>
> PCI host bridge is setup for the remote device process. It is
> implemented using remote-pcihost object. It is an extension of the PCI
> host bridge setup by QEMU.
> Remote-pcihost configures a PCI bus which could be used by the remote
> PCI device to latch on to.
>
> Signed-off-by: Jagannathan Raman <[email protected]>
> Signed-off-by: John G Johnson <[email protected]>
> Signed-off-by: Elena Ufimtseva <[email protected]>
> Reviewed-by: Stefan Hajnoczi <[email protected]>
> Message-id:
> 0871ba857abb2eafacde07e7fe66a3f12415bfb2.1611938319.git.jag.ra...@oracle.com
> Signed-off-by: Stefan Hajnoczi <[email protected]>
> ---
> MAINTAINERS | 2 +
> include/hw/pci-host/remote.h | 29 ++++++++++++++
> hw/pci-host/remote.c | 75 ++++++++++++++++++++++++++++++++++++
> hw/pci-host/Kconfig | 3 ++
> hw/pci-host/meson.build | 1 +
> hw/remote/Kconfig | 1 +
> 6 files changed, 111 insertions(+)
> create mode 100644 include/hw/pci-host/remote.h
> create mode 100644 hw/pci-host/remote.c
...
> +static const TypeInfo remote_pcihost_info = {
> + .name = TYPE_REMOTE_PCIHOST,
> + .parent = TYPE_PCIE_HOST_BRIDGE,
^^^^^^^^^^^^^^^^^^^^^
> + .instance_size = sizeof(RemotePCIHost),
> + .class_init = remote_pcihost_class_init,
> +};
> +
> +static void remote_pcihost_register(void)
> +{
> + type_register_static(&remote_pcihost_info);
> +}
> +
> +type_init(remote_pcihost_register)
> diff --git a/hw/pci-host/Kconfig b/hw/pci-host/Kconfig
> index eb03f0489d..8b8c763c28 100644
> --- a/hw/pci-host/Kconfig
> +++ b/hw/pci-host/Kconfig
> @@ -65,3 +65,6 @@ config PCI_POWERNV
> select PCI_EXPRESS
> select MSI_NONBROKEN
> select PCIE_PORT
> +
> +config REMOTE_PCIHOST
> + bool
select CONFIG_PCI_EXPRESS ?
(Reported by Peter Maydell on s390x)
Side question, does it make sense to enable this feature by
default on all architectures?
Regards,
Phil.