public inbox for kvm@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] KVM: x86: Fix compile when CONFIG_DMAR is not defined
@ 2008-09-16 17:10 Amit Shah
  2008-09-16 17:12 ` Avi Kivity
  0 siblings, 1 reply; 3+ messages in thread
From: Amit Shah @ 2008-09-16 17:10 UTC (permalink / raw)
  To: avi; +Cc: kvm, weidong.han, benami, Amit Shah

intel_iommu_found() is not defined if CONFIG_DMAR is not defined

Signed-off-by: Amit Shah <amit.shah@redhat.com>
---
 include/linux/kvm_host.h |    5 +++++
 1 files changed, 5 insertions(+), 0 deletions(-)

diff --git a/include/linux/kvm_host.h b/include/linux/kvm_host.h
index 6252802..5b9d713 100644
--- a/include/linux/kvm_host.h
+++ b/include/linux/kvm_host.h
@@ -331,6 +331,11 @@ static inline int kvm_iommu_unmap_guest(struct kvm *kvm)
 {
 	return 0;
 }
+
+static inline int intel_iommu_found()
+{
+	return 0;
+}
 #endif /* CONFIG_DMAR */
 
 static inline void kvm_guest_enter(void)
-- 
1.5.4.3


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

* Re: [PATCH] KVM: x86: Fix compile when CONFIG_DMAR is not defined
  2008-09-16 17:10 [PATCH] KVM: x86: Fix compile when CONFIG_DMAR is not defined Amit Shah
@ 2008-09-16 17:12 ` Avi Kivity
  0 siblings, 0 replies; 3+ messages in thread
From: Avi Kivity @ 2008-09-16 17:12 UTC (permalink / raw)
  To: Amit Shah; +Cc: kvm, weidong.han, benami

Amit Shah wrote:
> intel_iommu_found() is not defined if CONFIG_DMAR is not defined
>
> Signed-off-by: Amit Shah <amit.shah@redhat.com>
> ---
>  include/linux/kvm_host.h |    5 +++++
>  1 files changed, 5 insertions(+), 0 deletions(-)
>
> diff --git a/include/linux/kvm_host.h b/include/linux/kvm_host.h
> index 6252802..5b9d713 100644
> --- a/include/linux/kvm_host.h
> +++ b/include/linux/kvm_host.h
> @@ -331,6 +331,11 @@ static inline int kvm_iommu_unmap_guest(struct kvm *kvm)
>  {
>  	return 0;
>  }
> +
> +static inline int intel_iommu_found()
> +{
> +	return 0;
> +}
>  #endif /* CONFIG_DMAR */
>  
>  static inline void kvm_guest_enter(void)
>   

in linux/intel-iommu.h

-- 
I have a truly marvellous patch that fixes the bug which this
signature is too narrow to contain.


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

* [PATCH] KVM: x86: Fix compile when CONFIG_DMAR is not defined
@ 2008-09-16 17:35 Amit Shah
  0 siblings, 0 replies; 3+ messages in thread
From: Amit Shah @ 2008-09-16 17:35 UTC (permalink / raw)
  To: avi; +Cc: kvm, weidong.han, benami, Amit Shah

intel_iommu_found() is not defined if CONFIG_DMAR is not defined

Signed-off-by: Amit Shah <amit.shah@redhat.com>
---
 include/linux/intel-iommu.h |   10 +++++++++-
 1 files changed, 9 insertions(+), 1 deletions(-)

diff --git a/include/linux/intel-iommu.h b/include/linux/intel-iommu.h
index 1490fc0..5fa9d26 100644
--- a/include/linux/intel-iommu.h
+++ b/include/linux/intel-iommu.h
@@ -349,7 +349,15 @@ int intel_iommu_page_mapping(struct dmar_domain *domain, dma_addr_t iova,
 			     u64 hpa, size_t size, int prot);
 void intel_iommu_detach_dev(struct dmar_domain *domain, u8 bus, u8 devfn);
 struct dmar_domain *intel_iommu_find_domain(struct pci_dev *pdev);
-int intel_iommu_found(void);
 u64 intel_iommu_iova_to_pfn(struct dmar_domain *domain, u64 iova);
 
+#ifdef CONFIG_DMAR
+int intel_iommu_found(void);
+#else /* CONFIG_DMAR */
+static inline int intel_iommu_found(void)
+{
+	return 0;
+}
+#endif /* CONFIG_DMAR */
+
 #endif
-- 
1.5.4.3


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

end of thread, other threads:[~2008-09-16 17:35 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-09-16 17:10 [PATCH] KVM: x86: Fix compile when CONFIG_DMAR is not defined Amit Shah
2008-09-16 17:12 ` Avi Kivity
  -- strict thread matches above, loose matches on Subject: below --
2008-09-16 17:35 Amit Shah

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