lkml.org 
[lkml]   [2014]   [Sep]   [8]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH 10/12] vfio: Convert to use new iommu_capable() API function
From
Date
On Fri, 2014-09-05 at 12:53 +0200, Joerg Roedel wrote:
> From: Joerg Roedel <jroedel@suse.de>
>
> Cc: Alex Williamson <alex.williamson@redhat.com>
> Signed-off-by: Joerg Roedel <jroedel@suse.de>

Nice, we can do some further simplifications if I no longer need to
create a domain and add properties to it in order to test capabilities,
but that can all be done later.

Acked-by: Alex Williamson <alex.williamson@redhat.com>

> ---
> drivers/vfio/vfio_iommu_type1.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/vfio/vfio_iommu_type1.c b/drivers/vfio/vfio_iommu_type1.c
> index 0734fbe..562f686 100644
> --- a/drivers/vfio/vfio_iommu_type1.c
> +++ b/drivers/vfio/vfio_iommu_type1.c
> @@ -713,14 +713,14 @@ static int vfio_iommu_type1_attach_group(void *iommu_data,
> list_add(&group->next, &domain->group_list);
>
> if (!allow_unsafe_interrupts &&
> - !iommu_domain_has_cap(domain->domain, IOMMU_CAP_INTR_REMAP)) {
> + !iommu_capable(bus, IOMMU_CAP_INTR_REMAP)) {
> pr_warn("%s: No interrupt remapping support. Use the module param \"allow_unsafe_interrupts\" to enable VFIO IOMMU support on this platform\n",
> __func__);
> ret = -EPERM;
> goto out_detach;
> }
>
> - if (iommu_domain_has_cap(domain->domain, IOMMU_CAP_CACHE_COHERENCY))
> + if (iommu_capable(bus, IOMMU_CAP_CACHE_COHERENCY))
> domain->prot |= IOMMU_CACHE;
>
> /*





\
 
 \ /
  Last update: 2014-09-09 01:41    [W:1.085 / U:0.200 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site