提交 a05e2570 编写于 作者: J Jim Fehlig

libxl: implement virDomainGetMaxVcpus

The libxl driver already supports getting maximum vcpu count via
libxlDomainGetVcpusFlags, allowing to trivially implement
virDomainGetMaxVcpus.
上级 bdd371c5
......@@ -39,6 +39,8 @@
_virStorageVolInfo structure. The --physical flag has been
added to the virsh vol-info command to access the data
</li>
<li>libxl: Implement virDomainGetMaxVcpus API
</li>
</ul>
</li>
<li><strong>Improvements</strong>
......
......@@ -2362,6 +2362,13 @@ libxlDomainGetVcpusFlags(virDomainPtr dom, unsigned int flags)
return ret;
}
static int
libxlDomainGetMaxVcpus(virDomainPtr dom)
{
return libxlDomainGetVcpusFlags(dom, (VIR_DOMAIN_AFFECT_LIVE |
VIR_DOMAIN_VCPU_MAXIMUM));
}
static int
libxlDomainPinVcpuFlags(virDomainPtr dom, unsigned int vcpu,
unsigned char *cpumap, int maplen,
......@@ -6446,6 +6453,7 @@ static virHypervisorDriver libxlHypervisorDriver = {
.domainSetVcpus = libxlDomainSetVcpus, /* 0.9.0 */
.domainSetVcpusFlags = libxlDomainSetVcpusFlags, /* 0.9.0 */
.domainGetVcpusFlags = libxlDomainGetVcpusFlags, /* 0.9.0 */
.domainGetMaxVcpus = libxlDomainGetMaxVcpus, /* 3.0.0 */
.domainPinVcpu = libxlDomainPinVcpu, /* 0.9.0 */
.domainPinVcpuFlags = libxlDomainPinVcpuFlags, /* 1.2.1 */
.domainGetVcpus = libxlDomainGetVcpus, /* 0.9.0 */
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册