]> xenbits.xensource.com Git - xen.git/commit
libxl: introduce MSR data in libxl_cpuid_policy
authorRoger Pau Monne <roger.pau@citrix.com>
Wed, 26 Jul 2023 07:47:53 +0000 (09:47 +0200)
committerAndrew Cooper <andrew.cooper3@citrix.com>
Thu, 3 Aug 2023 18:13:40 +0000 (19:13 +0100)
commitaaa97b41281831c5a2e3a03677bfd5e4f5347f6d
tree486ae67c724ca96104f75d35c2bbcc4b36465765
parent748cb881d8af26bdd2db62d4632a372bd61bb0a6
libxl: introduce MSR data in libxl_cpuid_policy

Add a new array field to libxl_cpuid_policy in order to store the MSR
policies.

Adding the MSR data in the libxl_cpuid_policy_list type is done so
that existing users can seamlessly pass MSR features as part of the
CPUID data, without requiring the introduction of a separate
domain_build_info field, and a new set of handlers functions.

Note that support for parsing the old JSON format is kept, as that's
required in order to restore domains or received migrations from
previous tool versions.  Differentiation between the old and the new
formats is done based on whether the contents of the 'cpuid' field is
an array or a map JSON object.

Signed-off-by: Roger Pau Monné <roger.pau@citrix.com>
Reviewed-by: Anthony PERARD <anthony.perard@citrix.com>
(cherry picked from commit 5b80cecb747b2176b9e85f6e7aa7be83416d77e1)
tools/libs/light/libxl_cpuid.c
tools/libs/light/libxl_internal.h
tools/libs/light/libxl_types.idl