[PATCH 1/6] domain: introduce constants for virVcpuInfo->cpu state values
Matt Coleman
mcoleman at datto.com
Thu Nov 12 14:17:53 UTC 2020
> On Nov 12, 2020, at 8:46 AM, Michal Privoznik <mprivozn at redhat.com> wrote:
>
> On 11/12/20 12:51 PM, Matt Coleman wrote:
>> +/**
>> + * VIR_VCPU_INFO_CPU_OFFLINE:
>> + *
>> + * The VCPU is offline.
>> + */
>> +# define VIR_VCPU_INFO_CPU_OFFLINE -1
>> +
>> +/**
>> + * VIR_VCPU_INFO_CPU_UNAVAILABLE:
>> + *
>> + * The hypervisor does not expose real CPU information for VCPUs.
>> + */
>> +# define VIR_VCPU_INFO_CPU_UNAVAILABLE -2
>> +
>> /* Flags for controlling virtual CPU hot-plugging. */
>> typedef enum {
>> /* See virDomainModificationImpact for these flags. */
>
> How about making this an enum instead?
Sounds good. I had done it this way based on the Hyper-V CPU details
thread. I'll update it to use an enum.
--
Matt
More information about the libvir-list
mailing list