summaryrefslogtreecommitdiffstats
path: root/arch/x86/include/asm/irq_remapping.h
diff options
context:
space:
mode:
authorFeng Wu <feng.wu@intel.com>2015-06-09 13:20:36 +0800
committerThomas Gleixner <tglx@linutronix.de>2015-06-12 11:33:52 +0200
commit959c870f7305be019d9316bc4e038dc6119d51ad (patch)
treeb20a409d969a0757a987da7c0e8630b0f882e6bd /arch/x86/include/asm/irq_remapping.h
parent3d9b98f4ec17ba8d555f1972a3870035a87574a0 (diff)
downloadlinux-959c870f7305be019d9316bc4e038dc6119d51ad.tar.bz2
iommu, x86: Provide irq_remapping_cap() interface
Add a new interface irq_remapping_cap() to detect whether irq remapping supports new features, such as VT-d Posted-Interrupts. Export the function, so that KVM code can check this and use this mechanism properly. Signed-off-by: Feng Wu <feng.wu@intel.com> Reviewed-by: Jiang Liu <jiang.liu@linux.intel.com> Reviewed-by: Thomas Gleixner <tglx@linutronix.de> Acked-by: Joerg Roedel <joro@8bytes.org> Cc: iommu@lists.linux-foundation.org Cc: dwmw2@infradead.org Link: http://lkml.kernel.org/r/1433827237-3382-10-git-send-email-feng.wu@intel.com Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Diffstat (limited to 'arch/x86/include/asm/irq_remapping.h')
-rw-r--r--arch/x86/include/asm/irq_remapping.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/arch/x86/include/asm/irq_remapping.h b/arch/x86/include/asm/irq_remapping.h
index e479fbda55cf..046c7fb1ca43 100644
--- a/arch/x86/include/asm/irq_remapping.h
+++ b/arch/x86/include/asm/irq_remapping.h
@@ -35,6 +35,7 @@ enum irq_remap_cap {
#ifdef CONFIG_IRQ_REMAP
+extern bool irq_remapping_cap(enum irq_remap_cap cap);
extern void set_irq_remapping_broken(void);
extern int irq_remapping_prepare(void);
extern int irq_remapping_enable(void);
@@ -64,6 +65,7 @@ struct vcpu_data {
#else /* CONFIG_IRQ_REMAP */
+static inline bool irq_remapping_cap(enum irq_remap_cap cap) { return 0; }
static inline void set_irq_remapping_broken(void) { }
static inline int irq_remapping_prepare(void) { return -ENODEV; }
static inline int irq_remapping_enable(void) { return -ENODEV; }