From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Chen, Tiejun" Subject: Re: [v4][PATCH 04/19] xen/passthrough: extend hypercall to support rdm reservation policy Date: Mon, 06 Jul 2015 18:56:45 +0800 Message-ID: <559A5EED.2010904@intel.com> References: <1435053450-25131-1-git-send-email-tiejun.chen@intel.com> <1435053450-25131-5-git-send-email-tiejun.chen@intel.com> <55927C78.10301@intel.com> <5592A598.60001@eu.citrix.com> <55933E4D.4030405@intel.com> <5593BAAB.20801@eu.citrix.com> <5593C544.2030009@intel.com> <559A75DF020000780008C9D9@mail.emea.novell.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii"; Format="flowed" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <559A75DF020000780008C9D9@mail.emea.novell.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: Jan Beulich Cc: Kevin Tian , Keir Fraser , Ian Campbell , George Dunlap , Andrew Cooper , Tim Deegan , "xen-devel@lists.xen.org" , Stefano Stabellini , Suravee Suthikulpanit , Yang Zhang , Aravind Gopalakrishnan List-Id: xen-devel@lists.xenproject.org >>> Yes, this demonstrates my point. Each of these is a single-bit boolean >>> value that takes up a single bit -- either on or off. But here you have >>> three values -- NO_DRM, RELAXED, and STRICT, that take up two bits. If >> >> Is this fine to you? >> >> #define _XEN_DOMCTL_DEV_NO_RDM 0 >> #define XEN_DOMCTL_DEV_NO_RDM (1U<<_XEN_DOMCTL_DEV_NO_RDM) >> #define _XEN_DOMCTL_DEV_RDM_RELAXED 1 >> #define XEN_DOMCTL_DEV_RDM_RELAXED (1U<<_XEN_DOMCTL_DEV_RDM_RELAXED) >> #define _XEN_DOMCTL_DEV_RDM_STRICT 2 >> #define XEN_DOMCTL_DEV_RDM_STRICT (1U<<_XEN_DOMCTL_DEV_RDM_STRICT) > > AIUI these aren't individual flags, but kind of an enumeration. I.e. > you should keep the original definitions and add - as suggested by > George - a mask (two bits wide right now). > Okay but George also thought NO_RDM may be pointless since we can just ignore this flag field simply for DT device, and he also thought one bit may be fine enough to cover two cases, strict and relaxed. So maybe finally, here is, #define XEN_DOMCTL_DEV_RDM_RELAXED 1 #define XEN_DOMCTL_DEV_RDM_FLAGS_MASK (0x1) Thanks Tiejun