diff --git a/tools/python/xen/lowlevel/xc/xc.c b/tools/python/xen/lowlevel/xc/xc.c index f501764100..694bfa0642 100644 --- a/tools/python/xen/lowlevel/xc/xc.c +++ b/tools/python/xen/lowlevel/xc/xc.c @@ -1079,7 +1079,7 @@ static PyObject *pyxc_topologyinfo(XcObject *self) } } - ret_obj = Py_BuildValue("{s:i}", "max_cpu_index", num_cpus + 1); + ret_obj = Py_BuildValue("{s:i}", "max_cpu_index", num_cpus - 1); PyDict_SetItemString(ret_obj, "cpu_to_core", cpu_to_core_obj); Py_DECREF(cpu_to_core_obj);