kvm: KVM_CAP_IOMMU only available with device assignment
PATCH 1/1 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 Alex Williamson <[email protected]>
--- arch/ia64/kvm/kvm-ia64.c | 2 ++ arch/x86/kvm/x86.c | 2 ++ 2 files changed, 4 insertions(+)
arch/ia64/kvm/kvm-ia64.c +2 -0
@@ -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 ; }
arch/x86/kvm/x86.c +2 -0
@@ -2543,9 +2543,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 ;
Quoted 4 lines · Alex Williamson
Fix build with
CONFIG_PCIunset by linkingKVM_CAP_IOMMUto device assignment config option. It has no purpose otherwise.Signed-off-by Alex Williamson <[email protected]>
Reported-by Randy Dunlap <[email protected]>
Acked-by Randy Dunlap <[email protected]>
Thanks.
Quoted 39 lines
--- arch/ia64/kvm/kvm-ia64.c | 2 ++ arch/x86/kvm/x86.c | 2 ++ 2 files changed, 4 insertions(+)arch/ia64/kvm/kvm-ia64.c +2
-0@@ -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 ; }arch/x86/kvm/x86.c +2
-1@@ -2543,9 +2543,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 ; --
Signature · 1 line
~Randy
Marcelo Tosatti
AppliedQuoted 10 lines · Randy Dunlap
Quoted 4 lines · Alex Williamson
Fix build with
CONFIG_PCIunset by linkingKVM_CAP_IOMMUto device assignment config option. It has no purpose otherwise.Signed-off-by Alex Williamson <[email protected]>Reported-by Randy Dunlap <[email protected]>Acked-by Randy Dunlap <[email protected]>Thanks.
Applied, thanks.