From: "Jan Beulich" Subject: Re: [PATCH v2 11/12] x86/altp2m: Add altp2mhvm HVM domain parameter. Date: Thu, 25 Jun 2015 09:33:09 +0100 Message-ID: <558BD8E502000078000895EB@mail.emea.novell.com> References: <1434999372-3688-1-git-send-email-edmund.h.white@intel.com> <1434999372-3688-12-git-send-email-edmund.h.white@intel.com> <558AE1FC020000780008903C@mail.emea.novell.com> <558AEF9E.9090505@intel.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <558AEF9E.9090505@intel.com> Content-Disposition: inline List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Ed White Cc: Tim Deegan , Ravi Sahita , Wei Liu , Andrew Cooper , Ian Jackson , xen-devel@lists.xen.org, tlengyel@novetta.com, Daniel De Graaf List-Id: xen-devel@lists.xenproject.org >>> On 24.06.15 at 19:57, wrote: > On 06/24/2015 07:59 AM, Jan Beulich wrote: >>>>> On 22.06.15 at 20:56, wrote: >>> + case HVM_PARAM_ALTP2MHVM: >>> + if ( a.value > 1 ) >>> + rc = -EINVAL; >>> + if ( a.value && >>> + d->arch.hvm_domain.params[HVM_PARAM_NESTEDHVM] ) >>> + rc = -EINVAL; >>> + break; >> >> As you added the new param to the change-once section of >> hvm_allow_set_param() - what is this code good for? > > I don't understand. How does change-once invalidate this code? The first if of course is needed (to exclude larger values). But afaict the second if() is redundant with the change-once logic, and prevents success from being returned when the tool stack requests a 1->1 change (which is a no-op, and hence ought to be allowed). Jan