[libvirt] [PATCH v2 17/33] cpu_x86: Make virCPUx86DataAddCPUID work with virCPUDataPtr

John Ferlan jferlan at redhat.com
Wed Feb 22 03:23:24 UTC 2017


Would be nice to have some more text here to describe what's being done
and why...  I guess at this point I'm not sure I see the value yet other
than hiding the 'data.x86' from outside prying eyes.


On 02/15/2017 11:44 AM, Jiri Denemark wrote:
> Signed-off-by: Jiri Denemark <jdenemar at redhat.com>
> ---
> 
> Notes:
>     Version 2:
>     - no change
> 
>  src/cpu/cpu_x86.c              | 57 ++++++++++++++++++++++++------------------
>  src/cpu/cpu_x86.h              |  2 +-
>  src/libxl/libxl_capabilities.c |  2 +-
>  src/qemu/qemu_monitor_json.c   |  2 +-
>  4 files changed, 36 insertions(+), 27 deletions(-)
> 
> diff --git a/src/cpu/cpu_x86.c b/src/cpu/cpu_x86.c
> index 3b540f99c..029a7d475 100644
> --- a/src/cpu/cpu_x86.c
> +++ b/src/cpu/cpu_x86.c
> @@ -330,9 +330,9 @@ x86DataCopy(virCPUx86Data *dst, const virCPUx86Data *src)
>  }
>  
>  
> -int
> -virCPUx86DataAddCPUID(virCPUx86Data *data,
> -                      const virCPUx86CPUID *cpuid)
> +static int
> +virCPUx86DataAddCPUIDInt(virCPUx86Data *data,
> +                         const virCPUx86CPUID *cpuid)
>  {
>      virCPUx86CPUID *existing;
>  
> @@ -365,7 +365,7 @@ x86DataAdd(virCPUx86Data *data1,
>          if (cpuid1) {
>              x86cpuidSetBits(cpuid1, cpuid2);
>          } else {
> -            if (virCPUx86DataAddCPUID(data1, cpuid2) < 0)
> +            if (virCPUx86DataAddCPUIDInt(data1, cpuid2) < 0)
>                  return -1;
>          }
>      }
> @@ -549,7 +549,7 @@ x86DataAddSignature(virCPUx86Data *data,
>  {
>      virCPUx86CPUID cpuid = { .eax_in = 0x1, .eax = signature };
>  
> -    return virCPUx86DataAddCPUID(data, &cpuid);
> +    return virCPUx86DataAddCPUIDInt(data, &cpuid);
>  }

It probably would have made review of this series a whole lot easier if
virCPUx86DataAddCPUID was added right here, but I understand after going
thru the next few why it's been put here.

ACK,

John




More information about the libvir-list mailing list