From mboxrd@z Thu Jan 1 00:00:00 1970 From: Andrew Cooper Subject: Re: [RFC v1 01/15] iommu: Add iommu_intpost to control VT-d Posted-Interrupts feature Date: Fri, 27 Mar 2015 09:55:13 +0000 Message-ID: <55152901.8090700@citrix.com> References: <1427286717-4093-1-git-send-email-feng.wu@intel.com> <1427286717-4093-2-git-send-email-feng.wu@intel.com> <5514445E.6070105@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 04:46, Wu, Feng wrote: >>> * no-snoop Disable VT-d Snoop Control >>> * no-qinval Disable VT-d Queued Invalidation >>> * no-intremap Disable VT-d Interrupt Remapping >>> + * no-intpost Disable VT-d Interrupt posting >>> */ >>> custom_param("iommu", parse_iommu_param); >>> bool_t __initdata iommu_enable = 1; >>> @@ -51,6 +52,7 @@ bool_t __read_mostly iommu_passthrough; >>> bool_t __read_mostly iommu_snoop = 1; >>> bool_t __read_mostly iommu_qinval = 1; >>> bool_t __read_mostly iommu_intremap = 1; >>> +bool_t __read_mostly iommu_intpost = 0; >>> bool_t __read_mostly iommu_hap_pt_share = 1; >>> bool_t __read_mostly iommu_debug; >>> bool_t __read_mostly amd_iommu_perdev_intremap = 1; >>> @@ -94,7 +96,11 @@ static void __init parse_iommu_param(char *s) >>> else if ( !strcmp(s, "qinval") ) >>> iommu_qinval = val; >>> else if ( !strcmp(s, "intremap") ) >>> + { >>> iommu_intremap = val; >>> + if ( iommu_intremap == 0 ) >>> + iommu_intpost = 0; >>> + } >>> else if ( !strcmp(s, "debug") ) >>> { >>> iommu_debug = val; >> At no point here do you add an strcmp(s, "intpost"), which means that >> you do not alter the allowable command line syntax. >> >> intpost must be able to be controlled independently of intremap, so I >> suggest >> >> else if ( !strcmp(s, "intpost") ) >> iommu_intpost = val; > In this patch, I only define variable 'iommu_qinval' and implement some > logics related to it, while command line 'intpost' is added and checked in > patch [15/15]. So before patch [15/15] these patches don't take effect. I noticed that when I got to the end of the series. Doing it like that is ok, but you must make sure that you edit xen-command-line.markdown in the patch which changes the parsing. ~Andrew