From mboxrd@z Thu Jan 1 00:00:00 1970 From: David Vrabel Subject: Re: [PATCH v4 1/3] x86/viridian: Re-purpose the HVM parameter to be a feature mask Date: Tue, 5 Aug 2014 11:16:10 +0100 Message-ID: <53E0AEEA.4020508@citrix.com> References: <1407231886-5031-1-git-send-email-paul.durrant@citrix.com> <1407231886-5031-2-git-send-email-paul.durrant@citrix.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <1407231886-5031-2-git-send-email-paul.durrant@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: Paul Durrant , xen-devel@lists.xen.org Cc: Ian Jackson , Keir Fraser , Ian Campbell , Jan Beulich , Stefano Stabellini List-Id: xen-devel@lists.xenproject.org On 05/08/14 10:44, Paul Durrant wrote: > > This patch grandfathers in the current viridian features set and calls them > the 'base' plus 'freq' feature set. HVM_PARAM_VIRIDIAN is re-purposed as > a feature mask. It has only ever been legally set to 0 or 1... "legally" suggests (to me) that this restriction written as part of a specification rather than enforced in the code, which would make it unsafe to repurpose the param as you propose. But, from the actual code: case HVM_PARAM_VIRIDIAN: if ( a.value > 1 ) rc = -EINVAL; break; So: "Xen only allowed HVM_PARAM_VIRIDIAN to be set to 0 or 1, setting other values would fail with -EINVAL." makes it clear that it is okay to extend this param. David