4
4
* Copyright (C) 2005-2012 Red Hat, Inc.
6
* See COPYING.LIB for the License of this software
6
* This library is free software; you can redistribute it and/or
7
* modify it under the terms of the GNU Lesser General Public
8
* License as published by the Free Software Foundation; either
9
* version 2.1 of the License, or (at your option) any later version.
11
* This library is distributed in the hope that it will be useful,
12
* but WITHOUT ANY WARRANTY; without even the implied warranty of
13
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14
* Lesser General Public License for more details.
16
* You should have received a copy of the GNU Lesser General Public
17
* License along with this library. If not, see
18
* <http://www.gnu.org/licenses/>.
8
20
* Daniel Veillard <veillard@redhat.com>
526
537
lock_pages(void *addr, size_t len)
529
return mlock(addr, len);
540
if (mlock(addr, len) < 0) {
541
virReportSystemError(errno,
542
_("Unable to lock %zu bytes of memory"),
530
547
#elif defined(__sun)
536
553
unlock_pages(void *addr, size_t len)
539
return munlock(addr, len);
556
if (munlock(addr, len) < 0) {
557
virReportSystemError(errno,
558
_("Unable to unlock %zu bytes of memory"),
540
563
#elif defined(__sun)
874
897
.xenDomainSetSchedulerParameters = xenHypervisorSetSchedulerParameters,
877
#define virXenError(code, ...) \
879
virReportErrorHelper(VIR_FROM_XEN, code, __FILE__, \
880
__FUNCTION__, __LINE__, __VA_ARGS__)
883
901
* xenHypervisorDoV0Op:
884
902
* @handle: the handle to the Xen hypervisor
900
918
hc.op = __HYPERVISOR_dom0_op;
901
919
hc.arg[0] = (unsigned long) op;
903
if (lock_pages(op, sizeof(dom0_op_t)) < 0) {
904
virXenError(VIR_ERR_XEN_CALL, " locking");
921
if (lock_pages(op, sizeof(dom0_op_t)) < 0)
908
924
ret = ioctl(handle, xen_ioctl_hypercall_cmd, (unsigned long) &hc);
910
virXenError(VIR_ERR_XEN_CALL, " ioctl %d",
911
xen_ioctl_hypercall_cmd);
926
virReportSystemError(errno,
927
_("Unable to issue hypervisor ioctl %d"),
928
xen_ioctl_hypercall_cmd);
914
if (unlock_pages(op, sizeof(dom0_op_t)) < 0) {
915
virXenError(VIR_ERR_XEN_CALL, " releasing");
931
if (unlock_pages(op, sizeof(dom0_op_t)) < 0)
942
957
hc.op = __HYPERVISOR_dom0_op;
943
958
hc.arg[0] = (unsigned long) op;
945
if (lock_pages(op, sizeof(dom0_op_t)) < 0) {
946
virXenError(VIR_ERR_XEN_CALL, " locking");
960
if (lock_pages(op, sizeof(dom0_op_t)) < 0)
950
963
ret = ioctl(handle, xen_ioctl_hypercall_cmd, (unsigned long) &hc);
952
virXenError(VIR_ERR_XEN_CALL, " ioctl %d",
953
xen_ioctl_hypercall_cmd);
965
virReportSystemError(errno,
966
_("Unable to issue hypervisor ioctl %d"),
967
xen_ioctl_hypercall_cmd);
956
if (unlock_pages(op, sizeof(dom0_op_t)) < 0) {
957
virXenError(VIR_ERR_XEN_CALL, " releasing");
970
if (unlock_pages(op, sizeof(dom0_op_t)) < 0)
985
997
hc.op = __HYPERVISOR_sysctl;
986
998
hc.arg[0] = (unsigned long) op;
988
if (lock_pages(op, sizeof(dom0_op_t)) < 0) {
989
virXenError(VIR_ERR_XEN_CALL, " locking");
1000
if (lock_pages(op, sizeof(dom0_op_t)) < 0)
993
1003
ret = ioctl(handle, xen_ioctl_hypercall_cmd, (unsigned long) &hc);
995
virXenError(VIR_ERR_XEN_CALL, " sys ioctl %d",
996
xen_ioctl_hypercall_cmd);
1005
virReportSystemError(errno,
1006
_("Unable to issue hypervisor ioctl %d"),
1007
xen_ioctl_hypercall_cmd);
999
if (unlock_pages(op, sizeof(dom0_op_t)) < 0) {
1000
virXenError(VIR_ERR_XEN_CALL, " releasing");
1010
if (unlock_pages(op, sizeof(dom0_op_t)) < 0)
1028
1037
hc.op = __HYPERVISOR_domctl;
1029
1038
hc.arg[0] = (unsigned long) op;
1031
if (lock_pages(op, sizeof(dom0_op_t)) < 0) {
1032
virXenError(VIR_ERR_XEN_CALL, " locking");
1040
if (lock_pages(op, sizeof(dom0_op_t)) < 0)
1036
1043
ret = ioctl(handle, xen_ioctl_hypercall_cmd, (unsigned long) &hc);
1038
virXenError(VIR_ERR_XEN_CALL, " ioctl %d",
1039
xen_ioctl_hypercall_cmd);
1045
virReportSystemError(errno,
1046
_("Unable to issue hypervisor ioctl %d"),
1047
xen_ioctl_hypercall_cmd);
1042
if (unlock_pages(op, sizeof(dom0_op_t)) < 0) {
1043
virXenError(VIR_ERR_XEN_CALL, " releasing");
1050
if (unlock_pages(op, sizeof(dom0_op_t)) < 0)
1070
1076
if (lock_pages(XEN_GETDOMAININFOLIST_DATA(dominfos),
1071
XEN_GETDOMAININFO_SIZE * maxids) < 0) {
1072
virXenError(VIR_ERR_XEN_CALL, " locking");
1077
XEN_GETDOMAININFO_SIZE * maxids) < 0)
1075
1080
if (hv_versions.hypervisor > 1) {
1076
1081
xen_op_v2_sys op;
1123
1128
ret = op.u.getdomaininfolist.num_domains;
1125
1130
if (unlock_pages(XEN_GETDOMAININFOLIST_DATA(dominfos),
1126
XEN_GETDOMAININFO_SIZE * maxids) < 0) {
1127
virXenError(VIR_ERR_XEN_CALL, " release");
1131
XEN_GETDOMAININFO_SIZE * maxids) < 0)
1161
1165
xenUnifiedPrivatePtr priv;
1163
1167
if (domain->conn == NULL) {
1164
virXenError(VIR_ERR_INTERNAL_ERROR, "%s",
1165
_("domain or conn is NULL"));
1168
virReportError(VIR_ERR_INTERNAL_ERROR, "%s",
1169
_("domain or conn is NULL"));
1169
1173
priv = (xenUnifiedPrivatePtr) domain->conn->privateData;
1170
1174
if (priv->handle < 0) {
1171
virXenError(VIR_ERR_INTERNAL_ERROR, "%s",
1172
_("priv->handle invalid"));
1175
virReportError(VIR_ERR_INTERNAL_ERROR, "%s",
1176
_("priv->handle invalid"));
1175
1179
if (domain->id < 0) {
1176
virXenError(VIR_ERR_OPERATION_INVALID,
1177
"%s", _("domain is not running"));
1180
virReportError(VIR_ERR_OPERATION_INVALID,
1181
"%s", _("domain is not running"));
1184
1188
* TODO: check on Xen 3.0.3
1186
1190
if (hv_versions.dom_interface < 5) {
1187
virXenError(VIR_ERR_NO_XEN, "%s",
1188
_("unsupported in dom interface < 5"));
1191
virReportError(VIR_ERR_NO_XEN, "%s",
1192
_("unsupported in dom interface < 5"));
1242
1246
xenUnifiedPrivatePtr priv;
1244
1248
if (domain->conn == NULL) {
1245
virXenError(VIR_ERR_INTERNAL_ERROR, "%s",
1246
_("domain or conn is NULL"));
1249
virReportError(VIR_ERR_INTERNAL_ERROR, "%s",
1250
_("domain or conn is NULL"));
1250
1254
priv = (xenUnifiedPrivatePtr) domain->conn->privateData;
1251
1255
if (priv->handle < 0) {
1252
virXenError(VIR_ERR_INTERNAL_ERROR, "%s",
1253
_("priv->handle invalid"));
1256
virReportError(VIR_ERR_INTERNAL_ERROR, "%s",
1257
_("priv->handle invalid"));
1256
1260
if (domain->id < 0) {
1257
virXenError(VIR_ERR_OPERATION_INVALID,
1258
"%s", _("domain is not running"));
1261
virReportError(VIR_ERR_OPERATION_INVALID,
1262
"%s", _("domain is not running"));
1265
1269
* TODO: check on Xen 3.0.3
1267
1271
if (hv_versions.dom_interface < 5) {
1268
virXenError(VIR_ERR_NO_XEN, "%s",
1269
_("unsupported in dom interface < 5"));
1272
virReportError(VIR_ERR_NO_XEN, "%s",
1273
_("unsupported in dom interface < 5"));
1284
1288
switch (op_sys.u.getschedulerid.sched_id){
1285
1289
case XEN_SCHEDULER_SEDF:
1286
1290
if (*nparams < XEN_SCHED_SEDF_NPARAM) {
1287
virXenError(VIR_ERR_INVALID_ARG,
1288
"%s", _("Invalid parameter count"));
1291
virReportError(VIR_ERR_INVALID_ARG,
1292
"%s", _("Invalid parameter count"));
1319
1323
*nparams = XEN_SCHED_CRED_NPARAM;
1322
virXenError(VIR_ERR_INVALID_ARG,
1323
_("Unknown scheduler %d"),
1324
op_sys.u.getschedulerid.sched_id);
1326
virReportError(VIR_ERR_INVALID_ARG,
1327
_("Unknown scheduler %d"),
1328
op_sys.u.getschedulerid.sched_id);
1350
1354
if (domain->conn == NULL) {
1351
virXenError(VIR_ERR_INTERNAL_ERROR, "%s",
1352
_("domain or conn is NULL"));
1355
virReportError(VIR_ERR_INTERNAL_ERROR, "%s",
1356
_("domain or conn is NULL"));
1369
1373
priv = (xenUnifiedPrivatePtr) domain->conn->privateData;
1370
1374
if (priv->handle < 0) {
1371
virXenError(VIR_ERR_INTERNAL_ERROR, "%s",
1372
_("priv->handle invalid"));
1375
virReportError(VIR_ERR_INTERNAL_ERROR, "%s",
1376
_("priv->handle invalid"));
1375
1379
if (domain->id < 0) {
1376
virXenError(VIR_ERR_OPERATION_INVALID,
1377
"%s", _("domain is not running"));
1380
virReportError(VIR_ERR_OPERATION_INVALID,
1381
"%s", _("domain is not running"));
1384
1388
* TODO: check on Xen 3.0.3
1386
1390
if (hv_versions.dom_interface < 5) {
1387
virXenError(VIR_ERR_NO_XEN, "%s",
1388
_("unsupported in dom interface < 5"));
1391
virReportError(VIR_ERR_NO_XEN, "%s",
1392
_("unsupported in dom interface < 5"));
1423
1427
if (STREQ(params[i].field, VIR_DOMAIN_SCHEDULER_WEIGHT)) {
1424
1428
val = params[i].value.ui;
1425
1429
if ((val < 1) || (val > USHRT_MAX)) {
1426
virXenError(VIR_ERR_INVALID_ARG,
1427
_("Credit scheduler weight parameter (%d) "
1428
"is out of range (1-65535)"), val);
1430
virReportError(VIR_ERR_INVALID_ARG,
1431
_("Credit scheduler weight parameter (%d) "
1432
"is out of range (1-65535)"), val);
1431
1435
op_dom.u.getschedinfo.u.credit.weight = val;
1432
1436
} else if (STREQ(params[i].field, VIR_DOMAIN_SCHEDULER_CAP)) {
1433
1437
val = params[i].value.ui;
1434
1438
if (val >= USHRT_MAX) {
1435
virXenError(VIR_ERR_INVALID_ARG,
1436
_("Credit scheduler cap parameter (%d) is "
1437
"out of range (0-65534)"), val);
1439
virReportError(VIR_ERR_INVALID_ARG,
1440
_("Credit scheduler cap parameter (%d) is "
1441
"out of range (0-65534)"), val);
1440
1444
op_dom.u.getschedinfo.u.credit.cap = val;
1450
virXenError(VIR_ERR_INVALID_ARG,
1451
_("Unknown scheduler %d"),
1452
op_sys.u.getschedulerid.sched_id);
1454
virReportError(VIR_ERR_INVALID_ARG,
1455
_("Unknown scheduler %d"),
1456
op_sys.u.getschedulerid.sched_id);
1474
1478
xenUnifiedUnlock(priv);
1477
virXenError(VIR_ERR_OPERATION_INVALID, "%s",
1478
_("block statistics not supported on this platform"));
1481
virReportError(VIR_ERR_OPERATION_INVALID, "%s",
1482
_("block statistics not supported on this platform"));
1501
1505
if (sscanf(path, "vif%d.%d", &rqdomid, &device) != 2) {
1502
virXenError(VIR_ERR_INVALID_ARG, "%s",
1503
_("invalid path, should be vif<domid>.<n>."));
1506
virReportError(VIR_ERR_INVALID_ARG, "%s",
1507
_("invalid path, should be vif<domid>.<n>."));
1506
1510
if (rqdomid != dom->id) {
1507
virXenError(VIR_ERR_INVALID_ARG, "%s",
1508
_("invalid path, vif<domid> should match this domain ID"));
1511
virReportError(VIR_ERR_INVALID_ARG, "%s",
1512
_("invalid path, vif<domid> should match this domain ID"));
1512
1516
return linuxDomainInterfaceStats(path, stats);
1514
virXenError(VIR_ERR_OPERATION_INVALID, "%s",
1515
_("/proc/net/dev: Interface not found"));
1518
virReportError(VIR_ERR_OPERATION_INVALID, "%s",
1519
_("/proc/net/dev: Interface not found"));
1747
1751
if (hv_versions.hypervisor > 1) {
1748
1752
xen_op_v2_dom op;
1750
if (lock_pages(cpumap, maplen) < 0) {
1751
virXenError(VIR_ERR_XEN_CALL, " locking");
1754
if (lock_pages(cpumap, maplen) < 0)
1754
1757
memset(&op, 0, sizeof(op));
1755
1758
op.cmd = XEN_V2_OP_SETVCPUMAP;
1756
1759
op.domain = (domid_t) id;
1782
1785
ret = xenHypervisorDoV2Dom(handle, &op);
1785
if (unlock_pages(cpumap, maplen) < 0) {
1786
virXenError(VIR_ERR_XEN_CALL, " release");
1788
if (unlock_pages(cpumap, maplen) < 0)
1790
1791
cpumap_t xen_cpumap; /* limited to 64 CPUs in old hypervisors */
1791
1792
uint64_t *pm = &xen_cpumap;
1879
1880
ipt->cpu = op.u.getvcpuinfod5.online ? (int)op.u.getvcpuinfod5.cpu : -1;
1881
1882
if ((cpumap != NULL) && (maplen > 0)) {
1882
if (lock_pages(cpumap, maplen) < 0) {
1883
virXenError(VIR_ERR_XEN_CALL, " locking");
1883
if (lock_pages(cpumap, maplen) < 0)
1886
1886
memset(cpumap, 0, maplen);
1887
1887
memset(&op, 0, sizeof(op));
1888
1888
op.cmd = XEN_V2_OP_GETVCPUMAP;
1897
1897
op.u.getvcpumapd5.cpumap.nr_cpus = maplen * 8;
1899
1899
ret = xenHypervisorDoV2Dom(handle, &op);
1900
if (unlock_pages(cpumap, maplen) < 0) {
1901
virXenError(VIR_ERR_XEN_CALL, " release");
1900
if (unlock_pages(cpumap, maplen) < 0)
1906
1904
int mapl = maplen;
1981
1979
xen_getdomaininfo info;
1982
1980
virVcpuInfoPtr ipt = NULL;
1985
if (hv_versions.hypervisor == -1)
1992
1982
/* Compile regular expressions used by xenHypervisorGetCapabilities.
1993
1983
* Note that errors here are really internal errors since these
1994
1984
* regexps should never fail to compile.
1998
1988
char error[100];
1999
1989
regerror (errcode, &flags_hvm_rec, error, sizeof(error));
2000
1990
regfree (&flags_hvm_rec);
2001
virXenError(VIR_ERR_INTERNAL_ERROR, "%s", error);
1991
virReportError(VIR_ERR_INTERNAL_ERROR, "%s", error);
2005
1994
errcode = regcomp (&flags_pae_rec, flags_pae_re, REG_EXTENDED);
2008
1997
regerror (errcode, &flags_pae_rec, error, sizeof(error));
2009
1998
regfree (&flags_pae_rec);
2010
1999
regfree (&flags_hvm_rec);
2011
virXenError(VIR_ERR_INTERNAL_ERROR, "%s", error);
2000
virReportError(VIR_ERR_INTERNAL_ERROR, "%s", error);
2015
2003
errcode = regcomp (&xen_cap_rec, xen_cap_re, REG_EXTENDED);
2019
2007
regfree (&xen_cap_rec);
2020
2008
regfree (&flags_pae_rec);
2021
2009
regfree (&flags_hvm_rec);
2022
virXenError(VIR_ERR_INTERNAL_ERROR, "%s", error);
2010
virReportError(VIR_ERR_INTERNAL_ERROR, "%s", error);
2027
2014
if (override_versions) {
2028
2015
hv_versions = *override_versions;
2084
2067
hv_versions.hypervisor = -1;
2085
virXenError(VIR_ERR_XEN_CALL, " ioctl %lu",
2086
(unsigned long) IOCTL_PRIVCMD_HYPERCALL);
2068
virReportSystemError(errno,
2069
_("Unable to issue hypervisor ioctl %lu"),
2070
(unsigned long)IOCTL_PRIVCMD_HYPERCALL);
2087
2071
VIR_FORCE_CLOSE(fd);
2161
* sysctl version 9 -> xen-unstable c/s 24102:dc8e55c90604
2162
* domctl version 8 -> unchanged from Xen 4.1
2164
hv_versions.sys_interface = 9; /* XEN_SYSCTL_INTERFACE_VERSION */
2165
if (virXen_getdomaininfo(fd, 0, &info) == 1) {
2166
hv_versions.dom_interface = 8; /* XEN_DOMCTL_INTERFACE_VERSION */
2167
if (virXen_getvcpusinfo(fd, 0, 0, ipt, NULL, 0) == 0){
2168
VIR_DEBUG("Using hypervisor call v2, sys ver9 dom ver8");
2177
2173
hv_versions.hypervisor = 1;
2178
2174
hv_versions.sys_interface = -1;
2179
2175
if (virXen_getdomaininfo(fd, 0, &info) == 1) {
2185
2181
* we failed to make the getdomaininfolist hypercall
2183
hv_versions.hypervisor = -1;
2184
virReportSystemError(errno,
2185
_("Unable to issue hypervisor ioctl %lu"),
2186
(unsigned long)IOCTL_PRIVCMD_HYPERCALL);
2188
2187
VIR_DEBUG("Failed to find any Xen hypervisor method");
2189
hv_versions.hypervisor = -1;
2190
virXenError(VIR_ERR_XEN_CALL, " ioctl %lu",
2191
(unsigned long)IOCTL_PRIVCMD_HYPERCALL);
2192
2188
VIR_FORCE_CLOSE(fd);
2198
2193
VIR_FORCE_CLOSE(fd);
2199
static int xenHypervisorOnceInit(void) {
2200
return xenHypervisorInit(NULL);
2203
VIR_ONCE_GLOBAL_INIT(xenHypervisor)
2205
2206
* xenHypervisorOpen:
2206
2207
* @conn: pointer to the connection block
2222
2223
virCheckFlags(VIR_CONNECT_RO, VIR_DRV_OPEN_ERROR);
2224
if (initialized == 0)
2225
if (xenHypervisorInit(NULL) == -1)
2225
if (xenHypervisorInitialize() < 0)
2228
2228
priv->handle = -1;
2230
2230
ret = open(XEN_HYPERVISOR_SOCKET, O_RDWR);
2232
virXenError(VIR_ERR_NO_XEN, "%s", XEN_HYPERVISOR_SOCKET);
2232
virReportError(VIR_ERR_NO_XEN, "%s", XEN_HYPERVISOR_SOCKET);
2929
2929
priv = (xenUnifiedPrivatePtr) dom->conn->privateData;
2930
2930
if (priv->handle < 0) {
2931
virXenError(VIR_ERR_INTERNAL_ERROR, "%s",
2932
_("domain shut off or invalid"));
2931
virReportError(VIR_ERR_INTERNAL_ERROR, "%s",
2932
_("domain shut off or invalid"));
2936
2936
/* HV's earlier than 3.1.0 don't include the HVM flags in guests status*/
2937
2937
if (hv_versions.hypervisor < 2 ||
2938
2938
hv_versions.dom_interface < 4) {
2939
virXenError(VIR_ERR_INTERNAL_ERROR, "%s",
2940
_("unsupported in dom interface < 4"));
2939
virReportError(VIR_ERR_INTERNAL_ERROR, "%s",
2940
_("unsupported in dom interface < 4"));
2944
2944
XEN_GETDOMAININFO_CLEAR(dominfo);
2946
2946
if (virXen_getdomaininfo(priv->handle, dom->id, &dominfo) < 0) {
2947
virXenError(VIR_ERR_INTERNAL_ERROR, "%s",
2948
_("cannot get domain details"));
2947
virReportError(VIR_ERR_INTERNAL_ERROR, "%s",
2948
_("cannot get domain details"));
2952
2952
if (XEN_GETDOMAININFO_DOMAIN(dominfo) != dom->id) {
2953
virXenError(VIR_ERR_INTERNAL_ERROR, "%s",
2954
_("cannot get domain details"));
2953
virReportError(VIR_ERR_INTERNAL_ERROR, "%s",
2954
_("cannot get domain details"));
3350
3350
xenUnifiedPrivatePtr priv;
3352
3352
if (conn == NULL) {
3353
virXenError(VIR_ERR_INVALID_ARG, "%s", _("invalid argument"));
3353
virReportError(VIR_ERR_INVALID_ARG, "%s", _("invalid argument"));
3357
3357
priv = conn->privateData;
3359
3359
if (priv->nbNodeCells < 0) {
3360
virXenError(VIR_ERR_XEN_CALL, "%s",
3361
_("cannot determine actual number of cells"));
3360
virReportError(VIR_ERR_XEN_CALL, "%s",
3361
_("cannot determine actual number of cells"));
3365
3365
if ((maxCells < 1) || (startCell >= priv->nbNodeCells)) {
3366
virXenError(VIR_ERR_INVALID_ARG, "%s",
3367
_("invalid argument"));
3366
virReportError(VIR_ERR_INVALID_ARG, "%s",
3367
_("invalid argument"));
3372
3372
* Support only hv_versions.sys_interface >=4
3374
3374
if (hv_versions.sys_interface < SYS_IFACE_MIN_VERS_NUMA) {
3375
virXenError(VIR_ERR_XEN_CALL, "%s",
3376
_("unsupported in sys interface < 4"));
3375
virReportError(VIR_ERR_XEN_CALL, "%s",
3376
_("unsupported in sys interface < 4"));
3380
3380
if (priv->handle < 0) {
3381
virXenError(VIR_ERR_INTERNAL_ERROR, "%s",
3382
_("priv->handle invalid"));
3381
virReportError(VIR_ERR_INTERNAL_ERROR, "%s",
3382
_("priv->handle invalid"));
3620
3620
if (priv->handle < 0 || (domain->id < 0) ||
3621
3621
(info == NULL) || (maxinfo < 1) ||
3622
3622
(sizeof(cpumap_t) & 7)) {
3623
virXenError(VIR_ERR_INTERNAL_ERROR, "%s",
3624
_("domain shut off or invalid"));
3623
virReportError(VIR_ERR_INTERNAL_ERROR, "%s",
3624
_("domain shut off or invalid"));
3627
3627
if ((cpumaps != NULL) && (maplen < 1)) {
3628
virXenError(VIR_ERR_INVALID_ARG, "%s",
3629
_("invalid argument"));
3628
virReportError(VIR_ERR_INVALID_ARG, "%s",
3629
_("invalid argument"));
3632
3632
/* first get the number of virtual CPUs in this domain */
3637
3637
if ((ret < 0) || (XEN_GETDOMAININFO_DOMAIN(dominfo) != domain->id)) {
3638
virXenError(VIR_ERR_INTERNAL_ERROR, "%s",
3639
_("cannot get domain details"));
3638
virReportError(VIR_ERR_INTERNAL_ERROR, "%s",
3639
_("cannot get domain details"));
3642
3642
nbinfo = XEN_GETDOMAININFO_CPUCOUNT(dominfo) + 1;
3652
3652
(unsigned char *)VIR_GET_CPUMAP(cpumaps, maplen, i),
3655
virXenError(VIR_ERR_INTERNAL_ERROR, "%s",
3656
_("cannot get VCPUs info"));
3655
virReportError(VIR_ERR_INTERNAL_ERROR, "%s",
3656
_("cannot get VCPUs info"));
3660
3660
ret = virXen_getvcpusinfo(priv->handle, domain->id, i,
3663
virXenError(VIR_ERR_INTERNAL_ERROR, "%s",
3664
_("cannot get VCPUs info"));
3663
virReportError(VIR_ERR_INTERNAL_ERROR, "%s",
3664
_("cannot get VCPUs info"));