OSDN Git Service

fw_cfg: Refactor extra pci roots addition
authorJiahui Cen <cenjiahui@huawei.com>
Thu, 19 Nov 2020 01:48:34 +0000 (09:48 +0800)
committerMichael S. Tsirkin <mst@redhat.com>
Tue, 8 Dec 2020 18:48:57 +0000 (13:48 -0500)
commit0abd38885ac0fcdb08653922f339849cad387961
tree5a2084a097ef0a7b60ac74443c7fceadd69cf564
parenta0e2905b4106296eba396630d37bd3f146e721e1
fw_cfg: Refactor extra pci roots addition

Extract extra pci roots addition from pc machine, which could be used by
other machines.

In order to make uefi get the extra roots, it is necessary to write extra
roots into fw_cfg. And only if the uefi knows there are extra roots,
the config spaces of devices behind the root could be obtained.

Signed-off-by: Jiahui Cen <cenjiahui@huawei.com>
Signed-off-by: Yubo Miao <miaoyubo@huawei.com>
Message-Id: <20201119014841.7298-3-cenjiahui@huawei.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
hw/i386/pc.c
hw/nvram/fw_cfg.c
include/hw/nvram/fw_cfg.h