[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20210922152407.1bfa6ff7.alex.williamson@redhat.com>
Date: Wed, 22 Sep 2021 15:24:07 -0600
From: Alex Williamson <alex.williamson@...hat.com>
To: Liu Yi L <yi.l.liu@...el.com>
Cc: jgg@...dia.com, hch@....de, jasowang@...hat.com, joro@...tes.org,
jean-philippe@...aro.org, kevin.tian@...el.com, parav@...lanox.com,
lkml@...ux.net, pbonzini@...hat.com, lushenming@...wei.com,
eric.auger@...hat.com, corbet@....net, ashok.raj@...el.com,
yi.l.liu@...ux.intel.com, jun.j.tian@...el.com, hao.wu@...el.com,
dave.jiang@...el.com, jacob.jun.pan@...ux.intel.com,
kwankhede@...dia.com, robin.murphy@....com, kvm@...r.kernel.org,
iommu@...ts.linux-foundation.org, dwmw2@...radead.org,
linux-kernel@...r.kernel.org, baolu.lu@...ux.intel.com,
david@...son.dropbear.id.au, nicolinc@...dia.com
Subject: Re: [RFC 10/20] iommu/iommufd: Add IOMMU_DEVICE_GET_INFO
On Sun, 19 Sep 2021 14:38:38 +0800
Liu Yi L <yi.l.liu@...el.com> wrote:
> +struct iommu_device_info {
> + __u32 argsz;
> + __u32 flags;
> +#define IOMMU_DEVICE_INFO_ENFORCE_SNOOP (1 << 0) /* IOMMU enforced snoop */
Is this too PCI specific, or perhaps too much of the mechanism rather
than the result? ie. should we just indicate if the IOMMU guarantees
coherent DMA? Thanks,
Alex
> +#define IOMMU_DEVICE_INFO_PGSIZES (1 << 1) /* supported page sizes */
> +#define IOMMU_DEVICE_INFO_ADDR_WIDTH (1 << 2) /* addr_wdith field valid */
> + __u64 dev_cookie;
> + __u64 pgsize_bitmap;
> + __u32 addr_width;
> +};
> +
> +#define IOMMU_DEVICE_GET_INFO _IO(IOMMU_TYPE, IOMMU_BASE + 1)
>
> #define IOMMU_FAULT_PERM_READ (1 << 0) /* read */
> #define IOMMU_FAULT_PERM_WRITE (1 << 1) /* write */
Powered by blists - more mailing lists