From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Chen, Tiejun" Subject: Re: [v7][PATCH 03/16] xen/passthrough: extend hypercall to support rdm reservation policy Date: Tue, 14 Jul 2015 18:53:21 +0800 Message-ID: <55A4EA21.4020909@intel.com> References: <1436420047-25356-1-git-send-email-tiejun.chen@intel.com> <1436420047-25356-4-git-send-email-tiejun.chen@intel.com> <55A35EFA.9030304@intel.com> <55A4E88E.9060502@eu.citrix.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii"; Format="flowed" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <55A4E88E.9060502@eu.citrix.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: George Dunlap Cc: Kevin Tian , Keir Fraser , Suravee Suthikulpanit , Andrew Cooper , Tim Deegan , "xen-devel@lists.xen.org" , Aravind Gopalakrishnan , Jan Beulich , Yang Zhang , Stefano Stabellini , Ian Campbell List-Id: xen-devel@lists.xenproject.org > The way this sort of thing is defined in the rest of domctl.h is like this: > > #define _XEN_DOMCTL_CDF_hvm_guest 0 > #define XEN_DOMCTL_CDF_hvm_guest (1U<<_XEN_DOMCTL_CDF_hvm_guest) > > So the above should be > > #define _XEN_DOMCTL_DEV_RDM_RELAXED 0 > #define XEN_DOMCTL_DEV_RDM_RELAXED (1U<<_XEN_DOMCTL_DEV_RDM_RELAXED) > > And then your check in iommu_do_pci_domctl() would look like > > if (flag & ~XEN_DOMCTL_DEV_RDM_RELAXED) > > And if we end up adding any extra flags, we just | them into the above > conditional, as is done in, for example, the XEN_DOMCTL_createdomain > case in xen/common/domctl.c:do_domctl(). > Seems Jan didn't like this way IIRC, so I hope Jan also can have a look at this beforehand :) Thanks Tiejun