Hello,

The following series adds support for handling guest MSR features as
defined in arch-x86/cpufeatureset.h.

The end result is the user being able to use such features with the
xl.cfg(5) cpuid option.  This also involves adding support to all the
underlying layers, so both libxl and libxc also get new functionality in
order to properly parse those.

In order for such support to be as transparent as possible for existing
users of libxl, both libxl_cpuid_policy_list and libxl_cpuid_policy are
modified, so that the libxl_cpuid_policy_list type is no longer an array
anymore, and libxl_cpuid_policy is converted into a structure with
two fields to hold both a CPUID and MSR arrays.  It's my thinking that
current users of libxl had no business in poking at
libxl_cpuid_policy_list, since the underlying type (struct
xc_xend_cpuid) is opaque in that context.  Also the format of the array
(with a terminating empty element) is not documented in the public
headers.

Some of the patches had been salvaged from a previous series of mine to
introduce better cpu_policy management support in libxc and libxl, and
hence contain some version notes about changes, or are already reviewed.

Thanks, Roger.

Roger Pau Monne (13):
  libs/guest: simplify xc_cpuid_apply_policy()
  libx86: introduce helper to fetch cpuid leaf
  libs/guest: allow fetching a specific CPUID leaf from a cpu policy
  libx86: introduce helper to fetch msr entry
  libs/guest: allow fetching a specific MSR entry from a cpu policy
  libs/guest: replace usage of host featureset in
    xc_cpuid_apply_policy()
  libs/guest: rework xc_cpuid_xend_policy
  libs/guest: introduce support for setting guest MSRs
  libxl: change the type of libxl_cpuid_policy_list
  libxl: introduce MSR data in libxl_cpuid_policy
  libxl: split logic to parse user provided CPUID features
  libxl: use the cpuid feature names from cpufeatureset.h
  libxl: add support for parsing MSR features

 docs/man/xl.cfg.5.pod.in                 |  24 +-
 tools/include/libxl.h                    |   7 +-
 tools/include/xenctrl.h                  |  21 +-
 tools/include/xenguest.h                 |  13 +
 tools/libs/guest/xg_cpuid_x86.c          | 383 +++++++++--------
 tools/libs/light/gentest.py              |   2 +-
 tools/libs/light/libxl_cpuid.c           | 504 +++++++++++------------
 tools/tests/cpu-policy/test-cpu-policy.c | 220 +++++++++-
 tools/xl/xl_parse.c                      |   3 +
 xen/arch/x86/cpuid.c                     |  55 +--
 xen/include/xen/lib/x86/cpu-policy.h     |  37 +-
 xen/lib/x86/cpuid.c                      |  52 +++
 xen/lib/x86/msr.c                        |  41 +-
 13 files changed, 821 insertions(+), 541 deletions(-)

-- 
2.40.0


Reply via email to