diff options
author | Philippe Mathieu-Daudé <philmd@linaro.org> | 2023-03-13 16:30:31 +0100 |
---|---|---|
committer | Michael S. Tsirkin <mst@redhat.com> | 2023-04-21 04:25:52 -0400 |
commit | 5ec7755eb7c503fc66fe44083ee5113bd5b87bd9 (patch) | |
tree | d5c13dc715966180272b4bcb84ebf3642cab3444 /include/hw/i386/vmport.h | |
parent | 7f5a459dc8132bd15c28a0d2af1f0cf844ee19f4 (diff) |
hw/i386/amd_iommu: Factor amdvi_pci_realize out of amdvi_sysbus_realize
Aside the Frankenstein model of a SysBusDevice realizing a PCIDevice,
QOM parents shouldn't access children internals. In this particular
case, amdvi_sysbus_realize() is just open-coding TYPE_AMD_IOMMU_PCI's
DeviceRealize() handler. Factor it out.
Declare QOM-cast macros with OBJECT_DECLARE_SIMPLE_TYPE() so we can
cast the AMDVIPCIState in amdvi_pci_realize().
Note this commit removes the single use in the repository of
pci_add_capability() and msi_init() on a *realized* QDev instance.
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Message-Id: <20230313153031.86107-7-philmd@linaro.org>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Diffstat (limited to 'include/hw/i386/vmport.h')
0 files changed, 0 insertions, 0 deletions