From mboxrd@z Thu Jan 1 00:00:00 1970 From: Roger Pau Monne Subject: Re: [PATCH v10 17/19] libxl: convert libxl_device_vkb_add to an async operation Date: Mon, 23 Jul 2012 09:58:24 +0100 Message-ID: <500D1230.9050806@citrix.com> References: <1342793548-10239-1-git-send-email-roger.pau@citrix.com> <1342793548-10239-18-git-send-email-roger.pau@citrix.com> <20489.40608.656217.2209@mariner.uk.xensource.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <20489.40608.656217.2209@mariner.uk.xensource.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: Ian Jackson Cc: "xen-devel@lists.xen.org" List-Id: xen-devel@lists.xenproject.org Ian Jackson wrote: > Roger Pau Monne writes ("[PATCH v10 17/19] libxl: convert libxl_device_vkb_add to an async operation"): >> Split libxl_device_vkb_add into libxl__device_vkb_add (to be used >> inside already running ao's), and make libxl_device_vkb_add a stub to >> call libxl__device_vkb_add. > > > Acked-by: Ian Jackson > > But if you are reposting for any reason you might like > >> - dcs->aodevs.size = d_config->num_disks; >> + if (d_config->c_info.type == LIBXL_DOMAIN_TYPE_HVM && !d_config->num_vkbs) { >> + d_config->vkbs = libxl__zalloc(NOGC, sizeof(*d_config->vkbs)); > > to turn that into a use of GCNEW. Or move > >> + libxl_device_vkb_init(&d_config->vkbs[0]); >> + d_config->num_vkbs = 1; > > that assignment up and use GCNEW_ARRAY. Up to you. I can't use GCNEW because this is not allocated from the GC (I'm passing NOGC to zalloc). Thanks.