[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
RE: [EXT] Re: [PATCH v9 4/9] virtio-iommu: set supported page size mask
From: |
Bharat Bhushan |
Subject: |
RE: [EXT] Re: [PATCH v9 4/9] virtio-iommu: set supported page size mask |
Date: |
Fri, 27 Mar 2020 05:13:11 +0000 |
Hi Eric,
> -----Original Message-----
> From: Auger Eric <address@hidden>
> Sent: Thursday, March 26, 2020 9:22 PM
> To: Bharat Bhushan <address@hidden>; address@hidden;
> address@hidden; address@hidden; address@hidden;
> address@hidden; address@hidden; Tomasz Nowicki [C]
> <address@hidden>; address@hidden; address@hidden; qemu-
> address@hidden; address@hidden; address@hidden; jean-
> address@hidden; address@hidden
> Subject: [EXT] Re: [PATCH v9 4/9] virtio-iommu: set supported page size mask
>
> External Email
>
> ----------------------------------------------------------------------
> Hi Bharat,
>
> On 3/23/20 9:46 AM, Bharat Bhushan wrote:
> > Add optional interface to set page size mask.
> > Currently this is set global configuration and not per endpoint.
> This allows to override the page size mask per end-point?
This patch adds per endpoint page-size-mask configuration in addition to global
page-size-mask.
endpoint page-size-mask will override global page-size-mask configuration for
that endpoint.
Thanks
-Bharat
> >
> > Signed-off-by: Bharat Bhushan <address@hidden>
> > ---
> > include/hw/virtio/virtio-iommu.h | 1 +
> > hw/virtio/virtio-iommu.c | 9 +++++++++
> > 2 files changed, 10 insertions(+)
> >
> > diff --git a/include/hw/virtio/virtio-iommu.h
> > b/include/hw/virtio/virtio-iommu.h
> > index 6f67f1020a..4efa09610a 100644
> > --- a/include/hw/virtio/virtio-iommu.h
> > +++ b/include/hw/virtio/virtio-iommu.h
> > @@ -35,6 +35,7 @@ typedef struct IOMMUDevice {
> > void *viommu;
> > PCIBus *bus;
> > int devfn;
> > + uint64_t page_size_mask;
> > IOMMUMemoryRegion iommu_mr;
> > AddressSpace as;
> > } IOMMUDevice;
> > diff --git a/hw/virtio/virtio-iommu.c b/hw/virtio/virtio-iommu.c index
> > 4cee8083bc..a28818202c 100644
> > --- a/hw/virtio/virtio-iommu.c
> > +++ b/hw/virtio/virtio-iommu.c
> > @@ -650,6 +650,14 @@ static gint int_cmp(gconstpointer a, gconstpointer b,
> gpointer user_data)
> > return (ua > ub) - (ua < ub);
> > }
> >
> > +static void virtio_iommu_set_page_size_mask(IOMMUMemoryRegion *mr,
> > + uint64_t page_size_mask)
> > +{
> > + IOMMUDevice *sdev = container_of(mr, IOMMUDevice, iommu_mr);
> > +
> > + sdev->page_size_mask = page_size_mask; }
> > +
> > static void virtio_iommu_device_realize(DeviceState *dev, Error
> > **errp) {
> > VirtIODevice *vdev = VIRTIO_DEVICE(dev); @@ -865,6 +873,7 @@
> > static void virtio_iommu_memory_region_class_init(ObjectClass *klass,
> > IOMMUMemoryRegionClass *imrc =
> IOMMU_MEMORY_REGION_CLASS(klass);
> >
> > imrc->translate = virtio_iommu_translate;
> > + imrc->iommu_set_page_size_mask = virtio_iommu_set_page_size_mask;
> > }
> >
> > static const TypeInfo virtio_iommu_info = {
> >
> Thanks
>
> Eric
- Re: [PATCH v9 1/9] hw/vfio/common: Remove error print on mmio region translation by viommu, (continued)
[PATCH v9 2/9] memory: Add interface to set iommu page size mask, Bharat Bhushan, 2020/03/23
[PATCH v9 3/9] vfio: set iommu page size as per host supported page size, Bharat Bhushan, 2020/03/23
[PATCH v9 4/9] virtio-iommu: set supported page size mask, Bharat Bhushan, 2020/03/23
[PATCH v9 5/9] virtio-iommu: Add iommu notifier for map/unmap, Bharat Bhushan, 2020/03/23
[PATCH v9 6/9] virtio-iommu: Call iommu notifier for attach/detach, Bharat Bhushan, 2020/03/23
[PATCH v9 7/9] virtio-iommu: add iommu replay, Bharat Bhushan, 2020/03/23
[PATCH v9 8/9] virtio-iommu: Implement probe request, Bharat Bhushan, 2020/03/23
[PATCH v9 9/9] virtio-iommu: add iommu notifier memory-region, Bharat Bhushan, 2020/03/23
Re: [PATCH v9 0/9] virtio-iommu: VFIO integration, no-reply, 2020/03/23