mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-02-22 03:12:22 +00:00
libxl: implement virDomainGetMaxVcpus
The libxl driver already supports getting maximum vcpu count via libxlDomainGetVcpusFlags, allowing to trivially implement virDomainGetMaxVcpus.
This commit is contained in:
parent
bdd371c5c5
commit
a05e2570c9
@ -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 */
|
||||
|
Loading…
x
Reference in New Issue
Block a user