mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-07-31 22:33:53 -06:00
virtio-iommu: Rename reserved_regions into prop_resv_regions
Rename VirtIOIOMMU (nb_)reserved_regions fields with the "prop_" prefix to highlight those fields are set through a property, at machine level. They are IOMMU wide. A subsequent patch will introduce per IOMMUDevice reserved regions that will include both those IOMMU wide property reserved regions plus, sometimes, host reserved regions, if the device is backed by a host device protected by a physical IOMMU. Also change nb_ prefix by nr_. Signed-off-by: Eric Auger <eric.auger@redhat.com> Reviewed-by: Cédric Le Goater <clg@redhat.com> Reviewed-by: "Michael S. Tsirkin" <mst@redhat.com> Signed-off-by: Cédric Le Goater <clg@redhat.com>
This commit is contained in:
parent
e4a8ae09c5
commit
41cc70cdf5
3 changed files with 14 additions and 13 deletions
|
@ -37,7 +37,7 @@ struct VirtIOIOMMUPCI {
|
|||
static Property virtio_iommu_pci_properties[] = {
|
||||
DEFINE_PROP_UINT32("class", VirtIOPCIProxy, class_code, 0),
|
||||
DEFINE_PROP_ARRAY("reserved-regions", VirtIOIOMMUPCI,
|
||||
vdev.nb_reserved_regions, vdev.reserved_regions,
|
||||
vdev.nr_prop_resv_regions, vdev.prop_resv_regions,
|
||||
qdev_prop_reserved_region, ReservedRegion),
|
||||
DEFINE_PROP_END_OF_LIST(),
|
||||
};
|
||||
|
@ -54,9 +54,9 @@ static void virtio_iommu_pci_realize(VirtIOPCIProxy *vpci_dev, Error **errp)
|
|||
"for the virtio-iommu-pci device");
|
||||
return;
|
||||
}
|
||||
for (int i = 0; i < s->nb_reserved_regions; i++) {
|
||||
if (s->reserved_regions[i].type != VIRTIO_IOMMU_RESV_MEM_T_RESERVED &&
|
||||
s->reserved_regions[i].type != VIRTIO_IOMMU_RESV_MEM_T_MSI) {
|
||||
for (int i = 0; i < s->nr_prop_resv_regions; i++) {
|
||||
if (s->prop_resv_regions[i].type != VIRTIO_IOMMU_RESV_MEM_T_RESERVED &&
|
||||
s->prop_resv_regions[i].type != VIRTIO_IOMMU_RESV_MEM_T_MSI) {
|
||||
error_setg(errp, "reserved region %d has an invalid type", i);
|
||||
error_append_hint(errp, "Valid values are 0 and 1\n");
|
||||
return;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue