QEMU virtual CPUs can assume a halted state, which - depending on
the architecture - can indicate whether a CPU is in use by the
guest operating system.
A new VCPU state halted is introduced in preparation of the
support in the QEMU driver (and optionally others where deemed
appropriate).
Signed-off-by: Viktor Mihajlovski <mihajlov(a)linux.vnet.ibm.com>
Reviewed-by: Bjoern Walk <bwalk(a)linux.vnet.ibm.com>
Signed-off-by: Boris Fiuczynski <fiuczy(a)linux.vnet.ibm.com>
---
include/libvirt/libvirt-domain.h | 1 +
tools/virsh-domain.c | 3 ++-
2 files changed, 3 insertions(+), 1 deletion(-)
diff --git a/include/libvirt/libvirt-domain.h b/include/libvirt/libvirt-domain.h
index 7ea93aa..98b9420 100644
--- a/include/libvirt/libvirt-domain.h
+++ b/include/libvirt/libvirt-domain.h
@@ -1656,6 +1656,7 @@ typedef enum {
VIR_VCPU_OFFLINE = 0, /* the virtual CPU is offline */
VIR_VCPU_RUNNING = 1, /* the virtual CPU is running */
VIR_VCPU_BLOCKED = 2, /* the virtual CPU is blocked on resource */
+ VIR_VCPU_HALTED = 3, /* the virtual CPU is halted */
# ifdef VIR_ENUM_SENTINELS
VIR_VCPU_LAST
diff --git a/tools/virsh-domain.c b/tools/virsh-domain.c
index dbdee5b..4650eb3 100644
--- a/tools/virsh-domain.c
+++ b/tools/virsh-domain.c
@@ -181,7 +181,8 @@ VIR_ENUM_IMPL(virshDomainVcpuState,
VIR_VCPU_LAST,
N_("offline"),
N_("running"),
- N_("blocked"))
+ N_("blocked"),
+ N_("halted"))
static const char *
virshDomainVcpuStateToString(int state)
--
1.9.1