[libvirt] [PATCH 2/8] qemu: agent: define structure of qemuAgentMemblockInfo

Zhang Bo oscar.zhangbo at huawei.com
Tue Jun 9 09:33:26 UTC 2015


add the definition of qemuAgentMemblockInfo, according to the json format:

{ 'struct': 'GuestMemoryBlock',
  'data': {'phys-index': 'uint64',
           'online': 'bool',
           '*can-offline': 'bool'} }

Signed-off-by: Zhang Bo <oscar.zhangbo at huawei.com>
Signed-off-by: Li Bin <binlibin.li at huawei.com>
---
 src/qemu/qemu_agent.h | 9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/src/qemu/qemu_agent.h b/src/qemu/qemu_agent.h
index 7cbf8eb..425ee87 100644
--- a/src/qemu/qemu_agent.h
+++ b/src/qemu/qemu_agent.h
@@ -103,6 +103,15 @@ int qemuAgentUpdateCPUInfo(unsigned int nvcpus,
                            qemuAgentCPUInfoPtr cpuinfo,
                            int ncpuinfo);
 
+typedef struct _qemuAgentMemblockInfo qemuAgentMemblockInfo;
+typedef qemuAgentMemblockInfo *qemuAgentMemblockInfoPtr;
+struct _qemuAgentMemblockInfo {
+    unsigned long long id;   /* arbitrary guest-specific unique identifier of the MEMORY BLOCK*/
+    bool online;        /* true if the MEMORY BLOCK is enabled in the guest*/
+    bool offlinable;    /* true if the MEMORY BLOCK can be offlined */
+};
+
+
 int qemuAgentGetTime(qemuAgentPtr mon,
                      long long *seconds,
                      unsigned int *nseconds);
-- 
1.7.12.4





More information about the libvir-list mailing list