[PATCH V2 1/4] domain: Add new VCPU state "halted"

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxxxxxxxxxxx>
Reviewed-by: Bjoern Walk <bwalk@xxxxxxxxxxxxxxxxxx>
Signed-off-by: Boris Fiuczynski <fiuczy@xxxxxxxxxxxxxxxxxx>
---
 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 f1c35d9..0da2003 100644
--- a/include/libvirt/libvirt-domain.h
+++ b/include/libvirt/libvirt-domain.h
@@ -1682,6 +1682,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 3829b17..a6b239b 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

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list



[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]