public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] kvm: KVM_CAP_IOMMU only available with device assignment
@ 2013-04-29 16:54 Alex Williamson
  2013-04-29 16:59 ` Randy Dunlap
  0 siblings, 1 reply; 3+ messages in thread
From: Alex Williamson @ 2013-04-29 16:54 UTC (permalink / raw)
  To: gleb, kvm; +Cc: linux-kernel

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>
---
 arch/ia64/kvm/kvm-ia64.c |    2 ++
 arch/x86/kvm/x86.c       |    2 ++
 2 files changed, 4 insertions(+)

diff --git a/arch/ia64/kvm/kvm-ia64.c b/arch/ia64/kvm/kvm-ia64.c
index dcc5607..5b2dc0d 100644
--- a/arch/ia64/kvm/kvm-ia64.c
+++ b/arch/ia64/kvm/kvm-ia64.c
@@ -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;
 	}
diff --git a/arch/x86/kvm/x86.c b/arch/x86/kvm/x86.c
index 73e443f..f83a8e0 100644
--- a/arch/x86/kvm/x86.c
+++ b/arch/x86/kvm/x86.c
@@ -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;


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] kvm: KVM_CAP_IOMMU only available with device assignment
  2013-04-29 16:54 [PATCH] kvm: KVM_CAP_IOMMU only available with device assignment Alex Williamson
@ 2013-04-29 16:59 ` Randy Dunlap
  2013-04-30  2:10   ` Marcelo Tosatti
  0 siblings, 1 reply; 3+ messages in thread
From: Randy Dunlap @ 2013-04-29 16:59 UTC (permalink / raw)
  To: Alex Williamson; +Cc: gleb, kvm, linux-kernel

On 04/29/13 09:54, Alex Williamson wrote:
> 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>

Thanks.


> ---
>  arch/ia64/kvm/kvm-ia64.c |    2 ++
>  arch/x86/kvm/x86.c       |    2 ++
>  2 files changed, 4 insertions(+)
> 
> diff --git a/arch/ia64/kvm/kvm-ia64.c b/arch/ia64/kvm/kvm-ia64.c
> index dcc5607..5b2dc0d 100644
> --- a/arch/ia64/kvm/kvm-ia64.c
> +++ b/arch/ia64/kvm/kvm-ia64.c
> @@ -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;
>  	}
> diff --git a/arch/x86/kvm/x86.c b/arch/x86/kvm/x86.c
> index 73e443f..f83a8e0 100644
> --- a/arch/x86/kvm/x86.c
> +++ b/arch/x86/kvm/x86.c
> @@ -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;
> 
> --


-- 
~Randy

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] kvm: KVM_CAP_IOMMU only available with device assignment
  2013-04-29 16:59 ` Randy Dunlap
@ 2013-04-30  2:10   ` Marcelo Tosatti
  0 siblings, 0 replies; 3+ messages in thread
From: Marcelo Tosatti @ 2013-04-30  2:10 UTC (permalink / raw)
  To: Randy Dunlap; +Cc: Alex Williamson, gleb, kvm, linux-kernel

On Mon, Apr 29, 2013 at 09:59:30AM -0700, Randy Dunlap wrote:
> On 04/29/13 09:54, Alex Williamson wrote:
> > 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>
> 
> Thanks.

Applied, thanks.


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2013-04-30  2:26 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-04-29 16:54 [PATCH] kvm: KVM_CAP_IOMMU only available with device assignment Alex Williamson
2013-04-29 16:59 ` Randy Dunlap
2013-04-30  2:10   ` Marcelo Tosatti

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox