tools/libx[cl]: Introduce struct xc_xend_cpuid for xc_cpuid_set()
authorAndrew Cooper <andrew.cooper3@citrix.com>
Fri, 12 Jun 2020 13:05:44 +0000 (14:05 +0100)
committerAndrew Cooper <andrew.cooper3@citrix.com>
Wed, 17 Jun 2020 12:54:12 +0000 (13:54 +0100)
commit700738bf6a7a89a1b41cc783ae58f7c8ec1e9cfa
tree348eb39862054e6c0c78e285acdd257f4e9919d4
parent3625b04991b4d6affadd99d377ab84bac48dfff4
tools/libx[cl]: Introduce struct xc_xend_cpuid for xc_cpuid_set()

In order to combine the functionality of xc_cpuid_set() with
xc_cpuid_apply_policy(), arrange to pass the data in a single contained
struct, rather than two arrays.

libxl__cpuid_policy is the ideal structure to use, but that would introduce a
reverse dependency between libxc and libxl.  Introduce xc_xend_cpuid (with a
transparent union to provide more useful names for the inputs), and use this
structure in libxl.

The public API has libxl_cpuid_policy as an opaque type referencing
libxl__cpuid_policy.  Drop the inappropriate comment about its internals, and
use xc_xend_cpuid as a differently named opaque backing object.  Users of both
libxl and libxc are not permitted to look at the internals.

No change in behaviour.

Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
Release-acked-by: Paul Durrant <paul@xen.org>
tools/libxc/include/xenctrl.h
tools/libxc/xc_cpuid_x86.c
tools/libxl/libxl.h
tools/libxl/libxl_cpuid.c
tools/libxl/libxl_internal.h