lkml.org 
[lkml]   [2020]   [May]   [12]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    Date
    From
    SubjectRe: [PATCH v5] iommu/virtio: Use page size bitmap supported by endpoint
    On Tue, May 12, 2020 at 10:53:39AM -0400, Michael S. Tsirkin wrote:
    > > static int viommu_add_resv_mem(struct viommu_endpoint *vdev,
    > > struct virtio_iommu_probe_resv_mem *mem,
    > > size_t len)
    > > @@ -499,6 +513,9 @@ static int viommu_probe_endpoint(struct viommu_dev *viommu, struct device *dev)
    > > case VIRTIO_IOMMU_PROBE_T_RESV_MEM:
    > > ret = viommu_add_resv_mem(vdev, (void *)prop, len);
    > > break;
    > > + case VIRTIO_IOMMU_PROBE_T_PAGE_SIZE_MASK:
    > > + ret = viommu_set_pgsize_bitmap(vdev, (void *)prop, len);
    > > + break;
    > > default:
    > > dev_err(dev, "unknown viommu prop 0x%x\n", type);
    > > }
    >
    > So given this is necessary early in boot, how about we
    > add this in the config space? And maybe ACPI too ...

    A page_size_mask field is already in the config space and applies to all
    endpoints. Here we add a property to override the global value for
    individual endpoints. It can be necessary when mixing physical (pass-
    through) and virtual endpoints under the same virtio-iommu device.

    Thanks,
    Jean

    \
     
     \ /
      Last update: 2020-05-12 18:48    [W:3.438 / U:0.004 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site