From mboxrd@z Thu Jan 1 00:00:00 1970 From: Ian Campbell Subject: Re: [PATCH v8 5/5] libxl: Add interface for querying hypervisor about PCI topology Date: Fri, 8 May 2015 16:11:18 +0100 Message-ID: <1431097878.2660.501.camel@citrix.com> References: <1430936102-3465-1-git-send-email-boris.ostrovsky@oracle.com> <1430936102-3465-6-git-send-email-boris.ostrovsky@oracle.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <1430936102-3465-6-git-send-email-boris.ostrovsky@oracle.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: Boris Ostrovsky Cc: elena.ufimtseva@oracle.com, wei.liu2@citrix.com, stefano.stabellini@eu.citrix.com, andrew.cooper3@citrix.com, dario.faggioli@citrix.com, ian.jackson@eu.citrix.com, xen-devel@lists.xen.org, jbeulich@suse.com, keir@xen.org, dgdegra@tycho.nsa.gov List-Id: xen-devel@lists.xenproject.org On Wed, 2015-05-06 at 14:15 -0400, Boris Ostrovsky wrote: > .. and use this new interface to display it along with CPU topology > and NUMA information when 'xl info -n' command is issued > > The output will look like > ... > cpu_topology : > cpu: core socket node > 0: 0 0 0 > ... > device topology : > device node > 0000:00:00.0 0 > 0000:00:01.0 0 > ... > > Signed-off-by: Boris Ostrovsky Acked-by: Ian Campbell [...] > + sysctl.u.pcitopoinfo.num_devs = num_devs - processed; > + set_xen_guest_handle_offset(sysctl.u.pcitopoinfo.devs, devs, > + processed * sizeof(*devs)); > + set_xen_guest_handle_offset(sysctl.u.pcitopoinfo.nodes, nodes, > + processed * sizeof(*nodes)); Changing these in the obvious way based on my feedback to the previous patch wouldn't invalidate my ack. [...] > + if (libxl__pci_topology_init(gc, devs, *num_devs)) { > + LOGE(ERROR, "Cannot initialize PCI hypercall structure"); libxl__pci_topology_init might be an exception but libxl__* functions don't typically set errno, they return ERROR_FOO things. So you may want just LOG and not LOGE. You might also want to arrange to print the error code. Ian.