From mboxrd@z Thu Jan 1 00:00:00 1970 From: Ian Campbell Subject: Re: [PATCH v9 10/15] tools/libxc: x86 HVM save code Date: Wed, 15 Apr 2015 12:29:07 +0100 Message-ID: <1429097347.15516.213.camel@citrix.com> References: <1428686167-8279-1-git-send-email-andrew.cooper3@citrix.com> <1428686167-8279-11-git-send-email-andrew.cooper3@citrix.com> <87lhhwqkjs.fsf@vitty.brq.redhat.com> <552BC2BE.2020406@citrix.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <552BC2BE.2020406@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: Andrew Cooper Cc: Wei Liu , Vitaly Kuznetsov , Ian Jackson , Xen-devel List-Id: xen-devel@lists.xenproject.org On Mon, 2015-04-13 at 14:21 +0100, Andrew Cooper wrote: > >> +static int write_hvm_params(struct xc_sr_context *ctx) > >> +{ > >> + static const unsigned int params[] = { [...] > > While reviewing my 'soft reset' series Ian C raised a question about the > > unsafeness of sequential get/set of HVM params: > > http://lists.xen.org/archives/html/xen-devel/2015-01/msg01177.html > >[...] > This code currently mirrors what the old migration did. This was one > area we deliberately didn't try to clean up (we were focusing on a > functional replacement). Apart from what else you say (which I agree with) I think all Vitaly was asking here was whether your params[] array could be moved into a location which was accessible to the rest of libxc. In any case I would say it would be fine for the second user to refactor out any list which the first one added. Gentlemen, start your engines ;-) Ian.