From: "Jan Beulich" Subject: Re: [PATCH v6 6/9] Add an option to limit ranges per rangeset Date: Thu, 08 May 2014 16:03:38 +0100 Message-ID: <536BB8EA0200007800010890@mail.emea.novell.com> References: <1399555424-25201-1-git-send-email-paul.durrant@citrix.com> <1399555424-25201-7-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: <1399555424-25201-7-git-send-email-paul.durrant@citrix.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: Paul Durrant Cc: Keir Fraser , xen-devel@lists.xen.org List-Id: xen-devel@lists.xenproject.org >>> On 08.05.14 at 15:23, wrote: > xen/arch/x86/domain.c | 2 +- > xen/arch/x86/mm/p2m.c | 2 +- > xen/arch/x86/setup.c | 2 +- > xen/common/domain.c | 5 ++-- The patch wouldn't need to touch all these files had you followed the advice and added a new rangeset function allowing to set the limit on an existing (perhaps empty) rangeset. > --- a/xen/common/rangeset.c > +++ b/xen/common/rangeset.c > @@ -25,6 +25,8 @@ struct rangeset { > > /* Ordered list of ranges contained in this set, and protecting lock. > */ > struct list_head range_list; > + unsigned int nr_ranges; > + unsigned int max_nr_ranges; And I think you should aim at getting away with just one added variable (number of ranges still permitted to be added). Jan