From: Tim Deegan Subject: Re: [PATCH 2/2] x86/HVM: fix setting mem access to default Date: Thu, 3 Apr 2014 11:51:27 +0200 Message-ID: <20140403095127.GE38209@deinos.phlegethon.org> References: <533BDFE302000078000048AD@nat28.tlf.novell.com> <533BE1DD02000078000048E4@nat28.tlf.novell.com> <97A500D504438F4ABC02EBA81613CC63317D62B9@xmb-aln-x02.cisco.com> <533D2EFE020000780000501C@nat28.tlf.novell.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from mail6.bemta4.messagelabs.com ([85.158.143.247]) by lists.xen.org with esmtp (Exim 4.72) (envelope-from ) id 1WVeJ1-0002Wb-Us for xen-devel@lists.xenproject.org; Thu, 03 Apr 2014 09:51:32 +0000 Content-Disposition: inline In-Reply-To: <533D2EFE020000780000501C@nat28.tlf.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: "xen-devel@lists.xenproject.org" , "Keir Fraser (keir@xen.org)" , "Aravindh Puthiyaparambil (aravindp)" List-Id: xen-devel@lists.xenproject.org At 08:50 +0100 on 03 Apr (1396511454), Jan Beulich wrote: > >>> On 03.04.14 at 02:13, wrote: > >> commit 3b0bcb89 ("x86/mm/p2m: Move p2m code in > >>HVMOP_[gs]et_mem_access into p2m.c") introduced an off-by-one mistake > >>forcing an input of HVMMEM_access_default to always fail. Since related, also > >>eliminate the inefficient setup of an on-stack array for each function > >>invocation. > > > > Thanks for catching this. I do have a question. If the caller wants to set > > the default access by specifying pfn == ~0ul, the call could be made with > > access = HVMMEM_access_default. Should this be allowed? > > I asked myself this question too, but wasn't really decided about the > usefulness of this, so left the behavior unchanged (i.e. allow this > pointless operation). I'll leave the decision whether to disable this to > the mm maintainers. Seems harmless enough, and has well-defined (if admittedly pointless) semantics. I'd accept a patch to disable it if anyone feels strongly enough about it to write one. :) Tim.