lkml.org 
[lkml]   [2015]   [Jan]   [29]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRE: [v3 08/26] iommu, x86: Add intel_irq_remapping_capability() for Intel
Date


> -----Original Message-----
> From: David Woodhouse [mailto:dwmw2@infradead.org]
> Sent: Wednesday, January 28, 2015 11:38 PM
> To: Wu, Feng
> Cc: tglx@linutronix.de; mingo@redhat.com; hpa@zytor.com; x86@kernel.org;
> gleb@kernel.org; pbonzini@redhat.com; joro@8bytes.org;
> alex.williamson@redhat.com; jiang.liu@linux.intel.com; eric.auger@linaro.org;
> linux-kernel@vger.kernel.org; iommu@lists.linux-foundation.org;
> kvm@vger.kernel.org
> Subject: Re: [v3 08/26] iommu, x86: Add intel_irq_remapping_capability() for
> Intel
>
> On Fri, 2014-12-12 at 23:14 +0800, Feng Wu wrote:
> > Add the Intel side implementation for capability in
> > struct irq_remap_ops.
> >
> > Signed-off-by: Feng Wu <feng.wu@intel.com>
> > Reviewed-by: Jiang Liu <jiang.liu@linux.intel.com>
>
> > +static bool intel_irq_remapping_capability(enum irq_remap_cap cap)
> > +{
> > + struct dmar_drhd_unit *drhd;
> > + struct intel_iommu *iommu;
> > +
> > + switch (cap) {
> > + case IRQ_POSTING_CAP:
> > + /*
> > + * If 1) posted-interrupts is disabled by user
> > + * or 2) irq remapping is disabled, posted-interrupts
> > + * is not supported.
> > + */
> > + if (disable_irq_post || !irq_remapping_enabled)
> > + return 0;
> > +
> > + for_each_iommu(iommu, drhd)
> > + if (!cap_pi_support(iommu->cap))
> > + return 0;
> > +
>
> If a new IOMMU is hotplugged now which doesn't support posted
> interrupts, what happens?

Good question, Just had a offline discussion with Jiang Liu, actually, there
is the same question for IR. In the current implementation, If IR is in use
and a new IOMMU without IR capability is hotplugged, it will reject this
hotplugging. I think I can simple follow the same policy for PI.

Thanks,
Feng

>
> --
> David Woodhouse Open Source Technology
> Centre
> David.Woodhouse@intel.com Intel
> Corporation
\
 
 \ /
  Last update: 2015-01-29 11:21    [W:0.117 / U:0.296 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site