Skip to content

Commit

Permalink
kvm: iommu: Convert to use new iommu_capable() API function
Browse files Browse the repository at this point in the history
Cc: Gleb Natapov <[email protected]>
Cc: Paolo Bonzini <[email protected]>
Signed-off-by: Joerg Roedel <[email protected]>
  • Loading branch information
joergroedel committed Sep 25, 2014
1 parent 7c2aa64 commit ee5ba30
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions virt/kvm/iommu.c
Original file line number Diff line number Diff line change
Expand Up @@ -191,8 +191,7 @@ int kvm_assign_device(struct kvm *kvm,
return r;
}

noncoherent = !iommu_domain_has_cap(kvm->arch.iommu_domain,
IOMMU_CAP_CACHE_COHERENCY);
noncoherent = !iommu_capable(&pci_bus_type, IOMMU_CAP_CACHE_COHERENCY);

/* Check if need to update IOMMU page table for guest memory */
if (noncoherent != kvm->arch.iommu_noncoherent) {
Expand Down Expand Up @@ -254,8 +253,7 @@ int kvm_iommu_map_guest(struct kvm *kvm)
}

if (!allow_unsafe_assigned_interrupts &&
!iommu_domain_has_cap(kvm->arch.iommu_domain,
IOMMU_CAP_INTR_REMAP)) {
!iommu_capable(&pci_bus_type, IOMMU_CAP_INTR_REMAP)) {
printk(KERN_WARNING "%s: No interrupt remapping support,"
" disallowing device assignment."
" Re-enble with \"allow_unsafe_assigned_interrupts=1\""
Expand Down

0 comments on commit ee5ba30

Please sign in to comment.