[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] [PATCH 3/4] sysctl/libxl: Provide information about IO topology
>>> On 02.12.14 at 22:34, <boris.ostrovsky@xxxxxxxxxx> wrote: > @@ -362,6 +363,35 @@ long do_sysctl(XEN_GUEST_HANDLE_PARAM(xen_sysctl_t) > u_sysctl) > u.topologyinfo.max_cpu_index) ) > ret = -EFAULT; > } > + > + if ( !ret && !guest_handle_is_null(ti->iotopo) ) > + { > + for ( i = 0; i < ti->max_devs; i++ ) Careful about long running loops here please. Jan > + { > + xen_sysctl_iotopo_t iotopo; > + struct pci_dev *pdev; > + > + if ( copy_from_guest_offset(&iotopo, ti->iotopo, i, 1) ) > + { > + ret = -EFAULT; > + break; > + } > + > + spin_lock(&pcidevs_lock); > + pdev = pci_get_pdev(iotopo.seg, iotopo.bus, iotopo.devfn); > + if ( !pdev || (pdev->node == NUMA_NO_NODE) ) > + iotopo.node = INVALID_TOPOLOGY_ID; > + else > + iotopo.node = pdev->node; > + spin_unlock(&pcidevs_lock); > + > + if ( copy_to_guest_offset(ti->iotopo, i, &iotopo, 1) ) > + { > + ret = -EFAULT; > + break; > + } > + } > + } > } > break; > > -- > 1.8.4.2 _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxx http://lists.xen.org/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |