From mboxrd@z Thu Jan 1 00:00:00 1970 From: Andrew Cooper Subject: Re: [RFC v1 02/15] vt-d: VT-d Posted-Interrupts feature detection Date: Fri, 27 Mar 2015 10:06:05 +0000 Message-ID: <55152B8D.3020102@citrix.com> References: <1427286717-4093-1-git-send-email-feng.wu@intel.com> <1427286717-4093-3-git-send-email-feng.wu@intel.com> <55144C14.3030002@citrix.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii"; Format="flowed" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: "Wu, Feng" , "xen-devel@lists.xen.org" Cc: "Zhang, Yang Z" , "Tian, Kevin" , "keir@xen.org" , "JBeulich@suse.com" List-Id: xen-devel@lists.xenproject.org On 27/03/15 01:21, Wu, Feng wrote: >>> + * Remapping, and Posted Interrupt >>> */ >>> for_each_drhd_unit ( drhd ) >>> { >>> @@ -2146,7 +2148,13 @@ int __init intel_vtd_setup(void) >>> iommu_qinval = 0; >>> >>> if ( iommu_intremap && !ecap_intr_remap(iommu->ecap) ) >>> + { >>> iommu_intremap = 0; >>> + iommu_intpost = 0; >>> + } >>> + >>> + if ( iommu_intpost && !cap_intr_post(iommu->cap)) >> Missing space inside the outer bracket. >> >> I am wondering whether it might be easier, instead of having >> "iommu_intremap = 0; iommu_intpost = 0" all over the place, to instead >> insist that one must check "iommu_intremap && iommu_intpost". > It that case, user must check "iommu_intremap && iommu_intpost" together, > my idea in this patchset is the when iommu_intpost == 1 guarantees "iommu_intremap == 1", > so we only need to check iommu_intpost later. If the configuration gets much more complicated, it might be worth introducing iommu_disable(foo)/iommu_enable(foo) functions which take care of ensuring that the interdependences are met. For now, this is probably the more simple solution. >> Out of interest, which platforms have intpost capabilities? > Another Broadwell platform, not launched yet. Broadwell EP/EX ? I have an SDP to hand, but as it claims to be a "Genuine Intel(R) CPU 0000 @ 1.70GHz", it is not completely trivial to work out what platform it is exactly. ~Andrew