On Wed, Oct 12, 2016 at 14:06:14 +0200, Viktor Mihajlovski wrote: > Currently, the virVcpuInfo returned by virDomainGetVcpus() will always > report a state of VIR_VCPU_RUNNING for each defined domain vcpu even if > the vcpu is currently in the halted state. > > As the monitor interface is in fact reporting the accurate state, it is > rather easy to transport this information with the existing API. > > This is done by > - adding a new state of VIR_VCPU_HALTED [1] > - extending the monitor to pass back the halted state for the vcpus > - adding a new field to the private domain vcpu object reflecting the > halted state for the vcpu > - modifying the driver code to report the vcpu state based on the halted > indicator > - extending virsh vcpuinfo to also display the halted state > > The vcpu state is however not recorded in the internal XML format, since > the state can change asynchronously (without notification). > > V2 is a rebase on top of Peter Krempa's CPU hotplug modernization. > > V3 tries to address the review comments by John and Peter. Despite fixing user strings in this version to show the word 'running' the enum value [1] is still changed for the new one. Since the actual value is used by programs and not humans that may break and I'm not comfortable allowing such change in semantics. As I've already pointed out, this would be the most common state on x86 so basically everybody would see it and we were reporting "RUNNING" for ages. I still think this should be added as a separate indicator (if at all). One possibility would be to add in into the bulk stats API since the current structure can't be extended. > I noticed Peter has posted (we had a tendency for mid-air collisions lately) > https://www.redhat.com/archives/libvir-list/2016-October/msg00498.html They are virsh-only basically, so there should not be any collision. Peter
Attachment:
signature.asc
Description: Digital signature
-- libvir-list mailing list libvir-list@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/libvir-list