From: Wei Liu Subject: Re: [v3][PATCH 12/16] tools/libxl: passes rdm reservation policy Date: Mon, 15 Jun 2015 16:00:04 +0100 Message-ID: <20150615150004.GB10177@zion.uk.xensource.com> References: <1433985325-16676-1-git-send-email-tiejun.chen@intel.com> <1433985325-16676-13-git-send-email-tiejun.chen@intel.com> <20150612161706.GY14606@zion.uk.xensource.com> <557E29C6.3000304@intel.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Content-Disposition: inline In-Reply-To: <557E29C6.3000304@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: kevin.tian@intel.com, Wei Liu , ian.campbell@citrix.com, andrew.cooper3@citrix.com, tim@xen.org, xen-devel@lists.xen.org, stefano.stabellini@citrix.com, jbeulich@suse.com, yang.z.zhang@intel.com, Ian.Jackson@eu.citrix.com List-Id: xen-devel@lists.xenproject.org On Mon, Jun 15, 2015 at 09:26:30AM +0800, Chen, Tiejun wrote: [...] > >> out: > >> if (!libxl_is_stubdom(ctx, domid, NULL)) { > >>+ if (pcidev->rdm_reserve == LIBXL_RDM_RESERVE_FLAG_RELAXED) { > >>+ flag = XEN_DOMCTL_DEV_RDM_RELAXED; > >>+ } else if (pcidev->rdm_reserve == LIBXL_RDM_RESERVE_FLAG_STRICT) { > >>+ flag = XEN_DOMCTL_DEV_RDM_STRICT; > >>+ } else { > >>+ LIBXL__LOG_ERRNO(ctx, LIBXL__LOG_ERROR, "unkwon rdm check flag."); > > > >Typo "unkwon" and use LOG(ERROR,...). > > Will fix that typo, s/unkwon/unknown, but are you sure we should use LOG() > here? Because this function always uses LIBXL__LOG_ERRNO(), > Yeah. Consistency is also a strong argument. I won't force my opinion on you. Fixing the typo is good enough for me. > > > >>+ return ERROR_FAIL; > >>+ } > >> rc = xc_assign_device(ctx->xch, domid, pcidev_encode_bdf(pcidev), flag); > >> if (rc < 0 && (hvm || errno != ENOSYS)) { > >> LIBXL__LOG_ERRNO(ctx, LIBXL__LOG_ERROR, "xc_assign_device failed"); > [...] > >> } > >> > >>diff --git a/tools/libxl/xl_cmdtable.c b/tools/libxl/xl_cmdtable.c > >>index 7f4759b..552fbec 100644 > >>--- a/tools/libxl/xl_cmdtable.c > >>+++ b/tools/libxl/xl_cmdtable.c > >>@@ -88,7 +88,7 @@ struct cmd_spec cmd_table[] = { > >> { "pci-attach", > >> &main_pciattach, 0, 1, > >> "Insert a new pass-through pci device", > >>- " [Virtual Slot]", > >>+ " [Virtual Slot] ", > > > >Should use "[]" to indicate it's optional. > > > > What about this? > > " [Virtual Slot] [policy to reserve rdm<'strice'|'relaxed'>]", > Fine by me. Wei. > Thanks > Tiejun