Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 4cee4b72 authored by Alex Williamson's avatar Alex Williamson Committed by Marcelo Tosatti
Browse files

kvm: KVM_CAP_IOMMU only available with device assignment



Fix build with CONFIG_PCI unset by linking KVM_CAP_IOMMU to
device assignment config option.  It has no purpose otherwise.

Signed-off-by: default avatarAlex Williamson <alex.williamson@redhat.com>
Reported-by: default avatarRandy Dunlap <rdunlap@infradead.org>
Acked-by: default avatarRandy Dunlap <rdunlap@infradead.org>
Signed-off-by: default avatarMarcelo Tosatti <mtosatti@redhat.com>
parent 5a2892ce
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -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;
	}
+2 −0
Original line number Diff line number Diff line
@@ -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;