kvm: KVM_CAP_IOMMU only available with device assignment
authorAlex Williamson <alex.williamson@redhat.com>
Mon, 29 Apr 2013 16:54:08 +0000 (10:54 -0600)
committerMarcelo Tosatti <mtosatti@redhat.com>
Tue, 30 Apr 2013 02:08:50 +0000 (23:08 -0300)
Fix build with CONFIG_PCI unset by linking KVM_CAP_IOMMU to
device assignment config option.  It has no purpose otherwise.

Signed-off-by: Alex Williamson <alex.williamson@redhat.com>
Reported-by: Randy Dunlap <rdunlap@infradead.org>
Acked-by: Randy Dunlap <rdunlap@infradead.org>
Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>
arch/ia64/kvm/kvm-ia64.c
arch/x86/kvm/x86.c

index dcc560729c2032dfd3785bbd3227f112bf1006ef..5b2dc0d10c8f4211d28e044a2071306d1ef955ed 100644 (file)
@@ -204,9 +204,11 @@ int kvm_dev_ioctl_check_extension(long ext)
        case KVM_CAP_COALESCED_MMIO:
                r = KVM_COALESCED_MMIO_PAGE_OFFSET;
                break;
+#ifdef CONFIG_KVM_DEVICE_ASSIGNMENT
        case KVM_CAP_IOMMU:
                r = iommu_present(&pci_bus_type);
                break;
+#endif
        default:
                r = 0;
        }
index 8747fef7fd590e8bf394d251d1490544bec627eb..96f914e828d4832921a9e4b9b7cdd0fabd3dd870 100644 (file)
@@ -2544,9 +2544,11 @@ int kvm_dev_ioctl_check_extension(long ext)
        case KVM_CAP_PV_MMU:    /* obsolete */
                r = 0;
                break;
+#ifdef CONFIG_KVM_DEVICE_ASSIGNMENT
        case KVM_CAP_IOMMU:
                r = iommu_present(&pci_bus_type);
                break;
+#endif
        case KVM_CAP_MCE:
                r = KVM_MAX_MCE_BANKS;
                break;