mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-12-22 05:35:25 +00:00
ch: enable virNodeGetMemoryStats API
Enable virNodeGetMemoryStats API to return the stats of host memory. Signed-off-by: Praveen K Paladugu <prapal@linux.microsoft.com> Signed-off-by: Praveen K Paladugu <praveenkpaladugu@gmail.com> Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
This commit is contained in:
parent
91d6a0a1a9
commit
ed1cef6264
@ -40,6 +40,7 @@
|
||||
#include "virutil.h"
|
||||
#include "viruuid.h"
|
||||
#include "virnuma.h"
|
||||
#include "virhostmem.h"
|
||||
|
||||
#define VIR_FROM_THIS VIR_FROM_CH
|
||||
|
||||
@ -2209,6 +2210,19 @@ chDomainSetNumaParameters(virDomainPtr dom,
|
||||
return ret;
|
||||
}
|
||||
|
||||
static int
|
||||
chNodeGetMemoryStats(virConnectPtr conn,
|
||||
int cellNum,
|
||||
virNodeMemoryStatsPtr params,
|
||||
int *nparams,
|
||||
unsigned int flags)
|
||||
{
|
||||
if (virNodeGetMemoryStatsEnsureACL(conn) < 0)
|
||||
return -1;
|
||||
|
||||
return virHostMemGetStats(cellNum, params, nparams, flags);
|
||||
}
|
||||
|
||||
/* Function Tables */
|
||||
static virHypervisorDriver chHypervisorDriver = {
|
||||
.name = "CH",
|
||||
@ -2266,6 +2280,7 @@ static virHypervisorDriver chHypervisorDriver = {
|
||||
.domainHasManagedSaveImage = chDomainHasManagedSaveImage, /* 10.2.0 */
|
||||
.domainRestore = chDomainRestore, /* 10.2.0 */
|
||||
.domainRestoreFlags = chDomainRestoreFlags, /* 10.2.0 */
|
||||
.nodeGetMemoryStats = chNodeGetMemoryStats, /* 10.10.0 */
|
||||
};
|
||||
|
||||
static virConnectDriver chConnectDriver = {
|
||||
|
Loading…
Reference in New Issue
Block a user