summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoerg Roedel <jroedel@suse.de>2014-09-05 12:54:09 +0400
committerJoerg Roedel <jroedel@suse.de>2014-09-25 17:47:38 +0400
commitee5ba30ff75277cbfcfce2bb3b54211be5105a87 (patch)
tree5df6e6ad9bd2d0ed58bf1fe74946911092841059
parent7c2aa6441e957df85eded3a7297d36a57b210988 (diff)
downloadlinux-ee5ba30ff75277cbfcfce2bb3b54211be5105a87.tar.xz
kvm: iommu: Convert to use new iommu_capable() API function
Cc: Gleb Natapov <gleb@kernel.org> Cc: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Joerg Roedel <jroedel@suse.de>
-rw-r--r--virt/kvm/iommu.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/virt/kvm/iommu.c b/virt/kvm/iommu.c
index 714b94932312..45ee080573f4 100644
--- a/virt/kvm/iommu.c
+++ b/virt/kvm/iommu.c
@@ -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) {
@@ -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\""