From: Ian Jackson Subject: Re: [v10][PATCH 11/16] tools/libxl: detect and avoid conflicts with RDM Date: Mon, 20 Jul 2015 16:24:29 +0100 Message-ID: <21933.4781.777777.167243@mariner.uk.xensource.com> References: <1437373023-14884-1-git-send-email-tiejun.chen@intel.com> <1437373023-14884-12-git-send-email-tiejun.chen@intel.com> <21932.63595.566823.211293@mariner.uk.xensource.com> <55AD0842.1010906@intel.com> <21933.2931.10827.7353@mariner.uk.xensource.com> <55AD0EFF.8020405@intel.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <55AD0EFF.8020405@intel.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: "Chen, Tiejun" Cc: Stefano Stabellini , Wei Liu , Ian Campbell , xen-devel@lists.xen.org List-Id: xen-devel@lists.xenproject.org Chen, Tiejun writes ("Re: [v10][PATCH 11/16] tools/libxl: detect and avoid conflicts with RDM"): > [Ian Jackson:] > > The domain configuration specified to libxl might contain some rdms. > > Then num_rdms in the incoming config would be nonzero. > > We never set d_config->num_rdms/d_config->rdms before we goes inside > libxl__domain_device_construct_rdm(). And actually > libxl__domain_device_construct_rdm is only one place to set > d_config->num_rdms/d_config->rdms. But d_config is a libxl_domain_config which is supplied by libxl's caller. It might contain some rdms. > I guess this line make you or other guys confused so lets delete this > line directly. I don't think I am very confused. > And if you still worry about something, I can add assert() at the > beginning of this function like this, > > assert(!d_config->num_rdms && !d_config->rdms). If you are sure that this assertion is correct, then that would be proper. But as I say above, I don't think it is. Ian.