Skip to content

Commit ee5ba30

Browse files
committed
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>
1 parent 7c2aa64 commit ee5ba30

1 file changed

Lines changed: 2 additions & 4 deletions

File tree

‎virt/kvm/iommu.c‎

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -191,8 +191,7 @@ int kvm_assign_device(struct kvm *kvm,
191191
return r;
192192
}
193193

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

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

256255
if (!allow_unsafe_assigned_interrupts &&
257-
!iommu_domain_has_cap(kvm->arch.iommu_domain,
258-
IOMMU_CAP_INTR_REMAP)) {
256+
!iommu_capable(&pci_bus_type, IOMMU_CAP_INTR_REMAP)) {
259257
printk(KERN_WARNING "%s: No interrupt remapping support,"
260258
" disallowing device assignment."
261259
" Re-enble with \"allow_unsafe_assigned_interrupts=1\""

0 commit comments

Comments
 (0)