Re: [Xen-devel] [PATCH v3 7/7] libxl: Add interface for querying hypervisor about PCI topology

2015-02-16 Thread Wei Liu
On Mon, Feb 16, 2015 at 10:54:11AM -0500, Boris Ostrovsky wrote: [...] > >>+if (valid_devs == 0) > >>+printf("No device topology data available\n"); > >>+ > >>+libxl_pcitopology_list_free(pciinfo, nr); > >>+#endif > >> > >And for implementation too, I think. > > > I am not sure wh

Re: [Xen-devel] [PATCH v3 7/7] libxl: Add interface for querying hypervisor about PCI topology

2015-02-16 Thread Dario Faggioli
On Mon, 2015-02-16 at 10:54 -0500, Boris Ostrovsky wrote: > I am not sure what the standard practice is for LIBXL_HAVE_ macros. I > see a couple of examples where '#ifdef LIBXL_HAVE_*" is used in libxl > code, which is why I have it here as well. > Yes, that is the case for two of them, AFAICS:

Re: [Xen-devel] [PATCH v3 7/7] libxl: Add interface for querying hypervisor about PCI topology

2015-02-16 Thread Boris Ostrovsky
On 02/16/2015 08:45 AM, Dario Faggioli wrote: @@ -1070,6 +1078,12 @@ void libxl_vminfo_list_free(libxl_vminfo *list, int nb_vm); libxl_cputopology *libxl_get_cpu_topology(libxl_ctx *ctx, int *nb_cpu_out); void libxl_cputopology_list_free(libxl_cputopology *, int nb_cpu); +#ifdef LIBXL_H

Re: [Xen-devel] [PATCH v3 7/7] libxl: Add interface for querying hypervisor about PCI topology

2015-02-16 Thread Dario Faggioli
On Mon, 2015-02-09 at 15:04 -0500, 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:coresocket node > 0: 0

Re: [Xen-devel] [PATCH v3 7/7] libxl: Add interface for querying hypervisor about PCI topology

2015-02-13 Thread Boris Ostrovsky
On 02/13/2015 07:43 AM, Wei Liu wrote: On Mon, Feb 09, 2015 at 03:04:35PM -0500, Boris Ostrovsky wrote: [...] +#ifdef LIBXL_HAVE_PCITOPO +libxl_pcitopology *libxl_get_pci_topology(libxl_ctx *ctx, int *num_devs) +{ +GC_INIT(ctx); +physdev_pci_device_t *devs; +uint8_t *nodes; +lib

Re: [Xen-devel] [PATCH v3 7/7] libxl: Add interface for querying hypervisor about PCI topology

2015-02-13 Thread Wei Liu
On Mon, Feb 09, 2015 at 03:04:35PM -0500, Boris Ostrovsky wrote: [...] > +#ifdef LIBXL_HAVE_PCITOPO > +libxl_pcitopology *libxl_get_pci_topology(libxl_ctx *ctx, int *num_devs) > +{ > +GC_INIT(ctx); > +physdev_pci_device_t *devs; > +uint8_t *nodes; > +libxl_pcitopology *ret = NULL;

[Xen-devel] [PATCH v3 7/7] libxl: Add interface for querying hypervisor about PCI topology

2015-02-09 Thread Boris Ostrovsky
.. 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:coresocket node 0: 000 ... device topology: device node