aboutsummaryrefslogtreecommitdiff
path: root/hw/virtio/virtio-scsi-pci.c
diff options
context:
space:
mode:
authorEric Auger <eric.auger@redhat.com>2020-02-14 14:27:38 +0100
committerMichael S. Tsirkin <mst@redhat.com>2020-02-27 03:46:10 -0500
commitcfb42188b24d5904f82cd609185847a1168226e3 (patch)
tree261f5241d0011ed8bd76fb9531753a0a8e3713a9 /hw/virtio/virtio-scsi-pci.c
parent5442b854eaf921588e24d5711640ab71e59cb1b8 (diff)
virtio-iommu: Implement attach/detach command
This patch implements the endpoint attach/detach to/from a domain. Domain and endpoint internal datatypes are introduced. Both are stored in RB trees. The domain owns a list of endpoints attached to it. Also helpers to get/put end points and domains are introduced. As for the IOMMU memory regions, a callback is called on PCI bus enumeration that initializes for a given device on the bus hierarchy an IOMMU memory region. The PCI bus hierarchy is stored locally in IOMMUPciBus and IOMMUDevice objects. At the time of the enumeration, the bus number may not be computed yet. So operations that will need to retrieve the IOMMUdevice and its IOMMU memory region from the bus number and devfn, once the bus number is garanteed to be frozen, use an array of IOMMUPciBus, lazily populated. Signed-off-by: Eric Auger <eric.auger@redhat.com> Reviewed-by: Peter Xu <peterx@redhat.com> Reviewed-by: Michael S. Tsirkin <mst@redhat.com> Message-Id: <20200214132745.23392-4-eric.auger@redhat.com> Reviewed-by: Michael S. Tsirkin <mst@redhat.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Diffstat (limited to 'hw/virtio/virtio-scsi-pci.c')
0 files changed, 0 insertions, 0 deletions