From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1761533AbbA2KCK (ORCPT ); Thu, 29 Jan 2015 05:02:10 -0500 Received: from mga02.intel.com ([134.134.136.20]:24232 "EHLO mga02.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1758035AbbA2JCO (ORCPT ); Thu, 29 Jan 2015 04:02:14 -0500 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.09,485,1418112000"; d="scan'208";a="644377745" From: "Wu, Feng" To: David Woodhouse 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" , "Wu, Feng" Subject: RE: [v3 08/26] iommu, x86: Add intel_irq_remapping_capability() for Intel Thread-Topic: [v3 08/26] iommu, x86: Add intel_irq_remapping_capability() for Intel Thread-Index: AQHQOxByI31ejjIomkibqdBFW7WQ7ZzWxs2A Date: Thu, 29 Jan 2015 08:57:54 +0000 Message-ID: References: <1418397300-10870-1-git-send-email-feng.wu@intel.com> <1418397300-10870-9-git-send-email-feng.wu@intel.com> <1422459450.5293.62.camel@infradead.org> In-Reply-To: <1422459450.5293.62.camel@infradead.org> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [10.239.127.40] Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Transfer-Encoding: 8bit X-MIME-Autoconverted: from base64 to 8bit by nfs id t0TA2GMA014621 > -----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 > > Reviewed-by: Jiang Liu > > > +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 {.n++%ݶw{.n+{G{ayʇڙ,jfhz_(階ݢj"mG?&~iOzv^m ?I